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

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

Public Member Functions

 OptionContract (ISecurityPrice security, Symbol underlyingSymbol)
 Initializes a new instance of the OptionContract class More...
 
override string ToString ()
 Returns a string that represents the current object. More...
 

Static Public Member Functions

static OptionContract Create (BaseData baseData, ISecurityPrice security, decimal underlyingLastPrice)
 Creates a OptionContract More...
 
static OptionContract Create (Symbol underlyingSymbol, DateTime endTime, ISecurityPrice security, decimal underlyingLastPrice)
 Creates a OptionContract More...
 

Public Attributes

decimal Strike => Symbol.ID.StrikePrice
 Gets the strike price 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 => _optionPriceModelResult.Value.TheoreticalPrice
 Gets the theoretical price of this option contract as computed by the IOptionPriceModel More...
 
decimal ImpliedVolatility => _optionPriceModelResult.Value.ImpliedVolatility
 Gets the implied volatility of the option contract as computed by the IOptionPriceModel More...
 
Greeks Greeks => _optionPriceModelResult.Value.Greeks
 Gets the greeks for this contract More...
 

Properties

Symbol Symbol [get]
 Gets the option contract's symbol More...
 
Symbol UnderlyingSymbol [get]
 Gets the underlying security's symbol More...
 
decimal ScaledStrike [get]
 Gets the strike price multiplied by the strike multiplier More...
 
DateTime Time [get, set]
 Gets the local date time this contract's data was last updated More...
 
decimal OpenInterest [get, set]
 Gets the open interest More...
 
decimal LastPrice [get, set]
 Gets the last price this contract traded at More...
 
long Volume [get, set]
 Gets the last volume this contract traded at More...
 
decimal BidPrice [get, set]
 Gets the current bid price More...
 
long BidSize [get, set]
 Get the current bid size More...
 
decimal AskPrice [get, set]
 Gets the ask price More...
 
long AskSize [get, set]
 Gets the current ask size More...
 
decimal UnderlyingLastPrice [get, set]
 Gets the last price the underlying security traded at More...
 

Detailed Description

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

Definition at line 26 of file OptionContract.cs.

Constructor & Destructor Documentation

◆ OptionContract()

QuantConnect.Data.Market.OptionContract.OptionContract ( ISecurityPrice  security,
Symbol  underlyingSymbol 
)

Initializes a new instance of the OptionContract class

Parameters
securityThe option contract security
underlyingSymbolThe symbol of the underlying security

Definition at line 167 of file OptionContract.cs.

Here is the caller graph for this function:

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/2]

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

Creates a OptionContract

Parameters
baseData
securityprovides price properties for a Security
underlyingLastPricelast price the underlying security traded at
Returns
Option contract
Here is the caller graph for this function:

◆ Create() [2/2]

static OptionContract QuantConnect.Data.Market.OptionContract.Create ( Symbol  underlyingSymbol,
DateTime  endTime,
ISecurityPrice  security,
decimal  underlyingLastPrice 
)
static

Creates a OptionContract

Parameters
underlyingSymbolThe symbol of the underlying security
endTimelocal date time this contract's data was last updated
securityprovides price properties for a Security
underlyingLastPricelast price the underlying security traded at
Returns
Option contract

Definition at line 209 of file OptionContract.cs.

Here is the call graph for this function:

Member Data Documentation

◆ Strike

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

Gets the strike price

Definition at line 49 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 => _optionPriceModelResult.Value.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 => _optionPriceModelResult.Value.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 => _optionPriceModelResult.Value.Greeks

Gets the greeks for this contract

Definition at line 88 of file OptionContract.cs.

Property Documentation

◆ Symbol

Symbol QuantConnect.Data.Market.OptionContract.Symbol
get

Gets the option contract's symbol

Definition at line 34 of file OptionContract.cs.

◆ UnderlyingSymbol

Symbol QuantConnect.Data.Market.OptionContract.UnderlyingSymbol
get

Gets the underlying security's symbol

Definition at line 42 of file OptionContract.cs.

◆ ScaledStrike

decimal QuantConnect.Data.Market.OptionContract.ScaledStrike
get

Gets the strike price multiplied by the strike multiplier

Definition at line 55 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.

◆ OpenInterest

decimal QuantConnect.Data.Market.OptionContract.OpenInterest
getset

Gets the open interest

Definition at line 102 of file OptionContract.cs.

◆ LastPrice

decimal QuantConnect.Data.Market.OptionContract.LastPrice
getset

Gets the last price this contract traded at

Definition at line 110 of file OptionContract.cs.

◆ Volume

long QuantConnect.Data.Market.OptionContract.Volume
getset

Gets the last volume this contract traded at

Definition at line 118 of file OptionContract.cs.

◆ BidPrice

decimal QuantConnect.Data.Market.OptionContract.BidPrice
getset

Gets the current bid price

Definition at line 126 of file OptionContract.cs.

◆ BidSize

long QuantConnect.Data.Market.OptionContract.BidSize
getset

Get the current bid size

Definition at line 134 of file OptionContract.cs.

◆ AskPrice

decimal QuantConnect.Data.Market.OptionContract.AskPrice
getset

Gets the ask price

Definition at line 142 of file OptionContract.cs.

◆ AskSize

long QuantConnect.Data.Market.OptionContract.AskSize
getset

Gets the current ask size

Definition at line 150 of file OptionContract.cs.

◆ UnderlyingLastPrice

decimal QuantConnect.Data.Market.OptionContract.UnderlyingLastPrice
getset

Gets the last price the underlying security traded at

Definition at line 158 of file OptionContract.cs.


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