|
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.EuropeanEvaluation
Within this class we consider the evaluation of the present value of European options on equities, equity indexes, currencies and futures contracts in accordance with the classical Black-Scholes model.
| Constructor Summary | |
EuropeanEvaluation()
Creates a new instance. |
|
| Method Summary | |
double |
call(double price,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Calculates the present value of a European call option. |
double |
call(double price,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
Calculates the present value of a European call option. |
double |
callOnCurrency(double foreignRate,
double exchangeRate,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Evaluates the value of a European call option on a currency. |
double |
callOnCurrency(double foreignRate,
double exchangeRate,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
Evaluates the value of a European call option on a currency. |
double |
callOnFutures(double futuresPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Evaluates the present value of a European call option on a (stock) futures contract. |
double |
callOnFutures(double futuresPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
Evaluates the present value of a European call option on a (stock) futures contract. |
double |
callOnIndex(double yield,
double indexValue,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Evaluates the value of a European call option on an index. |
double |
callOnIndex(double yield,
double indexValue,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
Evaluates the value of a European call option on an index. |
double |
callWithDividends(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
double[] dividend,
double[] dividendPaymentDates,
BusinessCalendar businessCalendar)
Calculates the present value of a European call option on an equity investment which pays dividends during the options life. |
double |
callWithDividends(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity,
double[] dividend,
double[] dividendPaymentDates)
Calculates the present value of a European call option on an equity investment which pays dividends during the options life. |
double |
callWithYield(double yield,
double stockPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Calculates the value of a European call option where the underlying asset pays a continuous dividend. |
double |
callWithYield(double yield,
double stockPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
Calculates the value of a European call option where the underlying asset pays a continuous dividend. |
double |
payOffCall(double maturityPrice,
double strike)
This method calculates the payoff at maturity from a European call option. |
double |
payOffPut(double maturityPrice,
double strike)
This method calculates the payoff at maturity from a European put option. |
double |
put(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Calculates the present value of a European put option on an investment asset which does not pay any dividends, coupons or interest. |
double |
put(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
Calculates the present value of a European put option on an investment asset which does not pay any dividends, coupons or interest. |
double |
putOnCurrency(double foreignRate,
double exchangeRate,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Evaluates the value of a European put options on a currency. |
double |
putOnCurrency(double foreignRate,
double exchangeRate,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
Evaluates the value of a European put options on a currency. |
double |
putOnFutures(double futuresPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Evaluates the present value of a European put option on a (stock) futures contract. |
double |
putOnFutures(double futuresPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
Evaluates the present value of a European put option on a (stock) futures contract. |
double |
putOnIndex(double yield,
double indexValue,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Evaluates the value of a European put option on an index. |
double |
putOnIndex(double yield,
double indexValue,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
Evaluates the value of a European put option on an index. |
double |
putWithDividends(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
double[] dividends,
double[] dividendPaymentDates,
BusinessCalendar businessCalendar)
Calculates the present value of a European put option on an equity investment which pays dividends during the options life. |
double |
putWithDividends(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity,
double[] dividends,
double[] dividendPaymentDates)
Calculates the present value of a European put option on an equity investment which pays dividends during the options life. |
double |
putWithYield(double yield,
double stockPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
Evaluates the present value of a European put option where the underlying asset pays a continuous dividend. |
double |
putWithYield(double yield,
double stockPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
Evaluates the present value of a European put option where the underlying asset pays a continuous dividend. |
double |
totalValue(double delta,
double theta,
double gamma,
double assetPrice,
double riskFreeRate,
double volatility)
Here we derive an estimate of the total value of a portfolio of derivatives whch depend on some underlying asset. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EuropeanEvaluation()
| Method Detail |
public double payOffCall(double maturityPrice,
double strike)
throws EuropeanEvaluationDemoException
maturityPrice - the price of the underlying asset at the mature on the option contractstrike - the strike price of the call option
EuropeanEvaluationDemoException
public double payOffPut(double maturityPrice,
double strike)
throws EuropeanEvaluationDemoException
maturityPrice - the price of the underlying asset price at the maturity of the option contractstrike - the strike price of the put option
EuropeanEvaluationDemoException
public double call(double price,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws EuropeanEvaluationDemoException
price - the present price of the underlying asset on which the call option can be exercisedstrike - the strike price of the call optionriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the price of the underlying assetevaluationDate - the evaluation date of the optionmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanEvaluationDemoException
public double call(double price,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
throws EuropeanEvaluationDemoException
price - the present price of the underlying asset on which the call option can be exercisedstrike - the strike price of the call optionriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the price of the underlying assettimeToMaturity - the time (in years) until the option matures
EuropeanEvaluationDemoException
public double put(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws EuropeanEvaluationDemoException
stockPrice - the present price of the stock pricestrike - the strike price of the put optionriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the underlying asset priceevaluationDate - the evaluation date of the optionmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanEvaluationDemoException
public double put(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
throws EuropeanEvaluationDemoException
stockPrice - the present price of the stock pricestrike - the strike price of the put optionriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the underlying asset pricetimeToMaturity - the time (in years) until the option contract matures
EuropeanEvaluationDemoException
public double callWithDividends(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
double[] dividend,
double[] dividendPaymentDates,
BusinessCalendar businessCalendar)
throws EuropeanEvaluationDemoException
stockPrice - the present market price of the stockstrike - the strike of the call optionriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the stockdividendPaymentDates - an array of months to when each of the corresponding dividend payments will be paidevaluationDate - the evaluation date of the optionmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanEvaluationDemoException
public double callWithDividends(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity,
double[] dividend,
double[] dividendPaymentDates)
throws EuropeanEvaluationDemoException
stockPrice - the present market price of the stockstrike - the strike of the call optionriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the stocktimeToMaturity - the time to the maturity of the option (in years)dividendPaymentDates - an array of months to when each of the corresponding dividend payments will be paid
EuropeanEvaluationDemoException
public double putWithDividends(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
double[] dividends,
double[] dividendPaymentDates,
BusinessCalendar businessCalendar)
throws EuropeanEvaluationDemoException
stockPrice - the present stock pricestrike - the strike of the call optionriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the stock pricedividends - an array of dividend payments during the option perioddividendPaymentDates - an array of months to when each of the corresponding dividend payments will be paidevaluationDate - the evaluation date of the optionmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanEvaluationDemoException
public double putWithDividends(double stockPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity,
double[] dividends,
double[] dividendPaymentDates)
throws EuropeanEvaluationDemoException
stockPrice - the present stock pricestrike - the strike of the call optionriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the stock pricetimeToMaturity - the time (in years) to the maturity of the optiondividends - an array of dividend payments during the option perioddividendPaymentDates - an array of months to when each of the corresponding dividend payments will be paid
EuropeanEvaluationDemoException
public double callWithYield(double yield,
double stockPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws EuropeanEvaluationDemoException
yield - this is the continuous dividend yield paid by the underlying assetstockPrice - the stock priceostrike - the strike price of the call optionriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the stock or asset priceevaluationDate - the evaluation date of the optionmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanEvaluationDemoException
public double callWithYield(double yield,
double stockPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
throws EuropeanEvaluationDemoException
yield - this is the continuous dividend yield paid by the underlying assetstockPrice - the stock priceostrike - the strike price of the call optionriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the stock or asset pricetimeToMaturity - the time (in years) to the maturity of the option
EuropeanEvaluationDemoException
public double putWithYield(double yield,
double stockPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws EuropeanEvaluationDemoException
yield - the continuous dividend yield paid by the underlying assetstockPrice - the stock pricestrike - the strike price of the put optionriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the stock or asset priceevaluationDate - the evaluation date of the optionmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanEvaluationDemoException
public double putWithYield(double yield,
double stockPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
throws EuropeanEvaluationDemoException
yield - the continuous dividend yield paid by the underlying assetstockPrice - the stock pricestrike - the strike price of the put optionriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the stock or asset pricetimeToMaturity - the time (in years) until the option matures
EuropeanEvaluationDemoException
public double callOnIndex(double yield,
double indexValue,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws EuropeanEvaluationDemoException
yield - the average yield of the contingents of the indexindexValue - the value of the indexstrike - index value at which the option is exercisedriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the indexevaluationDate - the evaluation date of the optionmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanEvaluationDemoException
public double callOnIndex(double yield,
double indexValue,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
throws EuropeanEvaluationDemoException
yield - the average yield of the contingents of the indexindexValue - the value of the indexstrike - index value at which the option is exercisedriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the indextimeToMaturity - the time (in years) until the option matures
EuropeanEvaluationDemoException
public double putOnIndex(double yield,
double indexValue,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws EuropeanEvaluationDemoException
yield - the average yield of the contingents of the indexindexValue - the value of the indexstrike - index value at which the option is exercisedriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the indexevaluationDate - the evaluation date of the optionmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanEvaluationDemoException
public double putOnIndex(double yield,
double indexValue,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
throws EuropeanEvaluationDemoException
yield - the average yield of the contingents of the indexindexValue - the value of the indexstrike - index value at which the option is exercisedriskFreeRate - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the indextimeToMaturity - the time (in years) until the option contract matures
EuropeanEvaluationDemoException
public double callOnCurrency(double foreignRate,
double exchangeRate,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws EuropeanEvaluationDemoException
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 - continuously compounded risk free interest rate in the base currency expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the exchange rateevaluationDate - the evaluation date of the optionmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanEvaluationDemoException
public double callOnCurrency(double foreignRate,
double exchangeRate,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
throws EuropeanEvaluationDemoException
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 - continuously compounded risk free interest rate in the base currency expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the exchange ratetimeToMaturity - time to the maturity of the option (in years)
EuropeanEvaluationDemoException
public double putOnCurrency(double foreignRate,
double exchangeRate,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws EuropeanEvaluationDemoException
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 currency expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the exchange rateevaluationDate - the evaluation date of the optionmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanEvaluationDemoException
public double putOnCurrency(double foreignRate,
double exchangeRate,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
throws EuropeanEvaluationDemoException
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 currency expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the exchange ratetimeToMaturity - the time (in years) until the option contract matures
EuropeanEvaluationDemoException
public double callOnFutures(double futuresPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws EuropeanEvaluationDemoException
futuresPrice - the present price the underlying futures pricestrike - the strike of the options contract. The strike is the price at which the underlying futures contract can be purchased at when the call option is exercised.riskFreeRate - continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the underlying futures contractevaluationDate - the evaluation date of the optionmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanEvaluationDemoException
public double callOnFutures(double futuresPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
throws EuropeanEvaluationDemoException
futuresPrice - the present price the underlying futures pricestrike - the strike of the options contract. The strike is the price at which the underlying futures contract can be purchased at when the call option is exercised.riskFreeRate - continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the underlying futures contracttimeToMaturity - the time (in years) until the option contract expires
EuropeanEvaluationDemoException
public double putOnFutures(double futuresPrice,
double strike,
double riskFreeRate,
double volatility,
Date evaluationDate,
Date maturityDate,
BusinessCalendar businessCalendar)
throws EuropeanEvaluationDemoException
futuresPrice - the present price of the underlying futures contractstrike - the strike of the option contract. The strike is the price at which the underlying futures contracts can be sold at when the put option is exercised.riskFreeRate - the risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the underlying futures contractevaluationDate - the evaluation date of the optionmaturityDate - the date when the option contract maturesbusinessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanEvaluationDemoException
public double putOnFutures(double futuresPrice,
double strike,
double riskFreeRate,
double volatility,
double timeToMaturity)
throws EuropeanEvaluationDemoException
futuresPrice - the present price of the underlying futures contractstrike - the strike of the option contract. The strike is the price at which the underlying futures contracts can be sold at when the put option is exercised.riskFreeRate - the risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)volatility - the volatility of the underlying futures contracttimeToMaturity - the time (in years) until the option contract matures
EuropeanEvaluationDemoException
public double totalValue(double delta,
double theta,
double gamma,
double assetPrice,
double riskFreeRate,
double volatility)
throws EuropeanEvaluationDemoException
Example: This method could be applied to a portfolio consisting of derivative contracts on Gold (i.e. AU). In this case, if we know the delta, theta and gamma of the gold portfolio, the market price and volatility of gold and the risk free interest rate of the reference currency. Then we are able to estimate (to the second order) the value of the entire portfolio with respect to the reference currency.
delta - the delta of the portfoliotheta - the theta of the portfoliogamma - the gamma of the portfolioassetPrice - the underlying asset pricevolatility - the volatility of the underlying asset priceriskFreeRate - the continuously compounded risk free interest rate in the reference currency expressed in decimal format (i.e. 1 percent = 0.01)
EuropeanEvaluationDemoException
|
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 | |||||||||