WebCab Options and Futures Demo
v2.5
(J2SE Edition)

webcab.lib.finance.options
Class EuropeanTheta

java.lang.Object
  |
  +--webcab.lib.finance.options.EuropeanTheta
All Implemented Interfaces:
Serializable

public class EuropeanTheta
extends Object
implements Serializable

Within this class we consider the evaluation of the Theta of a European option on equities, equity indexes, currencies and future contracts in accordance with the classical Black-Scholes model.

Recall that the Theta of an option contract is the rate of change (i.e. the first derivative) of the option with respect to changes in the time to maturity. The Theta is often referred to as the time decay of an option (or portfolio).

See Also:
Serialized Form

Constructor Summary
EuropeanTheta()
          Creates a new instance.
 
Method Summary
 double callTheta(double stockPrice, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)
          This method calculates the theta per year of a European call option on a non-dividend-paying stock.
 double callTheta(double stockPrice, double strike, double riskFreeRate, double volatility, double timeToMaturity)
          This method calculates the theta per year of a European call option on a non-dividend-paying stock.
 double callThetaOnCurrency(double interest, double exchangeRate, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)
          Returns the theta of a European call option on a currency.
 double callThetaOnCurrency(double interest, double exchangeRate, double strike, double riskFreeRate, double volatility, double timeToMaturity)
          Returns the theta of a European call option on a currency.
 double callThetaOnFutures(double futuresPrice, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)
          Returns the theta of a European call option on a futures contract
 double callThetaOnFutures(double futuresPrice, double strike, double riskFreeRate, double volatility, double timeToMaturity)
          Returns the theta of a European call option on a futures contract
 double callThetaWithYield(double yield, double stockPrice, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)
          Returns the theta of a European call option on an asset paying a continuous yield (for example an option on a index).
 double callThetaWithYield(double yield, double stockPrice, double strike, double riskFreeRate, double volatility, double timeToMaturity)
          Returns the theta of a European call option on an asset paying a continuous yield (for example an option on a index).
 double putTheta(double stockPrice, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)
          This method calculates the theta per year of a European put option on a non-dividend paying stock.
 double putTheta(double stockPrice, double strike, double riskFreeRate, double volatility, double timeToMaturity)
          This method calculates the theta per year of a European put option on a non-dividend paying stock.
 double putThetaOnCurrency(double interest, double exchangeRate, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)
          Returns the theta of a European put option on a currency.
 double putThetaOnCurrency(double interest, double exchangeRate, double strike, double riskFreeRate, double volatility, double timeToMaturity)
          Returns the theta of a European put option on a currency.
 double putThetaOnFutures(double futuresPrice, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)
          Returns the theta of a European put option on a futures contract
 double putThetaOnFutures(double futuresPrice, double strike, double riskFreeRate, double volatility, double timeToMaturity)
          Returns the theta of a European put option on a futures contract
 double putThetaWithYield(double yield, double stockPrice, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)
          Returns the theta of a European put option on an asset paying a continuous yield (for example an option on a index).
 double putThetaWithYield(double yield, double stockPrice, double strike, double riskFreeRate, double volatility, double timeToMaturity)
          Returns the theta of a European put option on an asset paying a continuous yield (for example an option on a index).
 double thetaFromGammaDelta(double delta, double gamma, double assetPrice, double riskFreeRate, double volatility, double totalValue)
          We derive the theta from the delta, gamma and some other market variables for a portfolio of derivative all defined on some underlying asset.
 double year2DayThetaConvert(double thetaPerYear)
          Converts the theta expressed as per year into the equivalent per day reading.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EuropeanTheta

public EuropeanTheta()
Creates a new instance.

Method Detail

callTheta

public double callTheta(double stockPrice,
                        double strike,
                        double riskFreeRate,
                        double volatility,
                        Date evaluationDate,
                        Date maturityDate,
                        BusinessCalendar businessCalendar)
                 throws EuropeanThetaDemoException
This method calculates the theta per year of a European call option on a non-dividend-paying stock.

Parameters:
stockPrice - the value of the underlying stock
strike - the strike of the call option
riskFreeRate - the continuously compounded risk free interest rate
volatility - the volatility of the underlying stock price
evaluationDate - the date when the theta of the option contract is evaluated
maturityDate - the date when the option contract matures
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanThetaDemoException

callTheta

public double callTheta(double stockPrice,
                        double strike,
                        double riskFreeRate,
                        double volatility,
                        double timeToMaturity)
                 throws EuropeanThetaDemoException
This method calculates the theta per year of a European call option on a non-dividend-paying stock.

Parameters:
stockPrice - the value of the underlying stock
strike - the strike of the call option
riskFreeRate - the continuously compounded risk free interest rate
timeToMaturity - the length of time until the option expires
volatility - the volatility of the underlying stock price
EuropeanThetaDemoException

putTheta

public double putTheta(double stockPrice,
                       double strike,
                       double riskFreeRate,
                       double volatility,
                       Date evaluationDate,
                       Date maturityDate,
                       BusinessCalendar businessCalendar)
                throws EuropeanThetaDemoException
This method calculates the theta per year of a European put option on a non-dividend paying stock.

Parameters:
stockPrice - the value of the underlying stock
strike - the strike of the put option
riskFreeRate - the continuously compounded risk free interest rate
volatility - the volatility of the underlying stock price
evaluationDate - the date when the theta of the option contract is evaluated
maturityDate - the date when the option contract matures
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanThetaDemoException

putTheta

public double putTheta(double stockPrice,
                       double strike,
                       double riskFreeRate,
                       double volatility,
                       double timeToMaturity)
                throws EuropeanThetaDemoException
This method calculates the theta per year of a European put option on a non-dividend paying stock.

Parameters:
stockPrice - the value of the underlying stock
strike - the strike of the put option
riskFreeRate - the continuously compounded risk free interest rate
timeToMaturity - the length of time until the option expires
volatility - the volatility of the underlying stock price
EuropeanThetaDemoException

year2DayThetaConvert

public double year2DayThetaConvert(double thetaPerYear)
                            throws EuropeanThetaDemoException
Converts the theta expressed as per year into the equivalent per day reading. Note that the trading year contains 252 trading days.

Parameters:
thetaPerYear - this is the theta per year of an asset
EuropeanThetaDemoException

callThetaWithYield

public double callThetaWithYield(double yield,
                                 double stockPrice,
                                 double strike,
                                 double riskFreeRate,
                                 double volatility,
                                 Date evaluationDate,
                                 Date maturityDate,
                                 BusinessCalendar businessCalendar)
                          throws EuropeanThetaDemoException
Returns the theta of a European call option on an asset paying a continuous yield (for example an option on a index).

Parameters:
yield - the continuous yield of the underlying asset
stockPrice - the value of the underlying stock price
strike - the strike of the call option
riskFreeRate - the continuously compounded risk free interest rate
volatility - the volatility of the underlying stock price
evaluationDate - the date when the theta of the option contract is evaluated
maturityDate - the date when the option contract matures
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanThetaDemoException

callThetaWithYield

public double callThetaWithYield(double yield,
                                 double stockPrice,
                                 double strike,
                                 double riskFreeRate,
                                 double volatility,
                                 double timeToMaturity)
                          throws EuropeanThetaDemoException
Returns the theta of a European call option on an asset paying a continuous yield (for example an option on a index).

Parameters:
yield - the continuous yield of the underlying asset
stockPrice - the value of the underlying stock price
strike - the strike of the call option
riskFreeRate - the continuously compounded risk free interest rate
volatility - the volatility of the underlying stock price
timeToMaturity - the length of time until the option expires
EuropeanThetaDemoException

putThetaWithYield

public double putThetaWithYield(double yield,
                                double stockPrice,
                                double strike,
                                double riskFreeRate,
                                double volatility,
                                Date evaluationDate,
                                Date maturityDate,
                                BusinessCalendar businessCalendar)
                         throws EuropeanThetaDemoException
Returns the theta of a European put option on an asset paying a continuous yield (for example an option on a index).

Parameters:
yield - the continuous yield of the underlying asset
stockPrice - the value of the underlying stock price
strike - the strike of the call option
riskFreeRate - the continuously compounded risk free interest rate
volatility - the volatility of the underlying stock price
evaluationDate - the date when the theta of the option contract is evaluated
maturityDate - the date when the option contract matures
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanThetaDemoException

putThetaWithYield

public double putThetaWithYield(double yield,
                                double stockPrice,
                                double strike,
                                double riskFreeRate,
                                double volatility,
                                double timeToMaturity)
                         throws EuropeanThetaDemoException
Returns the theta of a European put option on an asset paying a continuous yield (for example an option on a index).

Parameters:
yield - the continuous yield of the underlying asset
stockPrice - the value of the underlying stock price
strike - the strike of the call option
riskFreeRate - the continuously compounded risk free interest rate
timeToMaturity - the length of time until the option expires
volatility - the volatility of the underlying stock price
EuropeanThetaDemoException

callThetaOnCurrency

public double callThetaOnCurrency(double interest,
                                  double exchangeRate,
                                  double strike,
                                  double riskFreeRate,
                                  double volatility,
                                  Date evaluationDate,
                                  Date maturityDate,
                                  BusinessCalendar businessCalendar)
                           throws EuropeanThetaDemoException
Returns the theta of a European call option on a currency.

Parameters:
interest - the continuously compounded risk free interest rate on the foreign currency
exchangeRate - the exchange rate
strike - the exchange rate at which the currency option is exercised at
riskFreeRate - the continuously compounded risk free interest rate in the base currency
volatility - the volatility of the exchange rate
evaluationDate - the date when the theta of the option contract is evaluated
maturityDate - the date when the option contract matures
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanThetaDemoException

callThetaOnCurrency

public double callThetaOnCurrency(double interest,
                                  double exchangeRate,
                                  double strike,
                                  double riskFreeRate,
                                  double volatility,
                                  double timeToMaturity)
                           throws EuropeanThetaDemoException
Returns the theta of a European call option on a currency.

Parameters:
interest - the continuously compounded risk free interest rate on the foreign currency
exchangeRate - the exchange rate
strike - the exchange rate at which the currency option is exercised at
riskFreeRate - the continuously compounded risk free interest rate in the base currency
timeToMaturity - the time until the option expires
volatility - the volatility of the exchange rate
EuropeanThetaDemoException

putThetaOnCurrency

public double putThetaOnCurrency(double interest,
                                 double exchangeRate,
                                 double strike,
                                 double riskFreeRate,
                                 double volatility,
                                 Date evaluationDate,
                                 Date maturityDate,
                                 BusinessCalendar businessCalendar)
                          throws EuropeanThetaDemoException
Returns the theta of a European put option on a currency.

Parameters:
interest - the continuously compounded risk free interest rate on the foreign currency
exchangeRate - the exchange rate
strike - the exchange rate at which the currency option is exercised at
riskFreeRate - the continuously compounded risk free interest rate in the base currency
volatility - the volatility of the exchange rate
evaluationDate - the date when the theta of the option contract is evaluated
maturityDate - the date when the option contract matures
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanThetaDemoException

putThetaOnCurrency

public double putThetaOnCurrency(double interest,
                                 double exchangeRate,
                                 double strike,
                                 double riskFreeRate,
                                 double volatility,
                                 double timeToMaturity)
                          throws EuropeanThetaDemoException
Returns the theta of a European put option on a currency.

Parameters:
interest - the continuously compounded risk free interest rate on the foreign currency
exchangeRate - the exchange rate
strike - the exchange rate at which the currency option is exercised at
riskFreeRate - the continuously compounded risk free interest rate in the base currency
timeToMaturity - the time until the option expires
volatility - the volatility of the exchange rate
EuropeanThetaDemoException

callThetaOnFutures

public double callThetaOnFutures(double futuresPrice,
                                 double strike,
                                 double riskFreeRate,
                                 double volatility,
                                 Date evaluationDate,
                                 Date maturityDate,
                                 BusinessCalendar businessCalendar)
                          throws EuropeanThetaDemoException
Returns the theta of a European call option on a futures contract

Parameters:
futuresPrice - the futures price at time zero
strike - the value of the futures contract at which option can be exercised
riskFreeRate - the risk free interest rate
volatility - volatility of the futures contract
evaluationDate - the date when the theta of the option contract is evaluated
maturityDate - the date when the option contract matures
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanThetaDemoException

callThetaOnFutures

public double callThetaOnFutures(double futuresPrice,
                                 double strike,
                                 double riskFreeRate,
                                 double volatility,
                                 double timeToMaturity)
                          throws EuropeanThetaDemoException
Returns the theta of a European call option on a futures contract

Parameters:
futuresPrice - the futures price at time zero
strike - the value of the futures contract at which option can be exercised
riskFreeRate - the risk free interest rate
volatility - volatility of the futures contract
timeToMaturity - the time to maturity of the option (in years)
EuropeanThetaDemoException

putThetaOnFutures

public double putThetaOnFutures(double futuresPrice,
                                double strike,
                                double riskFreeRate,
                                double volatility,
                                Date evaluationDate,
                                Date maturityDate,
                                BusinessCalendar businessCalendar)
                         throws EuropeanThetaDemoException
Returns the theta of a European put option on a futures contract

Parameters:
futuresPrice - the futures price at time zero
strike - the value of the futures contract at which option can be exercised
riskFreeRate - the risk free interest rate
volatility - volatility of the futures contract
evaluationDate - the date when the theta of the option contract is evaluated
maturityDate - the date when the option contract matures
businessCalendar - The instance of a BusinessCalendar interface implementation. Specify null to select the London business calendar.
EuropeanThetaDemoException

putThetaOnFutures

public double putThetaOnFutures(double futuresPrice,
                                double strike,
                                double riskFreeRate,
                                double volatility,
                                double timeToMaturity)
                         throws EuropeanThetaDemoException
Returns the theta of a European put option on a futures contract

Parameters:
futuresPrice - the futures price at time zero
strike - the value of the futures contract at which option can be exercised
riskFreeRate - the risk free interest rate
volatility - volatility of the futures contract
timeToMaturity - the time to maturity of the option (in years)
EuropeanThetaDemoException

thetaFromGammaDelta

public double thetaFromGammaDelta(double delta,
                                  double gamma,
                                  double assetPrice,
                                  double riskFreeRate,
                                  double volatility,
                                  double totalValue)
                           throws EuropeanThetaDemoException
We derive the theta from the delta, gamma and some other market variables for a portfolio of derivative all defined on some underlying asset. Note that for a delta neutral portfolio of derivatives on an underlying asset this expression relates the gamma and theta functions.

Parameters:
delta - the delta with respect to the underlying asset of the portfolio
gamma - the gamma with respect to the underlying asset of the portfolio
assetPrice - the underlying assets price
volatility - the volatility of the underlying assets price
riskFreeRate - the continuously compounded risk free interest rate
totalValue - the value of the whole portfolio
EuropeanThetaDemoException

WebCab Options and Futures Demo
v2.5
(J2SE Edition)