Lean  $LEAN_TAG$
QuantConnect.SymbolRepresentation Class Reference

Public static helper class that does parsing/generation of symbol representations (options, futures) More...

Classes

class  FutureTickerProperties
 Class contains future ticker properties returned by ParseFutureTicker() More...
 
class  OptionTickerProperties
 Class contains option ticker properties returned by ParseOptionTickerIQFeed() More...
 

Static Public Member Functions

static FutureTickerProperties ParseFutureTicker (string ticker)
 Function returns underlying name, expiration year, expiration month, expiration day for the future contract ticker. Function detects if the format used is either 1 or 2 digits year, and if day code is present (will default to 1rst day of month). Returns null, if parsing failed. Format [Ticker][2 digit day code OPTIONAL][1 char month code][2/1 digit year code] More...
 
static Symbol ParseFutureSymbol (string ticker, int? futureYear=null)
 Helper method to parse and generate a future symbol from a given user friendly representation More...
 
static Symbol ParseFutureOptionSymbol (string ticker, int strikeScale=1)
 Creates a future option Symbol from the provided ticker More...
 
static string GenerateFutureTicker (string underlying, DateTime expiration, bool doubleDigitsYear=true, bool includeExpirationDate=true)
 Returns future symbol ticker from underlying and expiration date. Function can generate tickers of two formats: one and two digits year. Format [Ticker][2 digit day code][1 char month code][2/1 digit year code], more information at http://help.tradestation.com/09_01/tradestationhelp/symbology/futures_symbology.htm More...
 
static string GenerateOptionTickerOSI (this Symbol symbol)
 Returns option symbol ticker in accordance with OSI symbology More information can be found at http://www.optionsclearing.com/components/docs/initiatives/symbology/symbology_initiative_v1_8.pdf More...
 
static string GenerateOptionTickerOSI (string underlying, OptionRight right, decimal strikePrice, DateTime expiration)
 Returns option symbol ticker in accordance with OSI symbology More information can be found at http://www.optionsclearing.com/components/docs/initiatives/symbology/symbology_initiative_v1_8.pdf More...
 
static Symbol ParseOptionTickerOSI (string ticker, SecurityType securityType=SecurityType.Option, string market=Market.USA)
 Parses the specified OSI options ticker into a Symbol object More...
 
static Symbol ParseOptionTickerOSI (string ticker, SecurityType securityType, OptionStyle optionStyle, string market)
 Parses the specified OSI options ticker into a Symbol object More...
 
static string GenerateOptionTicker (Symbol symbol)
 Function returns option ticker from IQFeed option ticker For example CSCO1220V19 Cisco October Put at 19.00 Expiring on 10/20/12 Symbology details: http://www.iqfeed.net/symbolguide/index.cfm?symbolguide=guide&displayaction=support%C2%A7ion=guide&web=iqfeed&guide=options&web=IQFeed&type=stock More...
 
static OptionTickerProperties ParseOptionTickerIQFeed (string ticker)
 Function returns option contract parameters (underlying name, expiration date, strike, right) from IQFeed option ticker Symbology details: http://www.iqfeed.net/symbolguide/index.cfm?symbolguide=guide&displayaction=support%C2%A7ion=guide&web=iqfeed&guide=options&web=IQFeed&type=stock More...
 

Detailed Description

Public static helper class that does parsing/generation of symbol representations (options, futures)

Definition at line 32 of file SymbolRepresentation.cs.

Member Function Documentation

◆ ParseFutureTicker()

static FutureTickerProperties QuantConnect.SymbolRepresentation.ParseFutureTicker ( string  ticker)
static

Function returns underlying name, expiration year, expiration month, expiration day for the future contract ticker. Function detects if the format used is either 1 or 2 digits year, and if day code is present (will default to 1rst day of month). Returns null, if parsing failed. Format [Ticker][2 digit day code OPTIONAL][1 char month code][2/1 digit year code]

Parameters
ticker
Returns
Results containing 1) underlying name, 2) short expiration year, 3) expiration month

Definition at line 101 of file SymbolRepresentation.cs.

Here is the caller graph for this function:

◆ ParseFutureSymbol()

static Symbol QuantConnect.SymbolRepresentation.ParseFutureSymbol ( string  ticker,
int?  futureYear = null 
)
static

Helper method to parse and generate a future symbol from a given user friendly representation

Parameters
tickerThe future ticker, for example 'ESZ1'
futureYearClarifies the year for the current future
Returns
The future symbol or null if failed

Definition at line 153 of file SymbolRepresentation.cs.

Here is the call graph for this function:

◆ ParseFutureOptionSymbol()

static Symbol QuantConnect.SymbolRepresentation.ParseFutureOptionSymbol ( string  ticker,
int  strikeScale = 1 
)
static

Creates a future option Symbol from the provided ticker

Parameters
tickerThe future option ticker, for example 'ESZ0 P3590'
strikeScaleOptional the future option strike scale factor

Definition at line 183 of file SymbolRepresentation.cs.

Here is the call graph for this function:

◆ GenerateFutureTicker()

static string QuantConnect.SymbolRepresentation.GenerateFutureTicker ( string  underlying,
DateTime  expiration,
bool  doubleDigitsYear = true,
bool  includeExpirationDate = true 
)
static

Returns future symbol ticker from underlying and expiration date. Function can generate tickers of two formats: one and two digits year. Format [Ticker][2 digit day code][1 char month code][2/1 digit year code], more information at http://help.tradestation.com/09_01/tradestationhelp/symbology/futures_symbology.htm

Parameters
underlyingString underlying
expirationExpiration date
doubleDigitsYearTrue if year should represented by two digits; False - one digit
includeExpirationDateTrue if expiration date should be included
Returns
The user friendly future ticker

Definition at line 253 of file SymbolRepresentation.cs.

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

◆ GenerateOptionTickerOSI() [1/2]

static string QuantConnect.SymbolRepresentation.GenerateOptionTickerOSI ( this Symbol  symbol)
static

Returns option symbol ticker in accordance with OSI symbology More information can be found at http://www.optionsclearing.com/components/docs/initiatives/symbology/symbology_initiative_v1_8.pdf

Parameters
symbolSymbol object to create OSI ticker from
Returns
The OSI ticker representation

Definition at line 295 of file SymbolRepresentation.cs.

Here is the caller graph for this function:

◆ GenerateOptionTickerOSI() [2/2]

static string QuantConnect.SymbolRepresentation.GenerateOptionTickerOSI ( string  underlying,
OptionRight  right,
decimal  strikePrice,
DateTime  expiration 
)
static

Returns option symbol ticker in accordance with OSI symbology More information can be found at http://www.optionsclearing.com/components/docs/initiatives/symbology/symbology_initiative_v1_8.pdf

Parameters
underlyingUnderlying string
rightOption right
strikePriceOption strike
expirationOption expiration date
Returns
The OSI ticker representation

Definition at line 315 of file SymbolRepresentation.cs.

◆ ParseOptionTickerOSI() [1/2]

static Symbol QuantConnect.SymbolRepresentation.ParseOptionTickerOSI ( string  ticker,
SecurityType  securityType = SecurityType.Option,
string  market = Market.USA 
)
static

Parses the specified OSI options ticker into a Symbol object

Parameters
tickerThe OSI compliant option ticker string
securityTypeThe security type
marketThe associated market
Returns
Symbol object for the specified OSI option ticker string

Definition at line 328 of file SymbolRepresentation.cs.

◆ ParseOptionTickerOSI() [2/2]

static Symbol QuantConnect.SymbolRepresentation.ParseOptionTickerOSI ( string  ticker,
SecurityType  securityType,
OptionStyle  optionStyle,
string  market 
)
static

Parses the specified OSI options ticker into a Symbol object

Parameters
tickerThe OSI compliant option ticker string
securityTypeThe security type
marketThe associated market
optionStyleThe option style
Returns
Symbol object for the specified OSI option ticker string

Definition at line 341 of file SymbolRepresentation.cs.

Here is the call graph for this function:

◆ GenerateOptionTicker()

static string QuantConnect.SymbolRepresentation.GenerateOptionTicker ( Symbol  symbol)
static

Function returns option ticker from IQFeed option ticker For example CSCO1220V19 Cisco October Put at 19.00 Expiring on 10/20/12 Symbology details: http://www.iqfeed.net/symbolguide/index.cfm?symbolguide=guide&displayaction=support%C2%A7ion=guide&web=iqfeed&guide=options&web=IQFeed&type=stock

Parameters
symbolTHe option symbol
Returns
The option ticker

Definition at line 385 of file SymbolRepresentation.cs.

Here is the caller graph for this function:

◆ ParseOptionTickerIQFeed()

static OptionTickerProperties QuantConnect.SymbolRepresentation.ParseOptionTickerIQFeed ( string  ticker)
static

Function returns option contract parameters (underlying name, expiration date, strike, right) from IQFeed option ticker Symbology details: http://www.iqfeed.net/symbolguide/index.cfm?symbolguide=guide&displayaction=support%C2%A7ion=guide&web=iqfeed&guide=options&web=IQFeed&type=stock

Parameters
tickerIQFeed option ticker
Returns
Results containing 1) underlying name, 2) option right, 3) option strike 4) expiration date

Definition at line 398 of file SymbolRepresentation.cs.


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