|
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.ImpliedVolatility
This class calculates the implied volatility for a given European (call or put) option.
Remark: In order to solve the formulae resulting from the Back-Scholes analysis we
have applied a numerical procedures known as Ridders method with a precision of 10E-6.
| Constructor Summary | |
ImpliedVolatility()
Creates a new instance. |
|
| Method Summary | |
double |
callOnCurrencyVolatility(double foreignRiskFree,
double exchangeRate,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double callValue,
BusinessCalendar businessCalendar)
Calculates the implied volatility of a currency from the Black-Scholes formulae, knowing the value of a call option on that currency. |
double |
callOnCurrencyVolatility(double foreignRiskFree,
double exchangeRate,
double strike,
double riskFreeRate,
double timeToMaturity,
double callValue)
Calculates the implied volatility of a currency from the Black-Scholes formulae, knowing the value of a call option on that currency. |
double |
callOnFuturesVolatility(double futuresPrice,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double callValue,
BusinessCalendar businessCalendar)
Calculates the implied volatility of a futures contract from the Black-Scholes formulae, knowing the value of a call option on that contract. |
double |
callOnFuturesVolatility(double futuresPrice,
double strike,
double riskFreeRate,
double timeToMaturity,
double callValue)
Calculates the implied volatility of a futures contract from the Black-Scholes formulae, knowing the value of a call option on that contract. |
double |
callOnIndexVolatility(double yield,
double indexValue,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double callValue,
BusinessCalendar businessCalendar)
Calculates the implied volatility of an index from the Black-Scholes formulae, knowing the value of a call option on that index. |
double |
callOnIndexVolatility(double yield,
double indexValue,
double strike,
double riskFreeRate,
double timeToMaturity,
double callValue)
Calculates the implied volatility of an index from the Black-Scholes formulae, knowing the value of a call option on that index. |
double |
callVolatility(double assetPrice,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double callValue,
BusinessCalendar businessCalendar)
Calculates the implied volatility of a non-dividend paying stock from the Black-Scholes formulae, knowing the value of a call option on that stock. |
double |
callVolatility(double assetPrice,
double strike,
double riskFreeRate,
double timeToMaturity,
double callValue)
Calculates the implied volatility of a non-dividend paying stock from the Black-Scholes formulae, knowing the value of a call option on that stock. |
double |
callWithYieldVolatility(double yield,
double assetPrice,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double callValue,
BusinessCalendar businessCalendar)
Calculates the implied volatility of a stock which pays dividends during the option live from the Black-Scholes formulae, knowing the value of a call option on that stock. |
double |
callWithYieldVolatility(double yield,
double assetPrice,
double strike,
double riskFreeRate,
double timeToMaturity,
double callValue)
Calculates the implied volatility of a stock which pays dividends during the option live from the Black-Scholes formulae, knowing the value of a call option on that stock. |
double |
putOnCurrencyVolatility(double foreignRiskFree,
double exchangeRate,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double putValue,
BusinessCalendar businessCalendar)
Calculates the implied volatility of a currency from the Black-Scholes formulae, knowing the value of a put option on that currency. |
double |
putOnCurrencyVolatility(double foreignRiskFree,
double exchangeRate,
double strike,
double riskFreeRate,
double timeToMaturity,
double putValue)
Calculates the implied volatility of a currency from the Black-Scholes formulae, knowing the value of a put option on that currency. |
double |
putOnFuturesVolatility(double futuresPrice,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double putValue,
BusinessCalendar businessCalendar)
Calculates the implied volatility of a futures contract from the Black-Scholes formulae, knowing the value of a put option on that contract. |
double |
putOnFuturesVolatility(double futuresPrice,
double strike,
double riskFreeRate,
double timeToMaturity,
double putValue)
Calculates the implied volatility of a futures contract from the Black-Scholes formulae, knowing the value of a put option on that contract. |
double |
putOnIndexVolatility(double yield,
double indexValue,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double putValue,
BusinessCalendar businessCalendar)
Calculates the implied volatility of an index from the Black-Scholes formulae, knowing the value of a call option on that index. |
double |
putOnIndexVolatility(double yield,
double indexValue,
double strike,
double riskFreeRate,
double timeToMaturity,
double putValue)
Calculates the implied volatility of an index from the Black-Scholes formulae, knowing the value of a call option on that index. |
double |
putVolatility(double assetPrice,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double putValue,
BusinessCalendar businessCalendar)
Calculates the implied volatility of a non-dividend paying stock from the Black-Scholes formulae, knowing the value of a put option on that stock. |
double |
putVolatility(double assetPrice,
double strike,
double riskFreeRate,
double timeToMaturity,
double putValue)
Calculates the implied volatility of a non-dividend paying stock from the Black-Scholes formulae, knowing the value of a put option on that stock. |
double |
putWithYieldVolatility(double yield,
double assetPrice,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double putValue,
BusinessCalendar businessCalendar)
Calculates the implied volatility of a stock which pays dividends during the option life from the Black-Scholes formulae, knowing the value of a put option on that stock. |
double |
putWithYieldVolatility(double yield,
double assetPrice,
double strike,
double riskFreeRate,
double timeToMaturity,
double putValue)
Calculates the implied volatility of a stock which pays dividends during the option life from the Black-Scholes formulae, knowing the value of a put option on that stock. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ImpliedVolatility()
| Method Detail |
public double callVolatility(double assetPrice,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double callValue,
BusinessCalendar businessCalendar)
throws OptionsException,
ImpliedVolatilityDemoException
assetPrice - the stock price at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest ratecallValue - the market value of the call optionevaluationDate - the date when the implied volatility of the option contract is evaluatedmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double callVolatility(double assetPrice,
double strike,
double riskFreeRate,
double timeToMaturity,
double callValue)
throws OptionsException,
ImpliedVolatilityDemoException
assetPrice - the stock price at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest ratetimeToMaturity - the time (in years) until the option contract maturescallValue - the market value of the call option
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double putVolatility(double assetPrice,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double putValue,
BusinessCalendar businessCalendar)
throws OptionsException,
ImpliedVolatilityDemoException
assetPrice - the stock price at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest rateputValue - the market value of the put optionevaluationDate - the date when the implied volatility of the option contract is evaluatedmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double putVolatility(double assetPrice,
double strike,
double riskFreeRate,
double timeToMaturity,
double putValue)
throws OptionsException,
ImpliedVolatilityDemoException
assetPrice - the stock price at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest ratetimeToMaturity - the time (in years) until the option contract maturesputValue - the market value of the put option
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double callWithYieldVolatility(double yield,
double assetPrice,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double callValue,
BusinessCalendar businessCalendar)
throws OptionsException,
ImpliedVolatilityDemoException
yield - the continuous dividend yield paid by the underlying assetassetPrice - the stock price at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest ratecallValue - the market value of the call optionevaluationDate - the date when the implied volatility of the option contract is evaluatedmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double callWithYieldVolatility(double yield,
double assetPrice,
double strike,
double riskFreeRate,
double timeToMaturity,
double callValue)
throws OptionsException,
ImpliedVolatilityDemoException
yield - the continuous dividend yield paid by the underlying assetassetPrice - the stock price at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest ratetimeToMaturity - the time (in years) until the option contract maturescallValue - the market value of the call option
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double putWithYieldVolatility(double yield,
double assetPrice,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double putValue,
BusinessCalendar businessCalendar)
throws OptionsException,
ImpliedVolatilityDemoException
yield - the continuous dividend yield paid by the underlying assetassetPrice - the stock price at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest rateputValue - the market value of the put optionevaluationDate - the date when the implied volatility of the option contract is evaluatedmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double putWithYieldVolatility(double yield,
double assetPrice,
double strike,
double riskFreeRate,
double timeToMaturity,
double putValue)
throws OptionsException,
ImpliedVolatilityDemoException
yield - the continuous dividend yield paid by the underlying assetassetPrice - the stock price at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest ratetimeToMaturity - the time (in years) until the option contract maturesputValue - the market value of the put option
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double callOnIndexVolatility(double yield,
double indexValue,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double callValue,
BusinessCalendar businessCalendar)
throws OptionsException,
ImpliedVolatilityDemoException
yield - the continuous yield of the indexindexValue - the value of the index at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest ratecallValue - the market value of the call optionevaluationDate - the date when the implied volatility of the option contract is evaluatedmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double callOnIndexVolatility(double yield,
double indexValue,
double strike,
double riskFreeRate,
double timeToMaturity,
double callValue)
throws OptionsException,
ImpliedVolatilityDemoException
yield - the continuous yield of the indexindexValue - the value of the index at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest ratetimeToMaturity - the time (in years) until the option contract maturescallValue - the market value of the call option
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double putOnIndexVolatility(double yield,
double indexValue,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double putValue,
BusinessCalendar businessCalendar)
throws OptionsException,
ImpliedVolatilityDemoException
yield - the continuous yield of the indexindexValue - the value of the index at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest rateputValue - the market value of the put optionevaluationDate - the date when the implied volatility of the option contract is evaluatedmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double putOnIndexVolatility(double yield,
double indexValue,
double strike,
double riskFreeRate,
double timeToMaturity,
double putValue)
throws OptionsException,
ImpliedVolatilityDemoException
yield - the continuous yield of the indexindexValue - the value of the index at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest ratetimeToMaturity - the time (in years) until the option contract maturesputValue - the market value of the put option
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double callOnCurrencyVolatility(double foreignRiskFree,
double exchangeRate,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double callValue,
BusinessCalendar businessCalendar)
throws OptionsException,
ImpliedVolatilityDemoException
foreignRiskFree - the continuously compounded risk free interest rate in the foreign currencyexchangeRate - the present exchange ratestrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest ratecallValue - the market value of the call optionevaluationDate - the date when the implied volatility of the option contract is evaluatedmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double callOnCurrencyVolatility(double foreignRiskFree,
double exchangeRate,
double strike,
double riskFreeRate,
double timeToMaturity,
double callValue)
throws OptionsException,
ImpliedVolatilityDemoException
foreignRiskFree - the continuously compounded risk free interest rate in the foreign currencyexchangeRate - the present exchange ratestrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest ratetimeToMaturity - the time (in years) until the option contract maturescallValue - the market value of the call option
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double putOnCurrencyVolatility(double foreignRiskFree,
double exchangeRate,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double putValue,
BusinessCalendar businessCalendar)
throws OptionsException,
ImpliedVolatilityDemoException
foreignRiskFree - the continuously compounded risk free interest rate in the foreign currencyexchangeRate - the present exchange ratestrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest rateputValue - the market value of the put optionevaluationDate - the date when the implied volatility of the option contract is evaluatedmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double putOnCurrencyVolatility(double foreignRiskFree,
double exchangeRate,
double strike,
double riskFreeRate,
double timeToMaturity,
double putValue)
throws OptionsException,
ImpliedVolatilityDemoException
foreignRiskFree - the continuously compounded risk free interest rate in the foreign currencyexchangeRate - the present exchange ratestrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest ratetimeToMaturity - the time (in years) until the option contract maturesputValue - the market value of the put option
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double callOnFuturesVolatility(double futuresPrice,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double callValue,
BusinessCalendar businessCalendar)
throws OptionsException,
ImpliedVolatilityDemoException
futuresPrice - the futures price at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest ratecallValue - the market value of the call optionevaluationDate - the date when the implied volatility of the option contract is evaluatedmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double callOnFuturesVolatility(double futuresPrice,
double strike,
double riskFreeRate,
double timeToMaturity,
double callValue)
throws OptionsException,
ImpliedVolatilityDemoException
futuresPrice - the futures price at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest ratetimeToMaturity - the time (in years) until the option contract maturescallValue - the market value of the call option
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double putOnFuturesVolatility(double futuresPrice,
double strike,
double riskFreeRate,
Date evaluationDate,
Date maturityDate,
double putValue,
BusinessCalendar businessCalendar)
throws OptionsException,
ImpliedVolatilityDemoException
futuresPrice - the futures price at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest rateputValue - the market value of the put optionevaluationDate - the date when the implied volatility of the option contract is evaluatedmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
public double putOnFuturesVolatility(double futuresPrice,
double strike,
double riskFreeRate,
double timeToMaturity,
double putValue)
throws OptionsException,
ImpliedVolatilityDemoException
futuresPrice - the futures price at time zerostrike - the strike of the optionriskFreeRate - the continuously compounded risk free interest ratetimeToMaturity - the time (in years) until the option contract maturesputValue - the market value of the put option
OptionsException - thrown when the implied volatility cannot be deduced from the
given values.
ImpliedVolatilityDemoException
|
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 | |||||||||