Lean  $LEAN_TAG$
QuantConnect.Data.Market.OptionContract Class Reference

Defines a single option contract at a specific expiration and strike price More...

Inheritance diagram for QuantConnect.Data.Market.OptionContract:
[legend]

Public Member Functions

 OptionContract (ISecurityPrice security)
 Initializes a new instance of the OptionContract class More...
 
 OptionContract (OptionUniverse contractData, SymbolProperties symbolProperties)
 Initializes a new option contract from a given OptionUniverse instance More...
 
- Public Member Functions inherited from QuantConnect.Data.Market.BaseContract
override string ToString ()
 Returns a string that represents the current object. More...
 

Static Public Member Functions

static OptionContract Create (BaseData baseData, ISecurityPrice security, BaseData underlying)
 Creates a OptionContract More...
 
static OptionContract Create (DateTime endTime, ISecurityPrice security, BaseData underlying)
 Creates a OptionContract More...
 
static OptionContract Create (OptionUniverse contractData, SymbolProperties symbolProperties)
 Creates a new option contract from a given OptionUniverse instance, using its data to form a quote bar to source pricing data More...
 
static implicit operator Symbol (OptionContract contract)
 Implicit conversion into Symbol More...
 

Public Attributes

decimal Strike => Symbol.ID.StrikePrice
 Gets the strike price More...
 
decimal ScaledStrike => Strike * _symbolProperties.StrikeMultiplier
 Gets the strike price multiplied by the strike multiplier More...
 
OptionRight Right => Symbol.ID.OptionRight
 Gets the right being purchased (call [right to buy] or put [right to sell]) More...
 
OptionStyle Style => Symbol.ID.OptionStyle
 Gets the option style More...
 
decimal TheoreticalPrice => _optionData.TheoreticalPrice
 Gets the theoretical price of this option contract as computed by the IOptionPriceModel More...
 
decimal ImpliedVolatility => _optionData.ImpliedVolatility
 Gets the implied volatility of the option contract as computed by the IOptionPriceModel More...
 
Greeks Greeks => _optionData.Greeks
 Gets the greeks for this contract More...
 
override decimal OpenInterest => _optionData.OpenInterest
 Gets the open interest More...
 
override decimal LastPrice => _optionData.LastPrice
 Gets the last price this contract traded at More...
 
override long Volume => _optionData.Volume
 Gets the last volume this contract traded at More...
 
override decimal BidPrice => _optionData.BidPrice
 Gets the current bid price More...
 
override long BidSize => _optionData.BidSize
 Get the current bid size More...
 
override decimal AskPrice => _optionData.AskPrice
 Gets the ask price More...
 
override long AskSize => _optionData.AskSize
 Gets the current ask size More...
 
decimal UnderlyingLastPrice => _optionData.UnderlyingLastPrice
 Gets the last price the underlying security traded at More...
 
- Public Attributes inherited from QuantConnect.Data.Market.BaseContract
SecurityIdentifier ID => Symbol.ID
 The security identifier of the symbol More...
 
Symbol UnderlyingSymbol => Symbol.Underlying
 Gets the underlying security's symbol More...
 
DateTime Expiry => Symbol.ID.Date
 Gets the expiration date More...
 

Additional Inherited Members

- Protected Member Functions inherited from QuantConnect.Data.Market.BaseContract
 BaseContract (Symbol symbol)
 Initializes a new instance of the BaseContract class More...
 
- Properties inherited from QuantConnect.Data.Market.BaseContract
Symbol Symbol [get, set]
 Gets the contract's symbol More...
 
DateTime Time [get, set]
 Gets the local date time this contract's data was last updated More...
 
virtual decimal OpenInterest [get, set]
 Gets the open interest More...
 
virtual decimal LastPrice [get, set]
 Gets the last price this contract traded at More...
 
virtual long Volume [get, set]
 Gets the last volume this contract traded at More...
 
virtual decimal BidPrice [get, set]
 Gets the current bid price More...
 
virtual long BidSize [get, set]
 Get the current bid size More...
 
virtual decimal AskPrice [get, set]
 Gets the ask price More...
 
virtual long AskSize [get, set]
 Gets the current ask size More...
 
- Properties inherited from QuantConnect.Data.ISymbolProvider
Symbol Symbol [get, set]
 Gets the Symbol More...
 

Detailed Description

Defines a single option contract at a specific expiration and strike price

Definition at line 27 of file OptionContract.cs.

Constructor & Destructor Documentation

◆ OptionContract() [1/2]

QuantConnect.Data.Market.OptionContract.OptionContract ( ISecurityPrice  security)

Initializes a new instance of the OptionContract class

Parameters
securityThe option contract security

Definition at line 111 of file OptionContract.cs.

Here is the caller graph for this function:

◆ OptionContract() [2/2]

QuantConnect.Data.Market.OptionContract.OptionContract ( OptionUniverse  contractData,
SymbolProperties  symbolProperties 
)

Initializes a new option contract from a given OptionUniverse instance

Parameters
contractDataThe option universe contract data to use as source for this contract
symbolPropertiesThe contract symbol properties

Definition at line 122 of file OptionContract.cs.

Member Function Documentation

◆ Create() [1/3]

static OptionContract QuantConnect.Data.Market.OptionContract.Create ( BaseData  baseData,
ISecurityPrice  security,
BaseData  underlying 
)
static

Creates a OptionContract

Parameters
baseData
securityProvides price properties for a Security
underlyingLast underlying security trade data
Returns
Option contract
Here is the caller graph for this function:

◆ Create() [2/3]

static OptionContract QuantConnect.Data.Market.OptionContract.Create ( DateTime  endTime,
ISecurityPrice  security,
BaseData  underlying 
)
static

Creates a OptionContract

Parameters
endTimelocal date time this contract's data was last updated
securityprovides price properties for a Security
underlyinglast underlying security trade data
Returns
Option contract

Definition at line 155 of file OptionContract.cs.

Here is the call graph for this function:

◆ Create() [3/3]

static OptionContract QuantConnect.Data.Market.OptionContract.Create ( OptionUniverse  contractData,
SymbolProperties  symbolProperties 
)
static

Creates a new option contract from a given OptionUniverse instance, using its data to form a quote bar to source pricing data

Parameters
contractDataThe option universe contract data to use as source for this contract
symbolPropertiesThe contract symbol properties

Definition at line 172 of file OptionContract.cs.

Here is the call graph for this function:

◆ operator Symbol()

static implicit QuantConnect.Data.Market.OptionContract.operator Symbol ( OptionContract  contract)
static

Implicit conversion into Symbol

Parameters
contractThe option contract to be converted

Definition at line 186 of file OptionContract.cs.

Member Data Documentation

◆ Strike

decimal QuantConnect.Data.Market.OptionContract.Strike => Symbol.ID.StrikePrice

Gets the strike price

Definition at line 35 of file OptionContract.cs.

◆ ScaledStrike

decimal QuantConnect.Data.Market.OptionContract.ScaledStrike => Strike * _symbolProperties.StrikeMultiplier

Gets the strike price multiplied by the strike multiplier

Definition at line 40 of file OptionContract.cs.

◆ Right

OptionRight QuantConnect.Data.Market.OptionContract.Right => Symbol.ID.OptionRight

Gets the right being purchased (call [right to buy] or put [right to sell])

Definition at line 45 of file OptionContract.cs.

◆ Style

OptionStyle QuantConnect.Data.Market.OptionContract.Style => Symbol.ID.OptionStyle

Gets the option style

Definition at line 50 of file OptionContract.cs.

◆ TheoreticalPrice

decimal QuantConnect.Data.Market.OptionContract.TheoreticalPrice => _optionData.TheoreticalPrice

Gets the theoretical price of this option contract as computed by the IOptionPriceModel

Definition at line 55 of file OptionContract.cs.

◆ ImpliedVolatility

decimal QuantConnect.Data.Market.OptionContract.ImpliedVolatility => _optionData.ImpliedVolatility

Gets the implied volatility of the option contract as computed by the IOptionPriceModel

Definition at line 60 of file OptionContract.cs.

◆ Greeks

Greeks QuantConnect.Data.Market.OptionContract.Greeks => _optionData.Greeks

Gets the greeks for this contract

Definition at line 65 of file OptionContract.cs.

◆ OpenInterest

override decimal QuantConnect.Data.Market.OptionContract.OpenInterest => _optionData.OpenInterest

Gets the open interest

Definition at line 70 of file OptionContract.cs.

◆ LastPrice

override decimal QuantConnect.Data.Market.OptionContract.LastPrice => _optionData.LastPrice

Gets the last price this contract traded at

Definition at line 75 of file OptionContract.cs.

◆ Volume

override long QuantConnect.Data.Market.OptionContract.Volume => _optionData.Volume

Gets the last volume this contract traded at

Definition at line 80 of file OptionContract.cs.

◆ BidPrice

override decimal QuantConnect.Data.Market.OptionContract.BidPrice => _optionData.BidPrice

Gets the current bid price

Definition at line 85 of file OptionContract.cs.

◆ BidSize

override long QuantConnect.Data.Market.OptionContract.BidSize => _optionData.BidSize

Get the current bid size

Definition at line 90 of file OptionContract.cs.

◆ AskPrice

override decimal QuantConnect.Data.Market.OptionContract.AskPrice => _optionData.AskPrice

Gets the ask price

Definition at line 95 of file OptionContract.cs.

◆ AskSize

override long QuantConnect.Data.Market.OptionContract.AskSize => _optionData.AskSize

Gets the current ask size

Definition at line 100 of file OptionContract.cs.

◆ UnderlyingLastPrice

decimal QuantConnect.Data.Market.OptionContract.UnderlyingLastPrice => _optionData.UnderlyingLastPrice

Gets the last price the underlying security traded at

Definition at line 105 of file OptionContract.cs.


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