Class OptionSupport
Collection of option support functionality.
Inheritance
Inherited Members
Namespace: TuringTrader.Support
Assembly: TuringTrader.Simulator.dll
Syntax
public static class OptionSupport
Methods
| Improve this Doc View SourceBlackScholes(Instrument, double, double, double)
Calculate Black-Scholes arbitrage-free price for European-style options, plus the common option greeks. https://en.wikipedia.org/wiki/Black–Scholes_model
Declaration
public static OptionSupport.OptionPriceVolGreeks BlackScholes(this Instrument contract, double volatility, double riskFreeRate, double dividendYield = 0)
Parameters
Type | Name | Description |
---|---|---|
Instrument | contract | option contract to calculate |
double | volatility | annualized volatility of underlying asset |
double | riskFreeRate | annualized risk-free rate of return |
double | dividendYield | annualized continuous dividend yield |
Returns
Type | Description |
---|---|
OptionSupport.OptionPriceVolGreeks | container w/ price, volatility, and greeks |
BlackScholesImplied(Instrument, double, double)
Calculate implied volatility from Black-Scholes arbitrage-free price for European-style options, plus the common option greeks. https://en.wikipedia.org/wiki/Black–Scholes_model
Declaration
public static OptionSupport.OptionPriceVolGreeks BlackScholesImplied(this Instrument contract, double riskFreeRate, double dividendYield = 0)
Parameters
Type | Name | Description |
---|---|---|
Instrument | contract | option contract to calculate |
double | riskFreeRate | annualized risk-free rate of return |
double | dividendYield | annualized continuous dividend yield |
Returns
Type | Description |
---|---|
OptionSupport.OptionPriceVolGreeks | container w/ price, volatility, and greeks |
GBlackScholes(bool, double, double, double, double, double, double)
Generalized Black-Scholes-Merton Option Pricing, see chapter 1.1.6
Declaration
public static double GBlackScholes(bool CallPutFlag, double S, double X, double T, double r, double b, double v)
Parameters
Type | Name | Description |
---|---|---|
bool | CallPutFlag | true for calls, false for puts |
double | S | price of underlying asset |
double | X | strike price of option |
double | T | time to expiration in years |
double | r | risk-free interest rate |
double | b | cost of carry rate |
double | v | volatility |
Returns
Type | Description |
---|---|
double |