Lean  $LEAN_TAG$
QuantConnect.Securities.IndexOption.IndexOptionSymbol Class Reference

Index Option Symbol More...

Static Public Member Functions

static bool IsStandard (Symbol symbol)
 Determines if the Index Option Symbol is for a monthly contract More...
 
static bool IsIndexOption (string ticker)
 Checks if the ticker provided is a supported Index Option More...
 
static string MapToUnderlying (string indexOption)
 Maps an index option ticker to its underlying index ticker More...
 
static DateTime GetLastTradingDate (string ticker, DateTime expirationDate)
 Returns the last trading date for the given index option ticker and expiration date More...
 
static DateTime GetExpiryDate (string ticker, DateTime lastTradingDate)
 Returns the expiry date for the given index option ticker and last trading date More...
 

Static Public Attributes

static readonly HashSet< string > SupportedIndexOptionTickers
 Supported index option tickers More...
 

Detailed Description

Index Option Symbol

Definition at line 26 of file IndexOptionSymbol.cs.

Member Function Documentation

◆ IsStandard()

static bool QuantConnect.Securities.IndexOption.IndexOptionSymbol.IsStandard ( Symbol  symbol)
static

Determines if the Index Option Symbol is for a monthly contract

Parameters
symbolIndex Option Symbol
Returns
True if monthly contract, false otherwise

Definition at line 62 of file IndexOptionSymbol.cs.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsIndexOption()

static bool QuantConnect.Securities.IndexOption.IndexOptionSymbol.IsIndexOption ( string  ticker)
static

Checks if the ticker provided is a supported Index Option

Parameters
tickerTicker of the index option
Returns
true if the ticker matches an index option's ticker

This is only used in IB brokerage, since they don't distinguish index options from regular equity options. When we do the conversion from a contract to a SecurityType, the only information we're provided that can reverse it to the SecurityType.IndexOption enum value is the ticker.

Definition at line 94 of file IndexOptionSymbol.cs.

◆ MapToUnderlying()

static string QuantConnect.Securities.IndexOption.IndexOptionSymbol.MapToUnderlying ( string  indexOption)
static

Maps an index option ticker to its underlying index ticker

Parameters
indexOptionIndex option ticker to map to the underlying
Returns
Index ticker

Definition at line 104 of file IndexOptionSymbol.cs.

Here is the caller graph for this function:

◆ GetLastTradingDate()

static DateTime QuantConnect.Securities.IndexOption.IndexOptionSymbol.GetLastTradingDate ( string  ticker,
DateTime  expirationDate 
)
static

Returns the last trading date for the given index option ticker and expiration date

This is useful for IB brokerage

Definition at line 118 of file IndexOptionSymbol.cs.

◆ GetExpiryDate()

static DateTime QuantConnect.Securities.IndexOption.IndexOptionSymbol.GetExpiryDate ( string  ticker,
DateTime  lastTradingDate 
)
static

Returns the expiry date for the given index option ticker and last trading date

This is useful for IB brokerage

Definition at line 127 of file IndexOptionSymbol.cs.

Member Data Documentation

◆ SupportedIndexOptionTickers

readonly HashSet<string> QuantConnect.Securities.IndexOption.IndexOptionSymbol.SupportedIndexOptionTickers
static
Initial value:
= new string[] { "SPX", "NDX", "VIX" }
.Union(_nonStandardIndexOptionTickers)
.ToHashSet()

Supported index option tickers

Definition at line 53 of file IndexOptionSymbol.cs.


The documentation for this class was generated from the following file: