|
WebCab Options and Futures Demo v2.5 (J2SE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--webcab.lib.finance.options.EuropeanGamma
Within this class we consider the evaluation of the Gamma of European options on equities, equity indexes, currencies and futures contracts in accordance with the classical Black-Scholes model.
Recall that the Gamma of an option contract is the rate of change of the rate of change (i.e. the second derivative) of the option price with respect to changes of the underlying asset price.
| Constructor Summary | |
EuropeanGamma()
Creates a new instance. |
|
| Method Summary | |
double |
gammaFromThetaDelta(double delta,
double theta,
double assetPrice,
double riskFreeRate,
double volatility,
double totalValue)
We derive the gamma from the delta, theta and some other market variables. |
double |
optionGamma(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluatioDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Evaluates the gamma of a European call or put option on a non-dividend paying stock. |
double |
optionGamma(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
Evaluates the gamma of a European call or put option on a non-dividend paying stock. |
double |
optionGammaOnCurrency(double foreignRate,
double exchangeRate,
double strike,
double riskFreeRate,
double volatility,
Date evaluatioDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Evaluates the gamma of a European call or put option on a currency. |
double |
optionGammaOnCurrency(double foreignRate,
double exchangeRate,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
Evaluates the gamma of a European call or put option on a currency. |
double |
optionGammaOnFutures(double futuresPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluatioDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Evaluates the gamma of a European call or put option of a futures contract. |
double |
optionGammaOnFutures(double futuresPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
Evaluates the gamma of a European call or put option of a futures contract. |
double |
optionGammaOnIndex(double yield,
double indexValue,
double strike,
double riskFreeRate,
double volatility,
Date evaluatioDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Evaluates the gamma of a European call or put option on an index. |
double |
optionGammaOnIndex(double yield,
double indexValue,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
Evaluates the gamma of a European call or put option on an index. |
double |
optionGammaWithYield(double yield,
double stockPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluatioDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Returns the gamma of a European call or put option on a stock which has a continuous yield. |
double |
optionGammaWithYield(double yield,
double stockPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
Returns the gamma of a European call or put option on a stock which has a continuous yield. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EuropeanGamma()
| Method Detail |
public double optionGamma(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluatioDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws EuropeanGammaDemoException
stockPrice - the price of the underlying securitystrike - the strike (or exercise price) of the (call or put) optionriskFreeRate - the continuously compounded risk free interest rate in decimal format (1 percent = 0.01)volatility - volatility of the futures contractmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanGammaDemoException
public double optionGamma(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
throws EuropeanGammaDemoException
stockPrice - the price of the underlying securitystrike - the strike (or exercise price) of the (call or put) optionriskFreeRate - the continuously compounded risk free interest rate in decimal format (1 percent = 0.01)volatility - volatility of the futures contracttimeToMaturity - the time (in years) until the option contract expires
EuropeanGammaDemoException
public double optionGammaWithYield(double yield,
double stockPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluatioDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws EuropeanGammaDemoException
yield - the continuous yield of the underlying stockstockPrice - the price of the underlying stock or indexstrike - value at which the option is exercisedriskFreeRate - the risk free interest rate in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the underlying stockmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanGammaDemoException
public double optionGammaWithYield(double yield,
double stockPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
throws EuropeanGammaDemoException
yield - the continuous yield of the underlying stockstockPrice - the price of the underlying stock or indexstrike - value at which the option is exercisedriskFreeRate - the risk free interest rate in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the underlying stocktimeToMaturity - time period until the option expires
EuropeanGammaDemoException
public double optionGammaOnIndex(double yield,
double indexValue,
double strike,
double riskFreeRate,
double volatility,
Date evaluatioDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws EuropeanGammaDemoException
yield - the average continuous yield of the constituents of the indexindexValue - the value of indexstrike - value at which the option is exercisedriskFreeRate - the risk free interest ratevolatility - the volatility of the underlying stockmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanGammaDemoException
public double optionGammaOnIndex(double yield,
double indexValue,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
throws EuropeanGammaDemoException
yield - the average continuous yield of the constituents of the indexindexValue - the value of indexstrike - value at which the option is exercisedriskFreeRate - the risk free interest ratevolatility - the volatility of the underlying stocktimeToMaturity - time period until the option expires
EuropeanGammaDemoException
public double optionGammaOnCurrency(double foreignRate,
double exchangeRate,
double strike,
double riskFreeRate,
double volatility,
Date evaluatioDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws EuropeanGammaDemoException
foreignRate - the continuously compounded risk free interest rate in the foreign currencyexchangeRate - the present exchange ratestrike - the exchange rate at which the option can be exercisedriskFreeRate - the risk free interest rate in the base currencyvolatility - the volatility of the exchange ratematurityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanGammaDemoException
public double optionGammaOnCurrency(double foreignRate,
double exchangeRate,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
throws EuropeanGammaDemoException
foreignRate - the continuously compounded risk free interest rate in the foreign currencyexchangeRate - the present exchange ratestrike - the exchange rate at which the option can be exercisedriskFreeRate - the risk free interest rate in the base currencyvolatility - the volatility of the exchange ratetimeToMaturity - the time until the option expires
EuropeanGammaDemoException
public double optionGammaOnFutures(double futuresPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluatioDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws EuropeanGammaDemoException
futuresPrice - the futures price at time zerostrike - the value of the futures contract at which option can be exercisedriskFreeRate - the risk free interest ratevolatility - volatility of the futures contractmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanGammaDemoException
public double optionGammaOnFutures(double futuresPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
throws EuropeanGammaDemoException
futuresPrice - the futures price at time zerostrike - the value of the futures contract at which option can be exercisedriskFreeRate - the risk free interest ratevolatility - volatility of the futures contracttimeToMaturity - the time period until the option contract expires
EuropeanGammaDemoException
public double gammaFromThetaDelta(double delta,
double theta,
double assetPrice,
double riskFreeRate,
double volatility,
double totalValue)
throws EuropeanGammaDemoException
theta - the theta of the portfoliototalValue - the value of the whole portfolioassetPrice - the underlying asset pricevolatility - the volatility of the underlying asset priceriskFreeRate - the continuously compounded risk free interest rate
EuropeanGammaDemoException
|
WebCab Options and Futures Demo v2.5 (J2SE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||