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

## webcab.lib.finance.options
Class EuropeanDelta

    java.lang.Object
      |
      +--webcab.lib.finance.options.EuropeanDelta

All Implemented Interfaces:
  Serializable

public class EuropeanDelta
extends Object
implements Serializable

Within this class we consider the evaluation of the Delta of European options on equities, equity indexes, currencies and futures contracts in accordance with the classical Black-Scholes model.

Recall that the Delta of an option contract is the rate of change (i.e. the 1st derivative) of the option price with respect to changes of the underlying asset price.

See Also:
  Serialized Form

Constructor Summary
`EuropeanDelta()` Creates a new instance.

Method Summary
`double` `callDelta(double stockPrice, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)` This method calculates the delta of a European call option on a non-dividend paying equity investment.
`double` `callDelta(double stockPrice, double strike, double riskFreeRate, double volatility, double timeToMaturity)` This method calculates the delta of a European call option on a non-dividend paying equity investment.
`double` `callDeltaOnCurrency(double foreignRate, double exchangeRate, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)` Returns the delta of a European call option on a currency.
`double` `callDeltaOnCurrency(double foreignRate, double exchangeRate, double strike, double riskFreeRate, double volatility, double timeToMaturity)` Returns the delta of a European call option on a currency.
`double` `callDeltaOnFutures(double futuresPrice, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)` Returns the delta of a European call option on a (stock) futures contract.
`double` `callDeltaOnFutures(double futuresPrice, double strike, double riskFreeRate, double volatility, double timeToMaturity)` Returns the delta of a European call option on a (stock) futures contract.
`double` `callDeltaOnIndex(double yield, double indexValue, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)` Evaluates the Delta of a European call option on an index.
`double` `callDeltaOnIndex(double yield, double indexValue, double strike, double riskFreeRate, double volatility, double timeToMaturity)` Evaluates the Delta of a European call option on an index.
`double` `callDeltaWithYield(double yield, double assetPrice, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)` This method calculates the delta of a European call option on an asset which has a continuous yield.
`double` `callDeltaWithYield(double yield, double assetPrice, double strike, double riskFreeRate, double volatility, double timeToMaturity)` This method calculates the delta of a European call option on an asset which has a continuous yield.
`double` `deltaOfPortfolio(double[] numberOfOptions, double[] deltaOfOptions)` Evaluates the Delta of a portfolio of options is calculated when the number of each option held within the portfolio and the delta of each option is known.
`double` `putDelta(double stockPrice, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)` This method calculates the delta of a European put option on a non-dividend paying stock.
`double` `putDelta(double stockPrice, double strike, double riskFreeRate, double volatility, double timeToMaturity)` This method calculates the delta of a European put option on a non-dividend paying stock.
`double` `putDeltaOnCurrency(double foreignRate, double exchangeRate, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)` Returns the delta of a European put option on a currency.
`double` `putDeltaOnCurrency(double foreignRate, double exchangeRate, double strike, double riskFreeRate, double volatility, double timeToMaturity)` Returns the delta of a European put option on a currency.
`double` `putDeltaOnFutures(double futuresPrice, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)` Returns the delta of a European put option on a (stock) futures contract.
`double` `putDeltaOnFutures(double futuresPrice, double strike, double riskFreeRate, double volatility, double timeToMaturity)` Returns the delta of a European put option on a (stock) futures contract.
`double` `putDeltaOnIndex(double yield, double indexValue, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)` The delta of a European put option on an index.
`double` `putDeltaOnIndex(double yield, double indexValue, double strike, double riskFreeRate, double volatility, double timeToMaturity)` The delta of a European put option on an index.
`double` `putDeltaWithYield(double yield, double assetPrice, double strike, double riskFreeRate, double volatility, Date evaluationDate, Date maturityDate, BusinessCalendar businessCalendar)` This method calculates the delta of a European put option on an asset which has a continuous yield.
`double` `putDeltaWithYield(double yield, double assetPrice, double strike, double riskFreeRate, double volatility, double timeToMaturity)` This method calculates the delta of a European put option on an asset 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

### EuropeanDelta

    public EuropeanDelta()

  Creates a new instance.

Method Detail

### callDelta

    public double callDelta(double stockPrice,
                            double strike,
                            double riskFreeRate,
                            double volatility,
                            Date evaluationDate,
                            Date maturityDate,
                            BusinessCalendar businessCalendar)
                     throws EuropeanDeltaDemoException

  This method calculates the delta of a European call option on a non-dividend paying equity investment.

  Parameters:
    `volatility` - volatility of the underlying asset
    `strike` - the strike of the European call option
    `riskFreeRate` - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `evaluationDate` - the date when the delta of the European call option is evaluated
    `maturityDate` - the maturity date of the call option
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `EuropeanDeltaDemoException`

### callDelta

    public double callDelta(double stockPrice,
                            double strike,
                            double riskFreeRate,
                            double volatility,
                            double timeToMaturity)
                     throws EuropeanDeltaDemoException

  This method calculates the delta of a European call option on a non-dividend paying equity investment.

  Parameters:
    `volatility` - volatility of the underlying asset
    `timeToMaturity` - the time (in years) until the option matures
    `strike` - the strike of the European call option
    `riskFreeRate` - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `EuropeanDeltaDemoException`

### putDelta

    public double putDelta(double stockPrice,
                           double strike,
                           double riskFreeRate,
                           double volatility,
                           Date evaluationDate,
                           Date maturityDate,
                           BusinessCalendar businessCalendar)
                    throws EuropeanDeltaDemoException

  This method calculates the delta of a European put option on a non-dividend paying stock.

  Parameters:
    `stockPrice` - the stock price at the point of evaluation
    `volatility` - volatility of the underlying asset
    `strike` - the strike of the European call option
    `riskFreeRate` - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `evaluationDate` - the date when the delta of the European put option is evaluated
    `maturityDate` - the maturity date of the put option
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `EuropeanDeltaDemoException`

### putDelta

    public double putDelta(double stockPrice,
                           double strike,
                           double riskFreeRate,
                           double volatility,
                           double timeToMaturity)
                    throws EuropeanDeltaDemoException

  This method calculates the delta of a European put option on a non-dividend paying stock.

  Parameters:
    `stockPrice` - the stock price at the point of evaluation
    `volatility` - volatility of the underlying asset
    `timeToMaturity` - time to the maturity of the option (in years)
    `strike` - the strike of the European call option
    `riskFreeRate` - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `EuropeanDeltaDemoException`

### callDeltaWithYield

    public double callDeltaWithYield(double yield,
                                     double assetPrice,
                                     double strike,
                                     double riskFreeRate,
                                     double volatility,
                                     Date evaluationDate,
                                     Date maturityDate,
                                     BusinessCalendar businessCalendar)
                              throws EuropeanDeltaDemoException

  This method calculates the delta of a European call option on an asset which has a continuous yield.

  Parameters:
    `assetPrice` - the stock (index or currency) price at the point of evaluation
    `volatility` - volatility of the underlying asset
    `strike` - the strike of the European call option
    `riskFreeRate` - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `yield` - the continuous yield of the underlying asset during the life of the option contract
    `evaluationDate` - the date when the delta of the European call option is evaluated
    `maturityDate` - the maturity date of the call option
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `EuropeanDeltaDemoException`

### callDeltaWithYield

    public double callDeltaWithYield(double yield,
                                     double assetPrice,
                                     double strike,
                                     double riskFreeRate,
                                     double volatility,
                                     double timeToMaturity)
                              throws EuropeanDeltaDemoException

  This method calculates the delta of a European call option on an asset which has a continuous yield.

  Parameters:
    `assetPrice` - the stock (index or currency) price at the point of evaluation
    `volatility` - volatility of the underlying asset
    `timeToMaturity` - time to the maturity of the option (in years)
    `strike` - the strike of the European call option
    `riskFreeRate` - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `yield` - the continuous yield of the underlying asset during the life of the option contract
    `EuropeanDeltaDemoException`

### putDeltaWithYield

    public double putDeltaWithYield(double yield,
                                    double assetPrice,
                                    double strike,
                                    double riskFreeRate,
                                    double volatility,
                                    Date evaluationDate,
                                    Date maturityDate,
                                    BusinessCalendar businessCalendar)
                             throws EuropeanDeltaDemoException

  This method calculates the delta of a European put option on an asset which has a continuous yield.

  Parameters:
    `assetPrice` - the stock (index or currency) price at the point of evaluation
    `volatility` - volatility of the underlying asset
    `strike` - the strike of the European call option
    `riskFreeRate` - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `yield` - the continuous yield of the underlying asset during the life of the option contract
    `evaluationDate` - the date when the delta of the European put option is evaluated
    `maturityDate` - the maturity date of the put option
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `EuropeanDeltaDemoException`

### putDeltaWithYield

    public double putDeltaWithYield(double yield,
                                    double assetPrice,
                                    double strike,
                                    double riskFreeRate,
                                    double volatility,
                                    double timeToMaturity)
                             throws EuropeanDeltaDemoException

  This method calculates the delta of a European put option on an asset which has a continuous yield.

  Parameters:
    `assetPrice` - the stock (index or currency) price at the point of evaluation
    `volatility` - volatility of the underlying asset
    `timeToMaturity` - time (in years) until the option matures
    `strike` - the strike of the European call option
    `riskFreeRate` - the continuously compounded risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `yield` - the continuous yield of the underlying asset during the life of the option contract
    `EuropeanDeltaDemoException`

### deltaOfPortfolio

    public double deltaOfPortfolio(double[] numberOfOptions,
                                   double[] deltaOfOptions)
                            throws OptionsException,
                                   EuropeanDeltaDemoException

  Evaluates the Delta of a portfolio of options is calculated when the number of each option held within the portfolio and the delta of each option is known.

  Parameters:
    `numberOfOptions` - this is an array for which numberOfOptions[i], corresponds to the number of the i+1th option within the portfolio
    `deltaOfOptions` - this is an array for which deltaOfOptions[i], corresponds to the delta of the i+1th option
    `OptionsException`
    `EuropeanDeltaDemoException`

### callDeltaOnIndex

    public double callDeltaOnIndex(double yield,
                                   double indexValue,
                                   double strike,
                                   double riskFreeRate,
                                   double volatility,
                                   Date evaluationDate,
                                   Date maturityDate,
                                   BusinessCalendar businessCalendar)
                            throws EuropeanDeltaDemoException

  Evaluates the Delta of a European call option on an index.

  Parameters:
    `yield` - the continuous yield of the index
    `indexValue` - the value of the index
    `strike` - the value of the index at which the option can be exercised
    `riskFreeRate` - the risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `volatility` - the volatility of the index
    `evaluationDate` - the date when the delta of the European call option is evaluated
    `maturityDate` - the maturity date of the call option
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `EuropeanDeltaDemoException`

### callDeltaOnIndex

    public double callDeltaOnIndex(double yield,
                                   double indexValue,
                                   double strike,
                                   double riskFreeRate,
                                   double volatility,
                                   double timeToMaturity)
                            throws EuropeanDeltaDemoException

  Evaluates the Delta of a European call option on an index.

  Parameters:
    `yield` - the continuous yield of the index
    `indexValue` - the value of the index
    `strike` - the value of the index at which the option can be exercised
    `riskFreeRate` - the risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `volatility` - the volatility of the index
    `timeToMaturity` - the time (in years) until the option matures
    `EuropeanDeltaDemoException`

### putDeltaOnIndex

    public double putDeltaOnIndex(double yield,
                                  double indexValue,
                                  double strike,
                                  double riskFreeRate,
                                  double volatility,
                                  Date evaluationDate,
                                  Date maturityDate,
                                  BusinessCalendar businessCalendar)
                           throws EuropeanDeltaDemoException

  The delta of a European put option on an index.

  Parameters:
    `yield` - the continuous yield of the index
    `indexValue` - the value of the index
    `strike` - the strike of the option contract. Here the strike represents the price at which the underlying index can be purchased
    `riskFreeRate` - the risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `volatility` - the volatility of the index
    `evaluationDate` - the date when the delta of the European put option is evaluated
    `maturityDate` - the maturity date of the put option
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `EuropeanDeltaDemoException`

### putDeltaOnIndex

    public double putDeltaOnIndex(double yield,
                                  double indexValue,
                                  double strike,
                                  double riskFreeRate,
                                  double volatility,
                                  double timeToMaturity)
                           throws EuropeanDeltaDemoException

  The delta of a European put option on an index.

  Parameters:
    `yield` - the continuous yield of the index
    `indexValue` - the value of the index
    `strike` - the strike of the option contract. Here the strike represents the price at which the underlying index can be purchased
    `riskFreeRate` - the risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `volatility` - the volatility of the index
    `timeToMaturity` - the time (in years) until the maturity of the option contract
    `EuropeanDeltaDemoException`

### callDeltaOnCurrency

    public double callDeltaOnCurrency(double foreignRate,
                                      double exchangeRate,
                                      double strike,
                                      double riskFreeRate,
                                      double volatility,
                                      Date evaluationDate,
                                      Date maturityDate,
                                      BusinessCalendar businessCalendar)
                               throws EuropeanDeltaDemoException

  Returns the delta of a European call option on a currency.

  Parameters:
    `foreignRate` - the continuously compounded risk free interest rate in the foreign currency
    `exchangeRate` - the present exchange rate
    `strike` - the exchange rate at which the option can be exercised
    `riskFreeRate` - 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 rate
    `evaluationDate` - the date when the delta of the European call option is evaluated
    `maturityDate` - the maturity date of the call option
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `EuropeanDeltaDemoException`

### callDeltaOnCurrency

    public double callDeltaOnCurrency(double foreignRate,
                                      double exchangeRate,
                                      double strike,
                                      double riskFreeRate,
                                      double volatility,
                                      double timeToMaturity)
                               throws EuropeanDeltaDemoException

  Returns the delta of a European call option on a currency.

  Parameters:
    `foreignRate` - the continuously compounded risk free interest rate in the foreign currency
    `exchangeRate` - the present exchange rate
    `strike` - the exchange rate at which the option can be exercised
    `riskFreeRate` - 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 rate
    `timeToMaturity` - the time (in years) until the option matures
    `EuropeanDeltaDemoException`

### putDeltaOnCurrency

    public double putDeltaOnCurrency(double foreignRate,
                                     double exchangeRate,
                                     double strike,
                                     double riskFreeRate,
                                     double volatility,
                                     Date evaluationDate,
                                     Date maturityDate,
                                     BusinessCalendar businessCalendar)
                              throws EuropeanDeltaDemoException

  Returns the delta of a European put option on a currency.

  Parameters:
    `foreignRate` - the continuously compounded risk free interest rate in the foreign currency
    `exchangeRate` - the present exchange rate
    `strike` - the exchange rate at which the option can be exercised
    `riskFreeRate` - 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 rate
    `evaluationDate` - the date when the delta of the European put option is evaluated
    `maturityDate` - the maturity date of the put option
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `EuropeanDeltaDemoException`

### putDeltaOnCurrency

    public double putDeltaOnCurrency(double foreignRate,
                                     double exchangeRate,
                                     double strike,
                                     double riskFreeRate,
                                     double volatility,
                                     double timeToMaturity)
                              throws EuropeanDeltaDemoException

  Returns the delta of a European put option on a currency.

  Parameters:
    `foreignRate` - the continuously compounded risk free interest rate in the foreign currency
    `exchangeRate` - the present exchange rate
    `strike` - the exchange rate at which the option can be exercised
    `riskFreeRate` - 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 rate
    `timeToMaturity` - the time (in years) until the option matures
    `EuropeanDeltaDemoException`

### callDeltaOnFutures

    public double callDeltaOnFutures(double futuresPrice,
                                     double strike,
                                     double riskFreeRate,
                                     double volatility,
                                     Date evaluationDate,
                                     Date maturityDate,
                                     BusinessCalendar businessCalendar)
                              throws EuropeanDeltaDemoException

  Returns the delta of a European call option on a (stock) futures contract.

  Parameters:
    `futuresPrice` - the futures price at time zero
    `strike` - the strike of the options contract. Here the strike is the price at which the futures contract underlying the options contrct can be purchased on the option can be exercised
    `riskFreeRate` - the risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `volatility` - volatility of the futures contract
    `evaluationDate` - the date when the delta of the European call option is evaluated
    `maturityDate` - the maturity date of the call option
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `EuropeanDeltaDemoException`

### callDeltaOnFutures

    public double callDeltaOnFutures(double futuresPrice,
                                     double strike,
                                     double riskFreeRate,
                                     double volatility,
                                     double timeToMaturity)
                              throws EuropeanDeltaDemoException

  Returns the delta of a European call option on a (stock) futures contract.

  Parameters:
    `futuresPrice` - the futures price at time zero
    `strike` - the strike of the options contract. Here the strike is the price at which the futures contract underlying the options contrct can be purchased on the option can be exercised
    `riskFreeRate` - the risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `volatility` - volatility of the futures contract
    `timeToMaturity` - in time (in years) until the option matures
    `EuropeanDeltaDemoException`

### putDeltaOnFutures

    public double putDeltaOnFutures(double futuresPrice,
                                    double strike,
                                    double riskFreeRate,
                                    double volatility,
                                    Date evaluationDate,
                                    Date maturityDate,
                                    BusinessCalendar businessCalendar)
                             throws EuropeanDeltaDemoException

  Returns the delta of a European put option on a (stock) futures contract.

  Parameters:
    `strike` - the value of the futures contract at which option can be exercised
    `riskFreeRate` - the risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `volatility` - volatility of the futures contract
    `evaluationDate` - the date when the delta of the European put option is evaluated
    `maturityDate` - the maturity date of the put option
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `EuropeanDeltaDemoException`

### putDeltaOnFutures

    public double putDeltaOnFutures(double futuresPrice,
                                    double strike,
                                    double riskFreeRate,
                                    double volatility,
                                    double timeToMaturity)
                             throws EuropeanDeltaDemoException

  Returns the delta of a European put option on a (stock) futures contract.

  Parameters:
    `strike` - the value of the futures contract at which option can be exercised
    `riskFreeRate` - the risk free interest rate expressed in decimal format (i.e. 1 percent = 0.01)
    `volatility` - volatility of the futures contract
    `timeToMaturity` - time to maturity of the option (in years)
    `EuropeanDeltaDemoException`

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