quantconnect-stubs 17397__py3-none-any.whl → 17412__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Common/Data/Consolidators/__init__.pyi +1 -1
- QuantConnect/Algorithm/Framework/Alphas/__init__.pyi +18 -18
- QuantConnect/Algorithm/Framework/Execution/__init__.pyi +2 -2
- QuantConnect/Algorithm/Framework/Portfolio/__init__.pyi +14 -14
- QuantConnect/Algorithm/Framework/Selection/__init__.pyi +3 -3
- QuantConnect/Algorithm/__init__.pyi +365 -310
- QuantConnect/AlgorithmFactory/Python/Wrappers/__init__.pyi +12 -11
- QuantConnect/Api/Serialization/__init__.pyi +1 -3
- QuantConnect/Api/__init__.pyi +67 -8
- QuantConnect/Benchmarks/__init__.pyi +1 -1
- QuantConnect/Brokerages/Authentication/__init__.pyi +10 -2
- QuantConnect/Brokerages/LevelOneOrderBook/__init__.pyi +6 -5
- QuantConnect/Brokerages/__init__.pyi +82 -11
- QuantConnect/Commands/__init__.pyi +3 -2
- QuantConnect/Data/Auxiliary/__init__.pyi +13 -13
- QuantConnect/Data/Common/__init__.pyi +1 -1
- QuantConnect/Data/Custom/Tiingo/__init__.pyi +2 -1
- QuantConnect/Data/Fundamental/__init__.pyi +11 -12
- QuantConnect/Data/Market/__init__.pyi +42 -42
- QuantConnect/Data/UniverseSelection/__init__.pyi +29 -29
- QuantConnect/Data/__init__.pyi +44 -45
- QuantConnect/DataSource/__init__.pyi +7 -7
- QuantConnect/Indicators/__init__.pyi +238 -98
- QuantConnect/Interfaces/__init__.pyi +24 -23
- QuantConnect/Lean/Engine/DataFeeds/Enumerators/__init__.pyi +1 -1
- QuantConnect/Lean/Engine/DataFeeds/Queues/__init__.pyi +2 -1
- QuantConnect/Lean/Engine/DataFeeds/WorkScheduling/__init__.pyi +3 -2
- QuantConnect/Lean/Engine/DataFeeds/__init__.pyi +19 -19
- QuantConnect/Lean/Engine/HistoricalData/__init__.pyi +1 -1
- QuantConnect/Lean/Engine/Results/__init__.pyi +0 -38
- QuantConnect/Notifications/__init__.pyi +1 -3
- QuantConnect/Optimizer/Parameters/__init__.pyi +1 -3
- QuantConnect/Orders/Fees/__init__.pyi +35 -0
- QuantConnect/Orders/__init__.pyi +75 -28
- QuantConnect/Python/__init__.pyi +1 -1
- QuantConnect/Report/__init__.pyi +3 -5
- QuantConnect/Research/__init__.pyi +17 -16
- QuantConnect/Scheduling/__init__.pyi +17 -17
- QuantConnect/Securities/Cfd/__init__.pyi +2 -2
- QuantConnect/Securities/Crypto/__init__.pyi +2 -2
- QuantConnect/Securities/CryptoFuture/__init__.pyi +1 -1
- QuantConnect/Securities/Equity/__init__.pyi +1 -1
- QuantConnect/Securities/Forex/__init__.pyi +1 -1
- QuantConnect/Securities/Future/__init__.pyi +8 -8
- QuantConnect/Securities/FutureOption/__init__.pyi +9 -9
- QuantConnect/Securities/Index/__init__.pyi +2 -2
- QuantConnect/Securities/IndexOption/__init__.pyi +3 -3
- QuantConnect/Securities/Option/StrategyMatcher/__init__.pyi +6 -6
- QuantConnect/Securities/Option/__init__.pyi +54 -54
- QuantConnect/Securities/Positions/__init__.pyi +6 -6
- QuantConnect/Securities/__init__.pyi +80 -81
- QuantConnect/Statistics/__init__.pyi +2 -2
- QuantConnect/Util/__init__.pyi +36 -37
- QuantConnect/__init__.pyi +69 -68
- System/ComponentModel/DataAnnotations/__init__.pyi +1 -1
- System/ComponentModel/__init__.pyi +1 -1
- System/IO/__init__.pyi +12 -0
- System/Threading/__init__.pyi +3 -3
- {quantconnect_stubs-17397.dist-info → quantconnect_stubs-17412.dist-info}/METADATA +1 -1
- {quantconnect_stubs-17397.dist-info → quantconnect_stubs-17412.dist-info}/RECORD +62 -62
- {quantconnect_stubs-17397.dist-info → quantconnect_stubs-17412.dist-info}/WHEEL +0 -0
- {quantconnect_stubs-17397.dist-info → quantconnect_stubs-17412.dist-info}/top_level.txt +0 -0
|
@@ -5,6 +5,7 @@ import datetime
|
|
|
5
5
|
import typing
|
|
6
6
|
import warnings
|
|
7
7
|
|
|
8
|
+
import Common.Util
|
|
8
9
|
import QuantConnect
|
|
9
10
|
import QuantConnect.Algorithm.Framework.Alphas
|
|
10
11
|
import QuantConnect.Algorithm.Framework.Alphas.Analysis
|
|
@@ -684,7 +685,7 @@ class IJobQueueHandler(metaclass=abc.ABCMeta):
|
|
|
684
685
|
class ISubscriptionDataConfigProvider(metaclass=abc.ABCMeta):
|
|
685
686
|
"""Reduced interface which provides access to registered SubscriptionDataConfig"""
|
|
686
687
|
|
|
687
|
-
def get_subscription_data_configs(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract] = None, include_internal_configs: bool = False) -> typing.List[QuantConnect.Data.SubscriptionDataConfig]:
|
|
688
|
+
def get_subscription_data_configs(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security] = None, include_internal_configs: bool = False) -> typing.List[QuantConnect.Data.SubscriptionDataConfig]:
|
|
688
689
|
"""
|
|
689
690
|
Gets a list of all registered SubscriptionDataConfig for a given Symbol if any
|
|
690
691
|
else will return the whole list of subscriptions
|
|
@@ -705,7 +706,7 @@ class ISubscriptionDataConfigService(QuantConnect.Interfaces.ISubscriptionDataCo
|
|
|
705
706
|
...
|
|
706
707
|
|
|
707
708
|
@overload
|
|
708
|
-
def add(self, data_type: typing.Type, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], resolution: typing.Optional[QuantConnect.Resolution] = None, fill_forward: bool = True, extended_market_hours: bool = False, is_filtered_subscription: bool = True, is_internal_feed: bool = False, is_custom_data: bool = False, data_normalization_mode: QuantConnect.DataNormalizationMode = ..., data_mapping_mode: QuantConnect.DataMappingMode = ..., contract_depth_offset: int = 0) -> QuantConnect.Data.SubscriptionDataConfig:
|
|
709
|
+
def add(self, data_type: typing.Type, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], resolution: typing.Optional[QuantConnect.Resolution] = None, fill_forward: bool = True, extended_market_hours: bool = False, is_filtered_subscription: bool = True, is_internal_feed: bool = False, is_custom_data: bool = False, data_normalization_mode: QuantConnect.DataNormalizationMode = ..., data_mapping_mode: QuantConnect.DataMappingMode = ..., contract_depth_offset: int = 0) -> QuantConnect.Data.SubscriptionDataConfig:
|
|
709
710
|
"""
|
|
710
711
|
Creates and adds a list of SubscriptionDataConfig for a given symbol and configuration.
|
|
711
712
|
Can optionally pass in desired subscription data type to use.
|
|
@@ -714,7 +715,7 @@ class ISubscriptionDataConfigService(QuantConnect.Interfaces.ISubscriptionDataCo
|
|
|
714
715
|
...
|
|
715
716
|
|
|
716
717
|
@overload
|
|
717
|
-
def add(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], resolution: typing.Optional[QuantConnect.Resolution] = None, fill_forward: bool = True, extended_market_hours: bool = False, is_filtered_subscription: bool = True, is_internal_feed: bool = False, is_custom_data: bool = False, subscription_data_types: typing.List[System.Tuple[typing.Type, QuantConnect.TickType]] = None, data_normalization_mode: QuantConnect.DataNormalizationMode = ..., data_mapping_mode: QuantConnect.DataMappingMode = ..., contract_depth_offset: int = 0) -> typing.List[QuantConnect.Data.SubscriptionDataConfig]:
|
|
718
|
+
def add(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], resolution: typing.Optional[QuantConnect.Resolution] = None, fill_forward: bool = True, extended_market_hours: bool = False, is_filtered_subscription: bool = True, is_internal_feed: bool = False, is_custom_data: bool = False, subscription_data_types: typing.List[System.Tuple[typing.Type, QuantConnect.TickType]] = None, data_normalization_mode: QuantConnect.DataNormalizationMode = ..., data_mapping_mode: QuantConnect.DataMappingMode = ..., contract_depth_offset: int = 0) -> typing.List[QuantConnect.Data.SubscriptionDataConfig]:
|
|
718
719
|
"""
|
|
719
720
|
Creates and adds a list of SubscriptionDataConfig for a given symbol and configuration.
|
|
720
721
|
Can optionally pass in desired subscription data types to use.
|
|
@@ -981,7 +982,7 @@ class IDataQueueUniverseProvider(metaclass=abc.ABCMeta):
|
|
|
981
982
|
"""
|
|
982
983
|
...
|
|
983
984
|
|
|
984
|
-
def lookup_symbols(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], include_expired: bool, security_currency: str = None) -> typing.Iterable[QuantConnect.Symbol]:
|
|
985
|
+
def lookup_symbols(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], include_expired: bool, security_currency: str = None) -> typing.Iterable[QuantConnect.Symbol]:
|
|
985
986
|
"""
|
|
986
987
|
Method returns a collection of Symbols that are available at the data source.
|
|
987
988
|
|
|
@@ -1697,7 +1698,7 @@ class IDataChannelProvider(metaclass=abc.ABCMeta):
|
|
|
1697
1698
|
class IFutureChainProvider(metaclass=abc.ABCMeta):
|
|
1698
1699
|
"""Provides the full future chain for a given underlying."""
|
|
1699
1700
|
|
|
1700
|
-
def get_future_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
1701
|
+
def get_future_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
1701
1702
|
"""
|
|
1702
1703
|
Gets the list of future contracts for a given underlying symbol
|
|
1703
1704
|
|
|
@@ -1774,7 +1775,7 @@ class ITradeBuilder(metaclass=abc.ABCMeta):
|
|
|
1774
1775
|
"""
|
|
1775
1776
|
...
|
|
1776
1777
|
|
|
1777
|
-
def has_open_position(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> bool:
|
|
1778
|
+
def has_open_position(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> bool:
|
|
1778
1779
|
"""
|
|
1779
1780
|
Returns true if there is an open position for the symbol
|
|
1780
1781
|
|
|
@@ -1802,7 +1803,7 @@ class ITradeBuilder(metaclass=abc.ABCMeta):
|
|
|
1802
1803
|
"""
|
|
1803
1804
|
...
|
|
1804
1805
|
|
|
1805
|
-
def set_market_price(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], price: float) -> None:
|
|
1806
|
+
def set_market_price(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], price: float) -> None:
|
|
1806
1807
|
"""
|
|
1807
1808
|
Sets the current market price for the symbol
|
|
1808
1809
|
|
|
@@ -1823,7 +1824,7 @@ class ITradeBuilder(metaclass=abc.ABCMeta):
|
|
|
1823
1824
|
class IOptionChainProvider(metaclass=abc.ABCMeta):
|
|
1824
1825
|
"""Provides the full option chain for a given underlying."""
|
|
1825
1826
|
|
|
1826
|
-
def get_option_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
1827
|
+
def get_option_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
1827
1828
|
"""
|
|
1828
1829
|
Gets the list of option contracts for a given underlying symbol
|
|
1829
1830
|
|
|
@@ -2268,7 +2269,7 @@ class IAlgorithm(QuantConnect.Interfaces.ISecurityInitializerProvider, QuantConn
|
|
|
2268
2269
|
"""
|
|
2269
2270
|
...
|
|
2270
2271
|
|
|
2271
|
-
def add_future_contract(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], resolution: typing.Optional[QuantConnect.Resolution] = None, fill_forward: bool = True, leverage: float = 0, extended_market_hours: bool = False) -> QuantConnect.Securities.Future.Future:
|
|
2272
|
+
def add_future_contract(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], resolution: typing.Optional[QuantConnect.Resolution] = None, fill_forward: bool = True, leverage: float = 0, extended_market_hours: bool = False) -> QuantConnect.Securities.Future.Future:
|
|
2272
2273
|
"""
|
|
2273
2274
|
Creates and adds a new single Future contract to the algorithm
|
|
2274
2275
|
|
|
@@ -2281,7 +2282,7 @@ class IAlgorithm(QuantConnect.Interfaces.ISecurityInitializerProvider, QuantConn
|
|
|
2281
2282
|
"""
|
|
2282
2283
|
...
|
|
2283
2284
|
|
|
2284
|
-
def add_option_contract(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], resolution: typing.Optional[QuantConnect.Resolution] = None, fill_forward: bool = True, leverage: float = 0, extended_market_hours: bool = False) -> QuantConnect.Securities.Option.Option:
|
|
2285
|
+
def add_option_contract(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], resolution: typing.Optional[QuantConnect.Resolution] = None, fill_forward: bool = True, leverage: float = 0, extended_market_hours: bool = False) -> QuantConnect.Securities.Option.Option:
|
|
2285
2286
|
"""
|
|
2286
2287
|
Creates and adds a new single Option contract to the algorithm
|
|
2287
2288
|
|
|
@@ -2312,7 +2313,7 @@ class IAlgorithm(QuantConnect.Interfaces.ISecurityInitializerProvider, QuantConn
|
|
|
2312
2313
|
...
|
|
2313
2314
|
|
|
2314
2315
|
@overload
|
|
2315
|
-
def add_security(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], resolution: typing.Optional[QuantConnect.Resolution] = None, fill_forward: bool = True, leverage: float = ..., extended_market_hours: bool = False, data_mapping_mode: typing.Optional[QuantConnect.DataMappingMode] = None, data_normalization_mode: typing.Optional[QuantConnect.DataNormalizationMode] = None, contract_depth_offset: int = 0) -> QuantConnect.Securities.Security:
|
|
2316
|
+
def add_security(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], resolution: typing.Optional[QuantConnect.Resolution] = None, fill_forward: bool = True, leverage: float = ..., extended_market_hours: bool = False, data_mapping_mode: typing.Optional[QuantConnect.DataMappingMode] = None, data_normalization_mode: typing.Optional[QuantConnect.DataNormalizationMode] = None, contract_depth_offset: int = 0) -> QuantConnect.Securities.Security:
|
|
2316
2317
|
"""
|
|
2317
2318
|
Set a required SecurityType-symbol and resolution for algorithm
|
|
2318
2319
|
|
|
@@ -2362,7 +2363,7 @@ class IAlgorithm(QuantConnect.Interfaces.ISecurityInitializerProvider, QuantConn
|
|
|
2362
2363
|
"""
|
|
2363
2364
|
...
|
|
2364
2365
|
|
|
2365
|
-
def get_last_known_price(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> QuantConnect.Data.BaseData:
|
|
2366
|
+
def get_last_known_price(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> QuantConnect.Data.BaseData:
|
|
2366
2367
|
"""
|
|
2367
2368
|
Get the last known price using the history provider.
|
|
2368
2369
|
Useful for seeding securities with the correct price
|
|
@@ -2373,7 +2374,7 @@ class IAlgorithm(QuantConnect.Interfaces.ISecurityInitializerProvider, QuantConn
|
|
|
2373
2374
|
...
|
|
2374
2375
|
|
|
2375
2376
|
@overload
|
|
2376
|
-
def get_last_known_prices(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> typing.Iterable[QuantConnect.Data.BaseData]:
|
|
2377
|
+
def get_last_known_prices(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> typing.Iterable[QuantConnect.Data.BaseData]:
|
|
2377
2378
|
"""
|
|
2378
2379
|
Yields data to warmup a security for all it's subscribed data types
|
|
2379
2380
|
|
|
@@ -2432,7 +2433,7 @@ class IAlgorithm(QuantConnect.Interfaces.ISecurityInitializerProvider, QuantConn
|
|
|
2432
2433
|
"""
|
|
2433
2434
|
...
|
|
2434
2435
|
|
|
2435
|
-
def get_parameters(self) ->
|
|
2436
|
+
def get_parameters(self) -> Common.Util.ReadOnlyExtendedDictionary[str, str]:
|
|
2436
2437
|
"""Gets a read-only dictionary with all current parameters"""
|
|
2437
2438
|
...
|
|
2438
2439
|
|
|
@@ -2440,7 +2441,7 @@ class IAlgorithm(QuantConnect.Interfaces.ISecurityInitializerProvider, QuantConn
|
|
|
2440
2441
|
"""Initialise the Algorithm and Prepare Required Data:"""
|
|
2441
2442
|
...
|
|
2442
2443
|
|
|
2443
|
-
def liquidate(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract] = None, asynchronous: bool = False, tag: str = "Liquidated", order_properties: QuantConnect.Interfaces.IOrderProperties = None) -> typing.List[QuantConnect.Orders.OrderTicket]:
|
|
2444
|
+
def liquidate(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security] = None, asynchronous: bool = False, tag: str = "Liquidated", order_properties: QuantConnect.Interfaces.IOrderProperties = None) -> typing.List[QuantConnect.Orders.OrderTicket]:
|
|
2444
2445
|
"""
|
|
2445
2446
|
Liquidate your portfolio holdings
|
|
2446
2447
|
|
|
@@ -2599,7 +2600,7 @@ class IAlgorithm(QuantConnect.Interfaces.ISecurityInitializerProvider, QuantConn
|
|
|
2599
2600
|
"""
|
|
2600
2601
|
...
|
|
2601
2602
|
|
|
2602
|
-
def remove_security(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], tag: str = None) -> bool:
|
|
2603
|
+
def remove_security(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], tag: str = None) -> bool:
|
|
2603
2604
|
"""
|
|
2604
2605
|
Removes the security with the specified symbol. This will cancel all
|
|
2605
2606
|
open orders and then liquidate any existing holdings
|
|
@@ -2845,7 +2846,7 @@ class IAlgorithm(QuantConnect.Interfaces.ISecurityInitializerProvider, QuantConn
|
|
|
2845
2846
|
"""
|
|
2846
2847
|
...
|
|
2847
2848
|
|
|
2848
|
-
def shortable(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], short_quantity: float, update_order_id: typing.Optional[int] = None) -> bool:
|
|
2849
|
+
def shortable(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], short_quantity: float, update_order_id: typing.Optional[int] = None) -> bool:
|
|
2849
2850
|
"""
|
|
2850
2851
|
Determines if the Symbol is shortable at the brokerage
|
|
2851
2852
|
|
|
@@ -2858,7 +2859,7 @@ class IAlgorithm(QuantConnect.Interfaces.ISecurityInitializerProvider, QuantConn
|
|
|
2858
2859
|
"""
|
|
2859
2860
|
...
|
|
2860
2861
|
|
|
2861
|
-
def shortable_quantity(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> int:
|
|
2862
|
+
def shortable_quantity(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> int:
|
|
2862
2863
|
"""
|
|
2863
2864
|
Gets the quantity shortable for the given asset
|
|
2864
2865
|
|
|
@@ -2887,7 +2888,7 @@ class IAlgorithm(QuantConnect.Interfaces.ISecurityInitializerProvider, QuantConn
|
|
|
2887
2888
|
"""
|
|
2888
2889
|
...
|
|
2889
2890
|
|
|
2890
|
-
def ticker(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> str:
|
|
2891
|
+
def ticker(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> str:
|
|
2891
2892
|
"""
|
|
2892
2893
|
For the given symbol will resolve the ticker it used at the current algorithm date
|
|
2893
2894
|
|
|
@@ -3250,17 +3251,17 @@ class ITimeInForceHandler(metaclass=abc.ABCMeta):
|
|
|
3250
3251
|
class ISecurityService(metaclass=abc.ABCMeta):
|
|
3251
3252
|
"""This interface exposes methods for creating a new Security"""
|
|
3252
3253
|
|
|
3253
|
-
def create_benchmark_security(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> QuantConnect.Securities.Security:
|
|
3254
|
+
def create_benchmark_security(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> QuantConnect.Securities.Security:
|
|
3254
3255
|
"""Creates a new benchmark security"""
|
|
3255
3256
|
...
|
|
3256
3257
|
|
|
3257
3258
|
@overload
|
|
3258
|
-
def create_security(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], subscription_data_config_list: typing.List[QuantConnect.Data.SubscriptionDataConfig], leverage: float = 0, add_to_symbol_cache: bool = True, underlying: QuantConnect.Securities.Security = None, seed_security: bool = True) -> QuantConnect.Securities.Security:
|
|
3259
|
+
def create_security(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], subscription_data_config_list: typing.List[QuantConnect.Data.SubscriptionDataConfig], leverage: float = 0, add_to_symbol_cache: bool = True, underlying: QuantConnect.Securities.Security = None, seed_security: bool = True) -> QuantConnect.Securities.Security:
|
|
3259
3260
|
"""Creates a new security"""
|
|
3260
3261
|
...
|
|
3261
3262
|
|
|
3262
3263
|
@overload
|
|
3263
|
-
def create_security(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], subscription_data_config: QuantConnect.Data.SubscriptionDataConfig, leverage: float = 0, add_to_symbol_cache: bool = True, underlying: QuantConnect.Securities.Security = None, seed_security: bool = True) -> QuantConnect.Securities.Security:
|
|
3264
|
+
def create_security(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], subscription_data_config: QuantConnect.Data.SubscriptionDataConfig, leverage: float = 0, add_to_symbol_cache: bool = True, underlying: QuantConnect.Securities.Security = None, seed_security: bool = True) -> QuantConnect.Securities.Security:
|
|
3264
3265
|
"""Creates a new security"""
|
|
3265
3266
|
...
|
|
3266
3267
|
|
|
@@ -3300,7 +3301,7 @@ class IDataCacheProvider(System.IDisposable, metaclass=abc.ABCMeta):
|
|
|
3300
3301
|
class IFactorFileProvider(metaclass=abc.ABCMeta):
|
|
3301
3302
|
"""Provides instances of FactorFile{T} at run time"""
|
|
3302
3303
|
|
|
3303
|
-
def get(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> QuantConnect.Data.Auxiliary.IFactorProvider:
|
|
3304
|
+
def get(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> QuantConnect.Data.Auxiliary.IFactorProvider:
|
|
3304
3305
|
"""
|
|
3305
3306
|
Gets a FactorFile{T} instance for the specified symbol, or null if not found
|
|
3306
3307
|
|
|
@@ -1374,7 +1374,7 @@ class BaseDataCollectionAggregatorEnumerator(System.Object, System.Collections.G
|
|
|
1374
1374
|
"""Gets the element in the collection at the current position of the enumerator."""
|
|
1375
1375
|
...
|
|
1376
1376
|
|
|
1377
|
-
def __init__(self, enumerator: System.Collections.Generic.IEnumerator[QuantConnect.Data.BaseData], symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], live_mode: bool = False) -> None:
|
|
1377
|
+
def __init__(self, enumerator: System.Collections.Generic.IEnumerator[QuantConnect.Data.BaseData], symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], live_mode: bool = False) -> None:
|
|
1378
1378
|
"""
|
|
1379
1379
|
Initializes a new instance of the BaseDataCollectionAggregatorEnumerator class
|
|
1380
1380
|
This will aggregate instances emitted from the underlying enumerator and tag them with the
|
|
@@ -8,6 +8,7 @@ import QuantConnect.Data.Market
|
|
|
8
8
|
import QuantConnect.Interfaces
|
|
9
9
|
import QuantConnect.Lean.Engine.DataFeeds.Queues
|
|
10
10
|
import QuantConnect.Packets
|
|
11
|
+
import QuantConnect.Securities
|
|
11
12
|
import System
|
|
12
13
|
import System.Collections.Generic
|
|
13
14
|
|
|
@@ -77,7 +78,7 @@ class FakeDataQueue(System.Object, QuantConnect.Interfaces.IDataQueueHandler, Qu
|
|
|
77
78
|
"""Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources."""
|
|
78
79
|
...
|
|
79
80
|
|
|
80
|
-
def lookup_symbols(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], include_expired: bool, security_currency: str = None) -> typing.Iterable[QuantConnect.Symbol]:
|
|
81
|
+
def lookup_symbols(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], include_expired: bool, security_currency: str = None) -> typing.Iterable[QuantConnect.Symbol]:
|
|
81
82
|
"""
|
|
82
83
|
Method returns a collection of Symbols that are available at the data source.
|
|
83
84
|
|
|
@@ -6,6 +6,7 @@ import typing
|
|
|
6
6
|
import QuantConnect
|
|
7
7
|
import QuantConnect.Data.Market
|
|
8
8
|
import QuantConnect.Lean.Engine.DataFeeds.WorkScheduling
|
|
9
|
+
import QuantConnect.Securities
|
|
9
10
|
import System
|
|
10
11
|
|
|
11
12
|
|
|
@@ -15,7 +16,7 @@ class WorkScheduler(System.Object, metaclass=abc.ABCMeta):
|
|
|
15
16
|
workers_count: int = ...
|
|
16
17
|
"""The quantity of workers to be used"""
|
|
17
18
|
|
|
18
|
-
def queue_work(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], work_func: typing.Callable[[int], bool], weight_func: typing.Callable[[], int]) -> None:
|
|
19
|
+
def queue_work(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], work_func: typing.Callable[[int], bool], weight_func: typing.Callable[[], int]) -> None:
|
|
19
20
|
"""
|
|
20
21
|
Add a new work item to the queue
|
|
21
22
|
|
|
@@ -49,7 +50,7 @@ class WeightedWorkScheduler(QuantConnect.Lean.Engine.DataFeeds.WorkScheduling.Wo
|
|
|
49
50
|
"""Execute the given action in all workers once"""
|
|
50
51
|
...
|
|
51
52
|
|
|
52
|
-
def queue_work(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], work_func: typing.Callable[[int], bool], weight_func: typing.Callable[[], int]) -> None:
|
|
53
|
+
def queue_work(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], work_func: typing.Callable[[int], bool], weight_func: typing.Callable[[], int]) -> None:
|
|
53
54
|
"""
|
|
54
55
|
Add a new work item to the queue
|
|
55
56
|
|
|
@@ -634,7 +634,7 @@ class CachingFutureChainProvider(System.Object, QuantConnect.Interfaces.IFutureC
|
|
|
634
634
|
"""
|
|
635
635
|
...
|
|
636
636
|
|
|
637
|
-
def get_future_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
637
|
+
def get_future_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
638
638
|
"""
|
|
639
639
|
Gets the list of future contracts for a given underlying symbol
|
|
640
640
|
|
|
@@ -749,7 +749,7 @@ class BacktestingChainProvider(System.Object, metaclass=abc.ABCMeta):
|
|
|
749
749
|
"""
|
|
750
750
|
...
|
|
751
751
|
|
|
752
|
-
def get_symbols(self, canonical_symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
752
|
+
def get_symbols(self, canonical_symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
753
753
|
"""
|
|
754
754
|
Get the contract symbols associated with the given canonical symbol and date
|
|
755
755
|
|
|
@@ -770,7 +770,7 @@ class BacktestingChainProvider(System.Object, metaclass=abc.ABCMeta):
|
|
|
770
770
|
...
|
|
771
771
|
|
|
772
772
|
@staticmethod
|
|
773
|
-
def is_contract_expired(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], date: typing.Union[datetime.datetime, datetime.date]) -> bool:
|
|
773
|
+
def is_contract_expired(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], date: typing.Union[datetime.datetime, datetime.date]) -> bool:
|
|
774
774
|
"""
|
|
775
775
|
Helper method to determine if a contract is expired for the requested date
|
|
776
776
|
|
|
@@ -783,7 +783,7 @@ class BacktestingChainProvider(System.Object, metaclass=abc.ABCMeta):
|
|
|
783
783
|
class BacktestingOptionChainProvider(QuantConnect.Lean.Engine.DataFeeds.BacktestingChainProvider, QuantConnect.Interfaces.IOptionChainProvider):
|
|
784
784
|
"""An implementation of IOptionChainProvider that reads the list of contracts from open interest zip data files"""
|
|
785
785
|
|
|
786
|
-
def get_option_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
786
|
+
def get_option_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
787
787
|
"""
|
|
788
788
|
Gets the list of option contracts for a given underlying symbol
|
|
789
789
|
|
|
@@ -801,7 +801,7 @@ class LiveOptionChainProvider(QuantConnect.Lean.Engine.DataFeeds.BacktestingOpti
|
|
|
801
801
|
from the Options Clearing Corporation (OCC) website
|
|
802
802
|
"""
|
|
803
803
|
|
|
804
|
-
def get_option_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
804
|
+
def get_option_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
805
805
|
"""
|
|
806
806
|
Gets the option chain associated with the underlying Symbol
|
|
807
807
|
|
|
@@ -1408,7 +1408,7 @@ class DataManager(System.Object, QuantConnect.Interfaces.IAlgorithmSubscriptionM
|
|
|
1408
1408
|
...
|
|
1409
1409
|
|
|
1410
1410
|
@overload
|
|
1411
|
-
def add(self, data_type: typing.Type, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], resolution: typing.Optional[QuantConnect.Resolution] = None, fill_forward: bool = True, extended_market_hours: bool = False, is_filtered_subscription: bool = True, is_internal_feed: bool = False, is_custom_data: bool = False, data_normalization_mode: QuantConnect.DataNormalizationMode = ..., data_mapping_mode: QuantConnect.DataMappingMode = ..., contract_depth_offset: int = 0) -> QuantConnect.Data.SubscriptionDataConfig:
|
|
1411
|
+
def add(self, data_type: typing.Type, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], resolution: typing.Optional[QuantConnect.Resolution] = None, fill_forward: bool = True, extended_market_hours: bool = False, is_filtered_subscription: bool = True, is_internal_feed: bool = False, is_custom_data: bool = False, data_normalization_mode: QuantConnect.DataNormalizationMode = ..., data_mapping_mode: QuantConnect.DataMappingMode = ..., contract_depth_offset: int = 0) -> QuantConnect.Data.SubscriptionDataConfig:
|
|
1412
1412
|
"""
|
|
1413
1413
|
Creates and adds a list of SubscriptionDataConfig for a given symbol and configuration.
|
|
1414
1414
|
Can optionally pass in desired subscription data type to use.
|
|
@@ -1417,7 +1417,7 @@ class DataManager(System.Object, QuantConnect.Interfaces.IAlgorithmSubscriptionM
|
|
|
1417
1417
|
...
|
|
1418
1418
|
|
|
1419
1419
|
@overload
|
|
1420
|
-
def add(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], resolution: typing.Optional[QuantConnect.Resolution] = None, fill_forward: bool = True, extended_market_hours: bool = False, is_filtered_subscription: bool = True, is_internal_feed: bool = False, is_custom_data: bool = False, subscription_data_types: typing.List[System.Tuple[typing.Type, QuantConnect.TickType]] = None, data_normalization_mode: QuantConnect.DataNormalizationMode = ..., data_mapping_mode: QuantConnect.DataMappingMode = ..., contract_depth_offset: int = 0) -> typing.List[QuantConnect.Data.SubscriptionDataConfig]:
|
|
1420
|
+
def add(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], resolution: typing.Optional[QuantConnect.Resolution] = None, fill_forward: bool = True, extended_market_hours: bool = False, is_filtered_subscription: bool = True, is_internal_feed: bool = False, is_custom_data: bool = False, subscription_data_types: typing.List[System.Tuple[typing.Type, QuantConnect.TickType]] = None, data_normalization_mode: QuantConnect.DataNormalizationMode = ..., data_mapping_mode: QuantConnect.DataMappingMode = ..., contract_depth_offset: int = 0) -> typing.List[QuantConnect.Data.SubscriptionDataConfig]:
|
|
1421
1421
|
"""
|
|
1422
1422
|
Creates and adds a list of SubscriptionDataConfig for a given symbol and configuration.
|
|
1423
1423
|
Can optionally pass in desired subscription data types to use.
|
|
@@ -1434,7 +1434,7 @@ class DataManager(System.Object, QuantConnect.Interfaces.IAlgorithmSubscriptionM
|
|
|
1434
1434
|
"""
|
|
1435
1435
|
...
|
|
1436
1436
|
|
|
1437
|
-
def get_subscription_data_configs(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract] = None, include_internal_configs: bool = False) -> typing.List[QuantConnect.Data.SubscriptionDataConfig]:
|
|
1437
|
+
def get_subscription_data_configs(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security] = None, include_internal_configs: bool = False) -> typing.List[QuantConnect.Data.SubscriptionDataConfig]:
|
|
1438
1438
|
"""Gets a list of all registered SubscriptionDataConfig for a given Symbol"""
|
|
1439
1439
|
...
|
|
1440
1440
|
|
|
@@ -1595,7 +1595,7 @@ class ZipDataCacheProvider(System.Object, QuantConnect.Interfaces.IDataCacheProv
|
|
|
1595
1595
|
class BacktestingFutureChainProvider(QuantConnect.Lean.Engine.DataFeeds.BacktestingChainProvider, QuantConnect.Interfaces.IFutureChainProvider):
|
|
1596
1596
|
"""An implementation of IFutureChainProvider that reads the list of contracts from open interest zip data files"""
|
|
1597
1597
|
|
|
1598
|
-
def get_future_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
1598
|
+
def get_future_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
1599
1599
|
"""
|
|
1600
1600
|
Gets the list of future contracts for a given underlying symbol
|
|
1601
1601
|
|
|
@@ -1606,7 +1606,7 @@ class BacktestingFutureChainProvider(QuantConnect.Lean.Engine.DataFeeds.Backtest
|
|
|
1606
1606
|
...
|
|
1607
1607
|
|
|
1608
1608
|
@staticmethod
|
|
1609
|
-
def get_symbol(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> QuantConnect.Symbol:
|
|
1609
|
+
def get_symbol(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> QuantConnect.Symbol:
|
|
1610
1610
|
"""
|
|
1611
1611
|
Helper method to get the symbol to use
|
|
1612
1612
|
|
|
@@ -1646,7 +1646,7 @@ class CurrencySubscriptionDataConfigManager(System.Object):
|
|
|
1646
1646
|
"""
|
|
1647
1647
|
...
|
|
1648
1648
|
|
|
1649
|
-
def get_subscription_data_config_to_remove(self, added_symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> QuantConnect.Data.SubscriptionDataConfig:
|
|
1649
|
+
def get_subscription_data_config_to_remove(self, added_symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> QuantConnect.Data.SubscriptionDataConfig:
|
|
1650
1650
|
"""
|
|
1651
1651
|
Will verify if there are any SubscriptionDataConfig to be removed
|
|
1652
1652
|
for a given added Symbol.
|
|
@@ -1711,7 +1711,7 @@ class DownloaderDataProvider(QuantConnect.Lean.Engine.DataFeeds.BaseDownloaderDa
|
|
|
1711
1711
|
...
|
|
1712
1712
|
|
|
1713
1713
|
@staticmethod
|
|
1714
|
-
def filter_and_group_download_data_by_symbol(download_data: typing.List[QuantConnect.Data.BaseData], symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], data_type: typing.Type, exchange_time_zone: typing.Any, data_time_zone: typing.Any, downloader_start_time_utc: typing.Union[datetime.datetime, datetime.date], downloader_end_time_utc: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[System.Linq.IGrouping[QuantConnect.Symbol, QuantConnect.Data.BaseData]]:
|
|
1714
|
+
def filter_and_group_download_data_by_symbol(download_data: typing.List[QuantConnect.Data.BaseData], symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], data_type: typing.Type, exchange_time_zone: typing.Any, data_time_zone: typing.Any, downloader_start_time_utc: typing.Union[datetime.datetime, datetime.date], downloader_end_time_utc: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[System.Linq.IGrouping[QuantConnect.Symbol, QuantConnect.Data.BaseData]]:
|
|
1715
1715
|
"""
|
|
1716
1716
|
Filters and groups the provided download data by symbol, based on specified criteria.
|
|
1717
1717
|
|
|
@@ -1726,7 +1726,7 @@ class DownloaderDataProvider(QuantConnect.Lean.Engine.DataFeeds.BaseDownloaderDa
|
|
|
1726
1726
|
"""
|
|
1727
1727
|
...
|
|
1728
1728
|
|
|
1729
|
-
def get_downloaded_data(self, downloader_data_parameters: typing.List[QuantConnect.DataDownloaderGetParameters], symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], exchange_time_zone: typing.Any, data_time_zone: typing.Any, data_type: typing.Type) -> typing.Iterable[System.Linq.IGrouping[QuantConnect.Symbol, QuantConnect.Data.BaseData]]:
|
|
1729
|
+
def get_downloaded_data(self, downloader_data_parameters: typing.List[QuantConnect.DataDownloaderGetParameters], symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], exchange_time_zone: typing.Any, data_time_zone: typing.Any, data_type: typing.Type) -> typing.Iterable[System.Linq.IGrouping[QuantConnect.Symbol, QuantConnect.Data.BaseData]]:
|
|
1730
1730
|
"""
|
|
1731
1731
|
Retrieves downloaded data grouped by symbol based on IDownloadProvider.
|
|
1732
1732
|
|
|
@@ -2187,7 +2187,7 @@ class DataQueueHandlerManager(System.Object, QuantConnect.Interfaces.IDataQueueH
|
|
|
2187
2187
|
"""
|
|
2188
2188
|
...
|
|
2189
2189
|
|
|
2190
|
-
def lookup_symbols(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], include_expired: bool, security_currency: str = None) -> typing.Iterable[QuantConnect.Symbol]:
|
|
2190
|
+
def lookup_symbols(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], include_expired: bool, security_currency: str = None) -> typing.Iterable[QuantConnect.Symbol]:
|
|
2191
2191
|
"""
|
|
2192
2192
|
Method returns a collection of Symbols that are available at the data source.
|
|
2193
2193
|
|
|
@@ -2259,7 +2259,7 @@ class LiveFutureChainProvider(QuantConnect.Lean.Engine.DataFeeds.BacktestingFutu
|
|
|
2259
2259
|
from an external source
|
|
2260
2260
|
"""
|
|
2261
2261
|
|
|
2262
|
-
def get_future_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
2262
|
+
def get_future_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
2263
2263
|
"""
|
|
2264
2264
|
Gets the list of future contracts for a given underlying symbol
|
|
2265
2265
|
|
|
@@ -2674,7 +2674,7 @@ class CachingOptionChainProvider(System.Object, QuantConnect.Interfaces.IOptionC
|
|
|
2674
2674
|
"""
|
|
2675
2675
|
...
|
|
2676
2676
|
|
|
2677
|
-
def get_option_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
2677
|
+
def get_option_contract_list(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], date: typing.Union[datetime.datetime, datetime.date]) -> typing.Iterable[QuantConnect.Symbol]:
|
|
2678
2678
|
"""
|
|
2679
2679
|
Gets the list of option contracts for a given underlying symbol
|
|
2680
2680
|
|
|
@@ -2711,7 +2711,7 @@ class BaseDataExchange(System.Object):
|
|
|
2711
2711
|
"""The enumerator this handler handles"""
|
|
2712
2712
|
...
|
|
2713
2713
|
|
|
2714
|
-
def __init__(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], enumerator: System.Collections.Generic.IEnumerator[QuantConnect.Data.BaseData], should_move_next: typing.Callable[[], bool] = None, handle_data: typing.Callable[[QuantConnect.Data.BaseData], typing.Any] = None) -> None:
|
|
2714
|
+
def __init__(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], enumerator: System.Collections.Generic.IEnumerator[QuantConnect.Data.BaseData], should_move_next: typing.Callable[[], bool] = None, handle_data: typing.Callable[[QuantConnect.Data.BaseData], typing.Any] = None) -> None:
|
|
2715
2715
|
"""
|
|
2716
2716
|
Initializes a new instance of the EnumeratorHandler class
|
|
2717
2717
|
|
|
@@ -2772,7 +2772,7 @@ class BaseDataExchange(System.Object):
|
|
|
2772
2772
|
...
|
|
2773
2773
|
|
|
2774
2774
|
@overload
|
|
2775
|
-
def add_enumerator(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], enumerator: System.Collections.Generic.IEnumerator[QuantConnect.Data.BaseData], should_move_next: typing.Callable[[], bool] = None, enumerator_finished: typing.Callable[[QuantConnect.Lean.Engine.DataFeeds.BaseDataExchange.EnumeratorHandler], typing.Any] = None, handle_data: typing.Callable[[QuantConnect.Data.BaseData], typing.Any] = None) -> None:
|
|
2775
|
+
def add_enumerator(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], enumerator: System.Collections.Generic.IEnumerator[QuantConnect.Data.BaseData], should_move_next: typing.Callable[[], bool] = None, enumerator_finished: typing.Callable[[QuantConnect.Lean.Engine.DataFeeds.BaseDataExchange.EnumeratorHandler], typing.Any] = None, handle_data: typing.Callable[[QuantConnect.Data.BaseData], typing.Any] = None) -> None:
|
|
2776
2776
|
"""
|
|
2777
2777
|
Adds the enumerator to this exchange. If it has already been added
|
|
2778
2778
|
then it will remain registered in the exchange only once
|
|
@@ -2786,7 +2786,7 @@ class BaseDataExchange(System.Object):
|
|
|
2786
2786
|
"""
|
|
2787
2787
|
...
|
|
2788
2788
|
|
|
2789
|
-
def remove_enumerator(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> QuantConnect.Lean.Engine.DataFeeds.BaseDataExchange.EnumeratorHandler:
|
|
2789
|
+
def remove_enumerator(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> QuantConnect.Lean.Engine.DataFeeds.BaseDataExchange.EnumeratorHandler:
|
|
2790
2790
|
"""
|
|
2791
2791
|
Removes and returns enumerator handler with the specified symbol.
|
|
2792
2792
|
The removed handler is returned, null if not found
|
|
@@ -95,7 +95,7 @@ class SynchronizingHistoryProvider(QuantConnect.Data.HistoryProviderBase, metacl
|
|
|
95
95
|
...
|
|
96
96
|
|
|
97
97
|
@staticmethod
|
|
98
|
-
def get_security_exchange(exchange: QuantConnect.Securities.SecurityExchange, data_type: typing.Type, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> QuantConnect.Securities.SecurityExchange:
|
|
98
|
+
def get_security_exchange(exchange: QuantConnect.Securities.SecurityExchange, data_type: typing.Type, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> QuantConnect.Securities.SecurityExchange:
|
|
99
99
|
"""
|
|
100
100
|
Retrieves the appropriate SecurityExchange based on the data type and symbol.
|
|
101
101
|
|
|
@@ -1117,33 +1117,6 @@ class BacktestingResultHandler(QuantConnect.Lean.Engine.Results.BaseResultsHandl
|
|
|
1117
1117
|
"""Creates a new instance"""
|
|
1118
1118
|
...
|
|
1119
1119
|
|
|
1120
|
-
def add_to_log_store(self, message: str) -> None:
|
|
1121
|
-
"""
|
|
1122
|
-
Add message to LogStore
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
This codeEntityType is protected.
|
|
1126
|
-
|
|
1127
|
-
:param message: Message to add
|
|
1128
|
-
"""
|
|
1129
|
-
...
|
|
1130
|
-
|
|
1131
|
-
def algorithm_name_updated(self, name: str) -> None:
|
|
1132
|
-
"""
|
|
1133
|
-
Handles updates to the algorithm's name
|
|
1134
|
-
|
|
1135
|
-
:param name: The new name
|
|
1136
|
-
"""
|
|
1137
|
-
...
|
|
1138
|
-
|
|
1139
|
-
def algorithm_tags_updated(self, tags: System.Collections.Generic.HashSet[str]) -> None:
|
|
1140
|
-
"""
|
|
1141
|
-
Sends a packet communicating an update to the algorithm's tags
|
|
1142
|
-
|
|
1143
|
-
:param tags: The new tags
|
|
1144
|
-
"""
|
|
1145
|
-
...
|
|
1146
|
-
|
|
1147
1120
|
def brokerage_message(self, brokerage_message_event: QuantConnect.Brokerages.BrokerageMessageEvent) -> None:
|
|
1148
1121
|
"""
|
|
1149
1122
|
Process brokerage message events
|
|
@@ -1497,17 +1470,6 @@ class LiveTradingResultHandler(QuantConnect.Lean.Engine.Results.BaseResultsHandl
|
|
|
1497
1470
|
"""Creates a new instance"""
|
|
1498
1471
|
...
|
|
1499
1472
|
|
|
1500
|
-
def add_to_log_store(self, message: str) -> None:
|
|
1501
|
-
"""
|
|
1502
|
-
Save an algorithm message to the log store. Uses a different timestamped method of adding messaging to interweve debug and logging messages.
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
This codeEntityType is protected.
|
|
1506
|
-
|
|
1507
|
-
:param message: String message to send to browser.
|
|
1508
|
-
"""
|
|
1509
|
-
...
|
|
1510
|
-
|
|
1511
1473
|
def brokerage_message(self, brokerage_message_event: QuantConnect.Brokerages.BrokerageMessageEvent) -> None:
|
|
1512
1474
|
"""
|
|
1513
1475
|
Process brokerage message events
|
|
@@ -8,8 +8,6 @@ import System
|
|
|
8
8
|
import System.Collections.Concurrent
|
|
9
9
|
import System.Collections.Generic
|
|
10
10
|
|
|
11
|
-
JsonConverter = typing.Any
|
|
12
|
-
|
|
13
11
|
|
|
14
12
|
class Notification(System.Object, metaclass=abc.ABCMeta):
|
|
15
13
|
"""Local/desktop implementation of messaging system for Lean Engine."""
|
|
@@ -325,7 +323,7 @@ class NotificationExtensions(System.Object):
|
|
|
325
323
|
...
|
|
326
324
|
|
|
327
325
|
|
|
328
|
-
class NotificationJsonConverter
|
|
326
|
+
class NotificationJsonConverter:
|
|
329
327
|
"""Defines a JsonConverter to be used when deserializing to the Notification class."""
|
|
330
328
|
|
|
331
329
|
@property
|
|
@@ -7,8 +7,6 @@ import QuantConnect.Optimizer.Parameters
|
|
|
7
7
|
import System
|
|
8
8
|
import System.Collections.Generic
|
|
9
9
|
|
|
10
|
-
JsonConverter = typing.Any
|
|
11
|
-
|
|
12
10
|
QuantConnect_Optimizer_Parameters_OptimizationParameterEnumerator_T = typing.TypeVar("QuantConnect_Optimizer_Parameters_OptimizationParameterEnumerator_T")
|
|
13
11
|
|
|
14
12
|
|
|
@@ -206,7 +204,7 @@ class OptimizationParameterEnumerator(typing.Generic[QuantConnect_Optimizer_Para
|
|
|
206
204
|
...
|
|
207
205
|
|
|
208
206
|
|
|
209
|
-
class OptimizationParameterJsonConverter
|
|
207
|
+
class OptimizationParameterJsonConverter:
|
|
210
208
|
"""
|
|
211
209
|
Override OptimizationParameter deserialization method.
|
|
212
210
|
Can handle OptimizationStepParameter instances
|
|
@@ -676,6 +676,41 @@ class GDAXFeeModel(QuantConnect.Orders.Fees.CoinbaseFeeModel):
|
|
|
676
676
|
"""
|
|
677
677
|
|
|
678
678
|
|
|
679
|
+
class dYdXFeeModel(QuantConnect.Orders.Fees.FeeModel):
|
|
680
|
+
"""dYdX fee model implementation"""
|
|
681
|
+
|
|
682
|
+
def __init__(self, m_fee: float = ..., t_fee: float = ...) -> None:
|
|
683
|
+
"""
|
|
684
|
+
Creates Binance fee model setting fees values
|
|
685
|
+
|
|
686
|
+
:param m_fee: Maker fee value
|
|
687
|
+
:param t_fee: Taker fee value
|
|
688
|
+
"""
|
|
689
|
+
...
|
|
690
|
+
|
|
691
|
+
def get_fee(self, order: QuantConnect.Orders.Order) -> float:
|
|
692
|
+
"""
|
|
693
|
+
Gets the fee factor for the given order
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
This codeEntityType is protected.
|
|
697
|
+
|
|
698
|
+
:param order: The order to get the fee factor for
|
|
699
|
+
:returns: The fee factor for the given order.
|
|
700
|
+
"""
|
|
701
|
+
...
|
|
702
|
+
|
|
703
|
+
def get_order_fee(self, parameters: QuantConnect.Orders.Fees.OrderFeeParameters) -> QuantConnect.Orders.Fees.OrderFee:
|
|
704
|
+
"""
|
|
705
|
+
Gets the order fee associated with the specified order.
|
|
706
|
+
|
|
707
|
+
:param parameters: A OrderFeeParameters object
|
|
708
|
+
containing the security and order
|
|
709
|
+
:returns: The cost of the order in a CashAmount instance.
|
|
710
|
+
"""
|
|
711
|
+
...
|
|
712
|
+
|
|
713
|
+
|
|
679
714
|
class TDAmeritradeFeeModel(QuantConnect.Orders.Fees.FeeModel):
|
|
680
715
|
"""Provides an implementation of FeeModel that models TDAmeritrade order fees"""
|
|
681
716
|
|