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.
Files changed (62) hide show
  1. Common/Data/Consolidators/__init__.pyi +1 -1
  2. QuantConnect/Algorithm/Framework/Alphas/__init__.pyi +18 -18
  3. QuantConnect/Algorithm/Framework/Execution/__init__.pyi +2 -2
  4. QuantConnect/Algorithm/Framework/Portfolio/__init__.pyi +14 -14
  5. QuantConnect/Algorithm/Framework/Selection/__init__.pyi +3 -3
  6. QuantConnect/Algorithm/__init__.pyi +365 -310
  7. QuantConnect/AlgorithmFactory/Python/Wrappers/__init__.pyi +12 -11
  8. QuantConnect/Api/Serialization/__init__.pyi +1 -3
  9. QuantConnect/Api/__init__.pyi +67 -8
  10. QuantConnect/Benchmarks/__init__.pyi +1 -1
  11. QuantConnect/Brokerages/Authentication/__init__.pyi +10 -2
  12. QuantConnect/Brokerages/LevelOneOrderBook/__init__.pyi +6 -5
  13. QuantConnect/Brokerages/__init__.pyi +82 -11
  14. QuantConnect/Commands/__init__.pyi +3 -2
  15. QuantConnect/Data/Auxiliary/__init__.pyi +13 -13
  16. QuantConnect/Data/Common/__init__.pyi +1 -1
  17. QuantConnect/Data/Custom/Tiingo/__init__.pyi +2 -1
  18. QuantConnect/Data/Fundamental/__init__.pyi +11 -12
  19. QuantConnect/Data/Market/__init__.pyi +42 -42
  20. QuantConnect/Data/UniverseSelection/__init__.pyi +29 -29
  21. QuantConnect/Data/__init__.pyi +44 -45
  22. QuantConnect/DataSource/__init__.pyi +7 -7
  23. QuantConnect/Indicators/__init__.pyi +238 -98
  24. QuantConnect/Interfaces/__init__.pyi +24 -23
  25. QuantConnect/Lean/Engine/DataFeeds/Enumerators/__init__.pyi +1 -1
  26. QuantConnect/Lean/Engine/DataFeeds/Queues/__init__.pyi +2 -1
  27. QuantConnect/Lean/Engine/DataFeeds/WorkScheduling/__init__.pyi +3 -2
  28. QuantConnect/Lean/Engine/DataFeeds/__init__.pyi +19 -19
  29. QuantConnect/Lean/Engine/HistoricalData/__init__.pyi +1 -1
  30. QuantConnect/Lean/Engine/Results/__init__.pyi +0 -38
  31. QuantConnect/Notifications/__init__.pyi +1 -3
  32. QuantConnect/Optimizer/Parameters/__init__.pyi +1 -3
  33. QuantConnect/Orders/Fees/__init__.pyi +35 -0
  34. QuantConnect/Orders/__init__.pyi +75 -28
  35. QuantConnect/Python/__init__.pyi +1 -1
  36. QuantConnect/Report/__init__.pyi +3 -5
  37. QuantConnect/Research/__init__.pyi +17 -16
  38. QuantConnect/Scheduling/__init__.pyi +17 -17
  39. QuantConnect/Securities/Cfd/__init__.pyi +2 -2
  40. QuantConnect/Securities/Crypto/__init__.pyi +2 -2
  41. QuantConnect/Securities/CryptoFuture/__init__.pyi +1 -1
  42. QuantConnect/Securities/Equity/__init__.pyi +1 -1
  43. QuantConnect/Securities/Forex/__init__.pyi +1 -1
  44. QuantConnect/Securities/Future/__init__.pyi +8 -8
  45. QuantConnect/Securities/FutureOption/__init__.pyi +9 -9
  46. QuantConnect/Securities/Index/__init__.pyi +2 -2
  47. QuantConnect/Securities/IndexOption/__init__.pyi +3 -3
  48. QuantConnect/Securities/Option/StrategyMatcher/__init__.pyi +6 -6
  49. QuantConnect/Securities/Option/__init__.pyi +54 -54
  50. QuantConnect/Securities/Positions/__init__.pyi +6 -6
  51. QuantConnect/Securities/__init__.pyi +80 -81
  52. QuantConnect/Statistics/__init__.pyi +2 -2
  53. QuantConnect/Util/__init__.pyi +36 -37
  54. QuantConnect/__init__.pyi +69 -68
  55. System/ComponentModel/DataAnnotations/__init__.pyi +1 -1
  56. System/ComponentModel/__init__.pyi +1 -1
  57. System/IO/__init__.pyi +12 -0
  58. System/Threading/__init__.pyi +3 -3
  59. {quantconnect_stubs-17397.dist-info → quantconnect_stubs-17412.dist-info}/METADATA +1 -1
  60. {quantconnect_stubs-17397.dist-info → quantconnect_stubs-17412.dist-info}/RECORD +62 -62
  61. {quantconnect_stubs-17397.dist-info → quantconnect_stubs-17412.dist-info}/WHEEL +0 -0
  62. {quantconnect_stubs-17397.dist-info → quantconnect_stubs-17412.dist-info}/top_level.txt +0 -0
@@ -324,7 +324,7 @@ class Option(QuantConnect.Securities.Security, QuantConnect.Securities.IDerivati
324
324
  ...
325
325
 
326
326
  @overload
327
- def __init__(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], exchange_hours: QuantConnect.Securities.SecurityExchangeHours, quote_currency: QuantConnect.Securities.Cash, symbol_properties: QuantConnect.Securities.Option.OptionSymbolProperties, currency_converter: QuantConnect.Securities.ICurrencyConverter, registered_types: QuantConnect.Securities.IRegisteredSecurityDataTypesProvider, security_cache: QuantConnect.Securities.SecurityCache, underlying: QuantConnect.Securities.Security) -> None:
327
+ def __init__(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], exchange_hours: QuantConnect.Securities.SecurityExchangeHours, quote_currency: QuantConnect.Securities.Cash, symbol_properties: QuantConnect.Securities.Option.OptionSymbolProperties, currency_converter: QuantConnect.Securities.ICurrencyConverter, registered_types: QuantConnect.Securities.IRegisteredSecurityDataTypesProvider, security_cache: QuantConnect.Securities.SecurityCache, underlying: QuantConnect.Securities.Security) -> None:
328
328
  """
329
329
  Constructor for the option security
330
330
 
@@ -341,7 +341,7 @@ class Option(QuantConnect.Securities.Security, QuantConnect.Securities.IDerivati
341
341
  ...
342
342
 
343
343
  @overload
344
- def __init__(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], quote_currency: QuantConnect.Securities.Cash, symbol_properties: QuantConnect.Securities.SymbolProperties, exchange: QuantConnect.Securities.SecurityExchange, cache: QuantConnect.Securities.SecurityCache, portfolio_model: QuantConnect.Securities.ISecurityPortfolioModel, fill_model: QuantConnect.Orders.Fills.IFillModel, fee_model: QuantConnect.Orders.Fees.IFeeModel, slippage_model: QuantConnect.Orders.Slippage.ISlippageModel, settlement_model: QuantConnect.Securities.ISettlementModel, volatility_model: QuantConnect.Securities.IVolatilityModel, buying_power_model: QuantConnect.Securities.IBuyingPowerModel, data_filter: QuantConnect.Securities.Interfaces.ISecurityDataFilter, price_variation_model: QuantConnect.Securities.IPriceVariationModel, currency_converter: QuantConnect.Securities.ICurrencyConverter, registered_types_provider: QuantConnect.Securities.IRegisteredSecurityDataTypesProvider, underlying: QuantConnect.Securities.Security) -> None:
344
+ def __init__(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], quote_currency: QuantConnect.Securities.Cash, symbol_properties: QuantConnect.Securities.SymbolProperties, exchange: QuantConnect.Securities.SecurityExchange, cache: QuantConnect.Securities.SecurityCache, portfolio_model: QuantConnect.Securities.ISecurityPortfolioModel, fill_model: QuantConnect.Orders.Fills.IFillModel, fee_model: QuantConnect.Orders.Fees.IFeeModel, slippage_model: QuantConnect.Orders.Slippage.ISlippageModel, settlement_model: QuantConnect.Securities.ISettlementModel, volatility_model: QuantConnect.Securities.IVolatilityModel, buying_power_model: QuantConnect.Securities.IBuyingPowerModel, data_filter: QuantConnect.Securities.Interfaces.ISecurityDataFilter, price_variation_model: QuantConnect.Securities.IPriceVariationModel, currency_converter: QuantConnect.Securities.ICurrencyConverter, registered_types_provider: QuantConnect.Securities.IRegisteredSecurityDataTypesProvider, underlying: QuantConnect.Securities.Security) -> None:
345
345
  """
346
346
  Creates instance of the Option class.
347
347
 
@@ -610,7 +610,7 @@ class OptionSymbol(System.Object):
610
610
  """Static class contains common utility methods specific to symbols representing the option contracts"""
611
611
 
612
612
  @staticmethod
613
- def get_last_day_of_trading(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> datetime.datetime:
613
+ def get_last_day_of_trading(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> datetime.datetime:
614
614
  """
615
615
  Returns the last trading date for the option contract
616
616
 
@@ -619,7 +619,7 @@ class OptionSymbol(System.Object):
619
619
  ...
620
620
 
621
621
  @staticmethod
622
- def get_settlement_date_time(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> datetime.datetime:
622
+ def get_settlement_date_time(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> datetime.datetime:
623
623
  """
624
624
  Returns the settlement date time of the option contract.
625
625
 
@@ -629,7 +629,7 @@ class OptionSymbol(System.Object):
629
629
  ...
630
630
 
631
631
  @staticmethod
632
- def is_option_contract_expired(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], current_time_utc: typing.Union[datetime.datetime, datetime.date]) -> bool:
632
+ def is_option_contract_expired(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], current_time_utc: typing.Union[datetime.datetime, datetime.date]) -> bool:
633
633
  """
634
634
  Returns true if the option contract is expired at the specified time
635
635
 
@@ -640,7 +640,7 @@ class OptionSymbol(System.Object):
640
640
  ...
641
641
 
642
642
  @staticmethod
643
- def is_standard(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> bool:
643
+ def is_standard(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> bool:
644
644
  """
645
645
  Returns true if the option is a standard contract that expires 3rd Friday of the month
646
646
 
@@ -649,7 +649,7 @@ class OptionSymbol(System.Object):
649
649
  ...
650
650
 
651
651
  @staticmethod
652
- def is_standard_contract(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> bool:
652
+ def is_standard_contract(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> bool:
653
653
  """
654
654
  Returns true if the option is a standard contract that expires 3rd Friday of the month
655
655
 
@@ -658,7 +658,7 @@ class OptionSymbol(System.Object):
658
658
  ...
659
659
 
660
660
  @staticmethod
661
- def is_weekly(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> bool:
661
+ def is_weekly(symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> bool:
662
662
  """
663
663
  Returns true if the option is a weekly contract that expires on Friday , except 3rd Friday of the month
664
664
 
@@ -719,7 +719,7 @@ class OptionStrategy(System.Object):
719
719
  ...
720
720
 
721
721
  @staticmethod
722
- def create(quantity: int, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], order_price: typing.Optional[float] = None) -> QuantConnect.Securities.Option.OptionStrategy.OptionLegData:
722
+ def create(quantity: int, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], order_price: typing.Optional[float] = None) -> QuantConnect.Securities.Option.OptionStrategy.OptionLegData:
723
723
  """Creates a new instance of OptionLegData from the specified parameters"""
724
724
  ...
725
725
 
@@ -732,7 +732,7 @@ class OptionStrategy(System.Object):
732
732
 
733
733
  @staticmethod
734
734
  @overload
735
- def create(quantity: int, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], order_price: typing.Optional[float] = None) -> QuantConnect.Securities.Option.OptionStrategy.UnderlyingLegData:
735
+ def create(quantity: int, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], order_price: typing.Optional[float] = None) -> QuantConnect.Securities.Option.OptionStrategy.UnderlyingLegData:
736
736
  """Creates a new instance of UnderlyingLegData for the specified quantity of underlying shares."""
737
737
  ...
738
738
 
@@ -803,7 +803,7 @@ class OptionStrategies(System.Object):
803
803
  """
804
804
 
805
805
  @staticmethod
806
- def bear_call_ladder(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], lower_strike: float, middle_strike: float, higher_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
806
+ def bear_call_ladder(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], lower_strike: float, middle_strike: float, higher_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
807
807
  """
808
808
  Method creates new Bear Call Ladder strategy, that consists of three calls with the same expiration but different strikes.
809
809
  The strike price of the short call is below the strikes of the two long calls.
@@ -818,7 +818,7 @@ class OptionStrategies(System.Object):
818
818
  ...
819
819
 
820
820
  @staticmethod
821
- def bear_call_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], leg_1_strike: float, leg_2_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
821
+ def bear_call_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], leg_1_strike: float, leg_2_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
822
822
  """
823
823
  Method creates new Bear Call Spread strategy, that consists of two calls with the same expiration but different strikes.
824
824
  The strike price of the short call is below the strike of the long call. This is a credit spread.
@@ -832,7 +832,7 @@ class OptionStrategies(System.Object):
832
832
  ...
833
833
 
834
834
  @staticmethod
835
- def bear_put_ladder(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
835
+ def bear_put_ladder(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
836
836
  """
837
837
  Method creates new Bear Put Ladder strategy, that consists of three puts with the same expiration but different strikes.
838
838
  The strike price of the long put is above the strikes of the two short puts.
@@ -847,7 +847,7 @@ class OptionStrategies(System.Object):
847
847
  ...
848
848
 
849
849
  @staticmethod
850
- def bear_put_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], leg_1_strike: float, leg_2_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
850
+ def bear_put_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], leg_1_strike: float, leg_2_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
851
851
  """
852
852
  Method creates new Bear Put Spread strategy, that consists of two puts with the same expiration but different strikes.
853
853
  The strike price of the short put is below the strike of the long put. This is a debit spread.
@@ -861,7 +861,7 @@ class OptionStrategies(System.Object):
861
861
  ...
862
862
 
863
863
  @staticmethod
864
- def box_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], higher_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
864
+ def box_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], higher_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
865
865
  """
866
866
  Creates a Box Spread strategy which consists of a long call and a short put (buy side) of the same strikes,
867
867
  coupled with a short call and a long put (sell side) of higher but same strikes. All options have the same expiry.
@@ -875,7 +875,7 @@ class OptionStrategies(System.Object):
875
875
  ...
876
876
 
877
877
  @staticmethod
878
- def bull_call_ladder(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], lower_strike: float, middle_strike: float, higher_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
878
+ def bull_call_ladder(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], lower_strike: float, middle_strike: float, higher_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
879
879
  """
880
880
  Method creates new Bull Call Ladder strategy, that consists of three calls with the same expiration but different strikes.
881
881
  The strike price of the long call is below the strikes of the two short calls.
@@ -890,7 +890,7 @@ class OptionStrategies(System.Object):
890
890
  ...
891
891
 
892
892
  @staticmethod
893
- def bull_call_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], leg_1_strike: float, leg_2_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
893
+ def bull_call_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], leg_1_strike: float, leg_2_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
894
894
  """
895
895
  Method creates new Bull Call Spread strategy, that consists of two calls with the same expiration but different strikes.
896
896
  The strike price of the short call is higher than the strike of the long call. This is a debit spread.
@@ -904,7 +904,7 @@ class OptionStrategies(System.Object):
904
904
  ...
905
905
 
906
906
  @staticmethod
907
- def bull_put_ladder(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
907
+ def bull_put_ladder(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
908
908
  """
909
909
  Method creates new Bull Put Ladder strategy, that consists of three puts with the same expiration but different strikes.
910
910
  The strike price of the short put is above the strikes of the two long puts.
@@ -919,7 +919,7 @@ class OptionStrategies(System.Object):
919
919
  ...
920
920
 
921
921
  @staticmethod
922
- def bull_put_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], leg_1_strike: float, leg_2_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
922
+ def bull_put_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], leg_1_strike: float, leg_2_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
923
923
  """
924
924
  Method creates new Bull Put Spread strategy, that consists of two puts with the same expiration but different strikes.
925
925
  The strike price of the short put is above the strike of the long put. This is a credit spread.
@@ -933,7 +933,7 @@ class OptionStrategies(System.Object):
933
933
  ...
934
934
 
935
935
  @staticmethod
936
- def butterfly_call(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
936
+ def butterfly_call(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
937
937
  """
938
938
  Creates a new Butterfly Call strategy that consists of two short calls at a middle strike,
939
939
  and one long call each at a lower and upper strike.
@@ -949,7 +949,7 @@ class OptionStrategies(System.Object):
949
949
  ...
950
950
 
951
951
  @staticmethod
952
- def butterfly_put(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
952
+ def butterfly_put(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
953
953
  """
954
954
  Creates a new Butterfly Put strategy that consists of two short puts at a middle strike,
955
955
  and one long put each at a lower and upper strike.
@@ -965,7 +965,7 @@ class OptionStrategies(System.Object):
965
965
  ...
966
966
 
967
967
  @staticmethod
968
- def call_backspread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], lower_strike: float, higher_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
968
+ def call_backspread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], lower_strike: float, higher_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
969
969
  """
970
970
  Method creates new Long Call Backspread strategy, that consists of two calls with the same expiration but different strikes.
971
971
  It involves selling the lower strike call, while buying twice the number of the higher strike call.
@@ -979,7 +979,7 @@ class OptionStrategies(System.Object):
979
979
  ...
980
980
 
981
981
  @staticmethod
982
- def call_butterfly(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
982
+ def call_butterfly(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
983
983
  """
984
984
  Method creates new Call Butterfly strategy, that consists of two short calls at a middle strike, and one long call each at a lower and upper strike.
985
985
  The upper and lower strikes must both be equidistant from the middle strike.
@@ -994,7 +994,7 @@ class OptionStrategies(System.Object):
994
994
  ...
995
995
 
996
996
  @staticmethod
997
- def call_calendar_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, near_expiration: typing.Union[datetime.datetime, datetime.date], far_expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
997
+ def call_calendar_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, near_expiration: typing.Union[datetime.datetime, datetime.date], far_expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
998
998
  """
999
999
  Creates new Call Calendar Spread strategy which consists of a short and a long call
1000
1000
  with the same strikes but with the long call having a further expiration date.
@@ -1008,7 +1008,7 @@ class OptionStrategies(System.Object):
1008
1008
  ...
1009
1009
 
1010
1010
  @staticmethod
1011
- def conversion(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1011
+ def conversion(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1012
1012
  """
1013
1013
  Creates a Conversion strategy that consists of buying 1 put contract, 1 lot of the underlying and selling 1 call contract.
1014
1014
  Put and call must have the same expiration date, underlying (multiplier), and strike price.
@@ -1021,7 +1021,7 @@ class OptionStrategies(System.Object):
1021
1021
  ...
1022
1022
 
1023
1023
  @staticmethod
1024
- def covered_call(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1024
+ def covered_call(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1025
1025
  """
1026
1026
  Creates a Covered Call strategy that consists of selling one call contract and buying 1 lot of the underlying.
1027
1027
 
@@ -1033,7 +1033,7 @@ class OptionStrategies(System.Object):
1033
1033
  ...
1034
1034
 
1035
1035
  @staticmethod
1036
- def covered_put(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1036
+ def covered_put(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1037
1037
  """
1038
1038
  Creates a Covered Put strategy that consists of selling 1 put contract and 1 lot of the underlying.
1039
1039
 
@@ -1045,7 +1045,7 @@ class OptionStrategies(System.Object):
1045
1045
  ...
1046
1046
 
1047
1047
  @staticmethod
1048
- def iron_butterfly(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], otm_put_strike: float, atm_strike: float, otm_call_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1048
+ def iron_butterfly(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], otm_put_strike: float, atm_strike: float, otm_call_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1049
1049
  """
1050
1050
  Creates a new Iron Butterfly strategy which consists of a short ATM call, a short ATM put, a long OTM call, and a long OTM put.
1051
1051
  all with the same expiration date and with increasing strikes prices in the mentioned order.
@@ -1060,7 +1060,7 @@ class OptionStrategies(System.Object):
1060
1060
  ...
1061
1061
 
1062
1062
  @staticmethod
1063
- def iron_condor(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], long_put_strike: float, short_put_strike: float, short_call_strike: float, long_call_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1063
+ def iron_condor(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], long_put_strike: float, short_put_strike: float, short_call_strike: float, long_call_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1064
1064
  """
1065
1065
  Creates a new Iron Condor strategy which consists of a long put, a short put, a short call and a long option,
1066
1066
  all with the same expiration date and with increasing strikes prices in the mentioned order.
@@ -1076,7 +1076,7 @@ class OptionStrategies(System.Object):
1076
1076
  ...
1077
1077
 
1078
1078
  @staticmethod
1079
- def jelly_roll(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, near_expiration: typing.Union[datetime.datetime, datetime.date], far_expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1079
+ def jelly_roll(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, near_expiration: typing.Union[datetime.datetime, datetime.date], far_expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1080
1080
  """
1081
1081
  Creates new Jelly Roll strategy which combines a long call calendar spread and a short put calendar spread
1082
1082
  with the same strikes and the same pair of expiration dates.
@@ -1090,7 +1090,7 @@ class OptionStrategies(System.Object):
1090
1090
  ...
1091
1091
 
1092
1092
  @staticmethod
1093
- def naked_call(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1093
+ def naked_call(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1094
1094
  """
1095
1095
  Creates a Naked Call strategy that consists of selling 1 call contract.
1096
1096
 
@@ -1102,7 +1102,7 @@ class OptionStrategies(System.Object):
1102
1102
  ...
1103
1103
 
1104
1104
  @staticmethod
1105
- def naked_put(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1105
+ def naked_put(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1106
1106
  """
1107
1107
  Creates a Naked Put strategy that consists of selling 1 put contract.
1108
1108
 
@@ -1114,7 +1114,7 @@ class OptionStrategies(System.Object):
1114
1114
  ...
1115
1115
 
1116
1116
  @staticmethod
1117
- def protective_call(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1117
+ def protective_call(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1118
1118
  """
1119
1119
  Creates a Protective Call strategy that consists of buying one call contract and selling 1 lot of the underlying.
1120
1120
 
@@ -1126,7 +1126,7 @@ class OptionStrategies(System.Object):
1126
1126
  ...
1127
1127
 
1128
1128
  @staticmethod
1129
- def protective_collar(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], call_strike: float, put_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1129
+ def protective_collar(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], call_strike: float, put_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1130
1130
  """
1131
1131
  Creates a Protective Collar strategy that consists of buying 1 put contract and 1 lot of the underlying.
1132
1132
 
@@ -1139,7 +1139,7 @@ class OptionStrategies(System.Object):
1139
1139
  ...
1140
1140
 
1141
1141
  @staticmethod
1142
- def protective_put(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1142
+ def protective_put(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1143
1143
  """
1144
1144
  Creates a Protective Put strategy that consists of buying 1 put contract and 1 lot of the underlying.
1145
1145
 
@@ -1151,7 +1151,7 @@ class OptionStrategies(System.Object):
1151
1151
  ...
1152
1152
 
1153
1153
  @staticmethod
1154
- def put_backspread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], higher_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1154
+ def put_backspread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], higher_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1155
1155
  """
1156
1156
  Method creates new Long Put Backspread strategy, that consists of two puts with the same expiration but different strikes.
1157
1157
  It involves selling the higher strike put, while buying twice the number of the lower strike put.
@@ -1165,7 +1165,7 @@ class OptionStrategies(System.Object):
1165
1165
  ...
1166
1166
 
1167
1167
  @staticmethod
1168
- def put_butterfly(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1168
+ def put_butterfly(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1169
1169
  """
1170
1170
  Method creates new Put Butterfly strategy, that consists of two short puts at a middle strike, and one long put each at a lower and upper strike.
1171
1171
  The upper and lower strikes must both be equidistant from the middle strike.
@@ -1180,7 +1180,7 @@ class OptionStrategies(System.Object):
1180
1180
  ...
1181
1181
 
1182
1182
  @staticmethod
1183
- def put_calendar_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, near_expiration: typing.Union[datetime.datetime, datetime.date], far_expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1183
+ def put_calendar_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, near_expiration: typing.Union[datetime.datetime, datetime.date], far_expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1184
1184
  """
1185
1185
  Creates new Put Calendar Spread strategy which consists of a short and a long put
1186
1186
  with the same strikes but with the long put having a further expiration date.
@@ -1194,7 +1194,7 @@ class OptionStrategies(System.Object):
1194
1194
  ...
1195
1195
 
1196
1196
  @staticmethod
1197
- def reverse_conversion(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1197
+ def reverse_conversion(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1198
1198
  """
1199
1199
  Creates a Reverse Conversion strategy that consists of buying 1 put contract and 1 lot of the underlying.
1200
1200
 
@@ -1206,7 +1206,7 @@ class OptionStrategies(System.Object):
1206
1206
  ...
1207
1207
 
1208
1208
  @staticmethod
1209
- def short_box_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], higher_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1209
+ def short_box_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], higher_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1210
1210
  """
1211
1211
  Creates a Short Box Spread strategy which consists of a long call and a short put (buy side) of the same strikes,
1212
1212
  coupled with a short call and a long put (sell side) of lower but same strikes. All options have the same expiry.
@@ -1220,7 +1220,7 @@ class OptionStrategies(System.Object):
1220
1220
  ...
1221
1221
 
1222
1222
  @staticmethod
1223
- def short_butterfly_call(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1223
+ def short_butterfly_call(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1224
1224
  """
1225
1225
  Creates a new Butterfly Call strategy that consists of two long calls at a middle strike,
1226
1226
  and one short call each at a lower and upper strike.
@@ -1236,7 +1236,7 @@ class OptionStrategies(System.Object):
1236
1236
  ...
1237
1237
 
1238
1238
  @staticmethod
1239
- def short_butterfly_put(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1239
+ def short_butterfly_put(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], higher_strike: float, middle_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1240
1240
  """
1241
1241
  Creates a new Butterfly Put strategy that consists of two long puts at a middle strike,
1242
1242
  and one short put each at a lower and upper strike.
@@ -1252,7 +1252,7 @@ class OptionStrategies(System.Object):
1252
1252
  ...
1253
1253
 
1254
1254
  @staticmethod
1255
- def short_call_backspread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], lower_strike: float, higher_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1255
+ def short_call_backspread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], lower_strike: float, higher_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1256
1256
  """
1257
1257
  Method creates new Short Call Backspread strategy, that consists of two calls with the same expiration but different strikes.
1258
1258
  It involves buying the lower strike call, while shorting twice the number of the higher strike call.
@@ -1265,7 +1265,7 @@ class OptionStrategies(System.Object):
1265
1265
  ...
1266
1266
 
1267
1267
  @staticmethod
1268
- def short_call_calendar_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, near_expiration: typing.Union[datetime.datetime, datetime.date], far_expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1268
+ def short_call_calendar_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, near_expiration: typing.Union[datetime.datetime, datetime.date], far_expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1269
1269
  """
1270
1270
  Creates new Short Call Calendar Spread strategy which consists of a short and a long call
1271
1271
  with the same strikes but with the short call having a further expiration date.
@@ -1279,7 +1279,7 @@ class OptionStrategies(System.Object):
1279
1279
  ...
1280
1280
 
1281
1281
  @staticmethod
1282
- def short_iron_butterfly(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], otm_put_strike: float, atm_strike: float, otm_call_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1282
+ def short_iron_butterfly(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], otm_put_strike: float, atm_strike: float, otm_call_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1283
1283
  """
1284
1284
  Creates a new Short Iron Butterfly strategy which consists of a long ATM call, a long ATM put, a short OTM call, and a short OTM put,
1285
1285
  all with the same expiration date and with increasing strikes prices in the mentioned order.
@@ -1295,7 +1295,7 @@ class OptionStrategies(System.Object):
1295
1295
  ...
1296
1296
 
1297
1297
  @staticmethod
1298
- def short_iron_condor(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], short_put_strike: float, long_put_strike: float, long_call_strike: float, short_call_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1298
+ def short_iron_condor(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], short_put_strike: float, long_put_strike: float, long_call_strike: float, short_call_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1299
1299
  """
1300
1300
  Creates a new Short Iron Condor strategy which consists of a short put, a long put, a long call and a short call,
1301
1301
  all with the same expiration date and with increasing strikes prices in the mentioned order.
@@ -1311,7 +1311,7 @@ class OptionStrategies(System.Object):
1311
1311
  ...
1312
1312
 
1313
1313
  @staticmethod
1314
- def short_jelly_roll(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, near_expiration: typing.Union[datetime.datetime, datetime.date], far_expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1314
+ def short_jelly_roll(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, near_expiration: typing.Union[datetime.datetime, datetime.date], far_expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1315
1315
  """
1316
1316
  Creates new Short Jelly Roll strategy which combines a long call calendar spread and a short put calendar spread
1317
1317
  with the same strikes and the same pair of expiration dates.
@@ -1325,7 +1325,7 @@ class OptionStrategies(System.Object):
1325
1325
  ...
1326
1326
 
1327
1327
  @staticmethod
1328
- def short_put_backspread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], higher_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1328
+ def short_put_backspread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], higher_strike: float, lower_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1329
1329
  """
1330
1330
  Method creates new Short Put Backspread strategy, that consists of two puts with the same expiration but different strikes.
1331
1331
  It involves buying the higher strike put, while selling twice the number of the lower strike put.
@@ -1339,7 +1339,7 @@ class OptionStrategies(System.Object):
1339
1339
  ...
1340
1340
 
1341
1341
  @staticmethod
1342
- def short_put_calendar_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, near_expiration: typing.Union[datetime.datetime, datetime.date], far_expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1342
+ def short_put_calendar_spread(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, near_expiration: typing.Union[datetime.datetime, datetime.date], far_expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1343
1343
  """
1344
1344
  Creates new Short Put Calendar Spread strategy which consists of a short and a long put
1345
1345
  with the same strikes but with the short put having a further expiration date.
@@ -1353,7 +1353,7 @@ class OptionStrategies(System.Object):
1353
1353
  ...
1354
1354
 
1355
1355
  @staticmethod
1356
- def short_straddle(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1356
+ def short_straddle(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1357
1357
  """
1358
1358
  Creates a Short Straddle strategy that consists of selling a call and a put, both with the same strike price and expiration.
1359
1359
 
@@ -1365,7 +1365,7 @@ class OptionStrategies(System.Object):
1365
1365
  ...
1366
1366
 
1367
1367
  @staticmethod
1368
- def short_strangle(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], call_leg_strike: float, put_leg_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1368
+ def short_strangle(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], call_leg_strike: float, put_leg_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1369
1369
  """
1370
1370
  Creates a Short Strangle strategy that consists of selling a call and a put, with the same expiration date and
1371
1371
  the call strike being above the put strike.
@@ -1379,7 +1379,7 @@ class OptionStrategies(System.Object):
1379
1379
  ...
1380
1380
 
1381
1381
  @staticmethod
1382
- def straddle(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1382
+ def straddle(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1383
1383
  """
1384
1384
  Method creates new Straddle strategy, that is a combination of buying a call and buying a put, both with the same strike price and expiration.
1385
1385
 
@@ -1391,7 +1391,7 @@ class OptionStrategies(System.Object):
1391
1391
  ...
1392
1392
 
1393
1393
  @staticmethod
1394
- def strangle(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], call_leg_strike: float, put_leg_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1394
+ def strangle(canonical_option: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], call_leg_strike: float, put_leg_strike: float, expiration: typing.Union[datetime.datetime, datetime.date]) -> QuantConnect.Securities.Option.OptionStrategy:
1395
1395
  """
1396
1396
  Method creates new Strangle strategy, that buying a call option and a put option with the same expiration date
1397
1397
  The strike price of the call is above the strike of the put.
@@ -1774,7 +1774,7 @@ class ConstantQLRiskFreeRateEstimator(System.Object, QuantConnect.Securities.Opt
1774
1774
  class EmptyOptionChainProvider(System.Object, QuantConnect.Interfaces.IOptionChainProvider):
1775
1775
  """An implementation of IOptionChainProvider that always returns an empty list of contracts"""
1776
1776
 
1777
- 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]:
1777
+ 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]:
1778
1778
  """
1779
1779
  Gets the list of option contracts for a given underlying symbol
1780
1780
 
@@ -203,7 +203,7 @@ class IPositionGroup(typing.Sequence[QuantConnect.Securities.Positions.IPosition
203
203
  """Gets the buying power model defining how margin works in this group"""
204
204
  ...
205
205
 
206
- def try_get_position(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], position: typing.Optional[QuantConnect.Securities.Positions.IPosition]) -> typing.Tuple[bool, QuantConnect.Securities.Positions.IPosition]:
206
+ def try_get_position(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], position: typing.Optional[QuantConnect.Securities.Positions.IPosition]) -> typing.Tuple[bool, QuantConnect.Securities.Positions.IPosition]:
207
207
  """
208
208
  Attempts to retrieve the position with the specified symbol
209
209
 
@@ -907,7 +907,7 @@ class PositionGroupCollection(System.Object, typing.Sequence[QuantConnect.Securi
907
907
  """
908
908
  ...
909
909
 
910
- def try_get_groups(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], groups: typing.Optional[typing.Sequence[QuantConnect.Securities.Positions.IPositionGroup]]) -> typing.Tuple[bool, typing.Sequence[QuantConnect.Securities.Positions.IPositionGroup]]:
910
+ def try_get_groups(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], groups: typing.Optional[typing.Sequence[QuantConnect.Securities.Positions.IPositionGroup]]) -> typing.Tuple[bool, typing.Sequence[QuantConnect.Securities.Positions.IPositionGroup]]:
911
911
  """
912
912
  Attempts to retrieve all groups that contain the provided symbol
913
913
 
@@ -973,7 +973,7 @@ class PositionCollection(System.Object, typing.Iterable[QuantConnect.Securities.
973
973
  """
974
974
  ...
975
975
 
976
- def try_get_position(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], position: typing.Optional[QuantConnect.Securities.Positions.IPosition]) -> typing.Tuple[bool, QuantConnect.Securities.Positions.IPosition]:
976
+ def try_get_position(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], position: typing.Optional[QuantConnect.Securities.Positions.IPosition]) -> typing.Tuple[bool, QuantConnect.Securities.Positions.IPosition]:
977
977
  """
978
978
  Attempts to retrieve the position with the specified symbol from this collection
979
979
 
@@ -1267,7 +1267,7 @@ class PositionGroup(System.Object, QuantConnect.Securities.Positions.IPositionGr
1267
1267
  """
1268
1268
  ...
1269
1269
 
1270
- def try_get_position(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], position: typing.Optional[QuantConnect.Securities.Positions.IPosition]) -> typing.Tuple[bool, QuantConnect.Securities.Positions.IPosition]:
1270
+ def try_get_position(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], position: typing.Optional[QuantConnect.Securities.Positions.IPosition]) -> typing.Tuple[bool, QuantConnect.Securities.Positions.IPosition]:
1271
1271
  """
1272
1272
  Attempts to retrieve the position with the specified symbol
1273
1273
 
@@ -1337,7 +1337,7 @@ class Position(System.Object, QuantConnect.Securities.Positions.IPosition):
1337
1337
  ...
1338
1338
 
1339
1339
  @overload
1340
- def __init__(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract], quantity: float, unit_quantity: float) -> None:
1340
+ def __init__(self, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security], quantity: float, unit_quantity: float) -> None:
1341
1341
  """
1342
1342
  Initializes a new instance of the Position class
1343
1343
 
@@ -1886,7 +1886,7 @@ class PositionGroupExtensions(System.Object):
1886
1886
  ...
1887
1887
 
1888
1888
  @staticmethod
1889
- def get_position(group: QuantConnect.Securities.Positions.IPositionGroup, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract]) -> QuantConnect.Securities.Positions.IPosition:
1889
+ def get_position(group: QuantConnect.Securities.Positions.IPositionGroup, symbol: typing.Union[QuantConnect.Symbol, str, QuantConnect.Data.Market.BaseContract, QuantConnect.Securities.Security]) -> QuantConnect.Securities.Positions.IPosition:
1890
1890
  """
1891
1891
  Gets the position in the group matching the provided
1892
1892