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...
 
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

SecurityIdentifier ID => Symbol.ID
 The security identifier of the option symbol More...
 
Symbol UnderlyingSymbol => Symbol.Underlying
 Gets the underlying security's symbol More...
 
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...
 
DateTime Expiry => Symbol.ID.Date
 Gets the expiration date 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...
 
decimal OpenInterest => _optionData.OpenInterest
 Gets the open interest More...
 
decimal LastPrice => _optionData.LastPrice
 Gets the last price this contract traded at More...
 
long Volume => _optionData.Volume
 Gets the last volume this contract traded at More...
 
decimal BidPrice => _optionData.BidPrice
 Gets the current bid price More...
 
long BidSize => _optionData.BidSize
 Get the current bid size More...
 
decimal AskPrice => _optionData.AskPrice
 Gets the ask price More...
 
long AskSize => _optionData.AskSize
 Gets the current ask size More...
 
decimal UnderlyingLastPrice => _optionData.UnderlyingLastPrice
 Gets the last price the underlying security traded at More...
 

Properties

Symbol Symbol [get, set]
 Gets the option contract's symbol More...
 
DateTime Time [get, set]
 Gets the local date time this contract's data was last updated More...
 
- Properties inherited from QuantConnect.Data.ISymbolProvider
Symbol Symbol [get, set]
 Gets the Symbol More...
 
- Properties inherited from QuantConnect.Securities.ISymbol
SecurityIdentifier ID [get]
 Gets the security identifier. 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 142 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 153 of file OptionContract.cs.

Member Function Documentation

◆ ToString()

override string QuantConnect.Data.Market.OptionContract.ToString ( )

Returns a string that represents the current object.

Returns
A string that represents the current object.

◆ 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 194 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 211 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 225 of file OptionContract.cs.

Member Data Documentation

◆ ID

SecurityIdentifier QuantConnect.Data.Market.OptionContract.ID => Symbol.ID

The security identifier of the option symbol

Definition at line 43 of file OptionContract.cs.

◆ UnderlyingSymbol

Symbol QuantConnect.Data.Market.OptionContract.UnderlyingSymbol => Symbol.Underlying

Gets the underlying security's symbol

Definition at line 48 of file OptionContract.cs.

◆ Strike

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

Gets the strike price

Definition at line 53 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 58 of file OptionContract.cs.

◆ Expiry

DateTime QuantConnect.Data.Market.OptionContract.Expiry => Symbol.ID.Date

Gets the expiration date

Definition at line 63 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 68 of file OptionContract.cs.

◆ Style

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

Gets the option style

Definition at line 73 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 78 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 83 of file OptionContract.cs.

◆ Greeks

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

Gets the greeks for this contract

Definition at line 88 of file OptionContract.cs.

◆ OpenInterest

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

Gets the open interest

Definition at line 101 of file OptionContract.cs.

◆ LastPrice

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

Gets the last price this contract traded at

Definition at line 106 of file OptionContract.cs.

◆ Volume

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

Gets the last volume this contract traded at

Definition at line 111 of file OptionContract.cs.

◆ BidPrice

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

Gets the current bid price

Definition at line 116 of file OptionContract.cs.

◆ BidSize

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

Get the current bid size

Definition at line 121 of file OptionContract.cs.

◆ AskPrice

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

Gets the ask price

Definition at line 126 of file OptionContract.cs.

◆ AskSize

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

Gets the current ask size

Definition at line 131 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 136 of file OptionContract.cs.

Property Documentation

◆ Symbol

Symbol QuantConnect.Data.Market.OptionContract.Symbol
getset

Gets the option contract's symbol

Definition at line 36 of file OptionContract.cs.

◆ Time

DateTime QuantConnect.Data.Market.OptionContract.Time
getset

Gets the local date time this contract's data was last updated

Definition at line 94 of file OptionContract.cs.


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