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

## webcab.lib.finance.options
Class PutCallParity

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

All Implemented Interfaces:
  Serializable

public class PutCallParity
extends Object
implements Serializable

Within this class we implement put-call parity relations for:

1. Vanilla Options where the underlying asset does not pay dividends
2. Binary Options where the underlying asset does not pay dividends
3. Vanilla options where the underlying asset pays a continuous dividend

See Also:
  Serialized Form

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

Method Summary
`double` `callBinary(double binaryPut, double riskFreeRate, Date evaluationDate, Date expiryDate, BusinessCalendar businessCalendar)` This method returns the Binary call option value at any time up to expiry when the Binary put, risk free interest rate and expiry values are known.
`double` `callBinary(double binaryPut, double riskFreeRate, double timeToExpiry)` This method returns the Binary call option value at any time up to expiry when the Binary put, risk free interest rate and expiry values are known.
`double` `callEuropean(double valueOfPut, double assetPrice, double strike, double riskFreeRate, Date evaluationDate, Date expiryDate, BusinessCalendar businessCalendar)` This method returns the value of the European call option when the value of the corresponding put option is known.
`double` `callEuropean(double valueOfPut, double assetPrice, double strike, double riskFreeRate, double timeToExpiry)` This method returns the value of the European call option when the value of the corresponding put option is known.
`double` `callEuropeanWithDividends(double putValue, double dividendYield, double assetPrice, double strike, double riskFreeRate, Date evaluationDate, Date expiryDate, BusinessCalendar businessCalendar)` Returns the value of a European call option on an underlying asset which pays a continuous dividend.
`double` `callEuropeanWithDividends(double putValue, double dividendYield, double assetPrice, double strike, double riskFreeRate, double timeToExpiry)` Returns the value of a European call option on an underlying asset which pays a continuous dividend.
`double` `interestBinary(double binaryCall, double binaryPut, Date evaluationDate, Date expiryDate, BusinessCalendar businessCalendar)` This method returns the risk free interest rate for all time prior to expiry when of the Binary put/call.
`double` `interestBinary(double binaryCall, double binaryPut, double timeToExpiry)` This method returns the risk free interest rate for all time prior to expiry when of the Binary put/call.
`double` `interestEuropean(double valueOfCall, double valueOfPut, double assetValue, double strike, Date evaluationDate, Date expiryDate, BusinessCalendar businessCalendar)` This method returns the implied risk free interest rate when the value of the European put/call options and the underlying asset price is known.
`double` `interestEuropean(double valueOfCall, double valueOfPut, double assetValue, double strike, double timeToExpiry)` This method returns the implied risk free interest rate when the value of the European put/call options and the underlying asset price is known.
`double` `putBinary(double binaryCall, double riskFreeRate, Date evaluationDate, Date expiryDate, BusinessCalendar businessCalendar)` This method returns the Binary put option value at any time up to expiry when the Binary call, risk free interest rate and expiry values are known.
`double` `putBinary(double binaryCall, double riskFreeRate, double timeToExpiry)` This method returns the Binary put option value at any time up to expiry when the Binary call, risk free interest rate and expiry values are known.
`double` `putEuropean(double valueOfCall, double assetPrice, double strike, double riskFreeRate, Date evaluationDate, Date expiryDate, BusinessCalendar businessCalendar)` This method returns the value of the European put option when the value of the corresponding call option is known.
`double` `putEuropean(double valueOfCall, double assetPrice, double strike, double riskFreeRate, double timeToExpiry)` This method returns the value of the European put option when the value of the corresponding call option is known.
`double` `putEuropeanWithDividends(double callValue, double dividendYield, double assetPrice, double strike, double riskFreeRate, Date evaluationDate, Date expiryDate, BusinessCalendar businessCalendar)` Returns the value of a European put option on an underlying asset which pays a continuous dividend.
`double` `putEuropeanWithDividends(double callValue, double dividendYield, double assetPrice, double strike, double riskFreeRate, double timeToExpiry)` Returns the value of a European put option on an underlying asset which pays a continuous dividend.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### PutCallParity

    public PutCallParity()

  Creates a new instance.

Method Detail

### callBinary

    public double callBinary(double binaryPut,
                             double riskFreeRate,
                             Date evaluationDate,
                             Date expiryDate,
                             BusinessCalendar businessCalendar)
                      throws PutCallParityDemoException

  This method returns the Binary call option value at any time up to expiry when the Binary put, risk free interest rate and expiry values are known. Note that the Binary call and put options have the same underlying asset, expiry and strike.

  Parameters:
    `binaryPut` - the market price of the Binary put option
    `riskFreeRate` - risk free interest rate
    `evaluationDate` - the date when the option is evaluated
    `expiryDate` - the date when the option contracts expire
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `PutCallParityDemoException`

### callBinary

    public double callBinary(double binaryPut,
                             double riskFreeRate,
                             double timeToExpiry)
                      throws PutCallParityDemoException

  This method returns the Binary call option value at any time up to expiry when the Binary put, risk free interest rate and expiry values are known. Note that the Binary call and put options have the same underlying asset, expiry and strike.

  Parameters:
    `binaryPut` - the market price of the Binary put option
    `riskFreeRate` - risk free interest rate
    `PutCallParityDemoException`

### putBinary

    public double putBinary(double binaryCall,
                            double riskFreeRate,
                            Date evaluationDate,
                            Date expiryDate,
                            BusinessCalendar businessCalendar)
                     throws PutCallParityDemoException

  This method returns the Binary put option value at any time up to expiry when the Binary call, risk free interest rate and expiry values are known. Note that the Binary call and put options have the same underlying asset, expiry and strike.

  Parameters:
    `binaryCall` - value of the binary call option
    `riskFreeRate` - risk free interest rate
    `evaluationDate` - the date when the option is evaluated
    `expiryDate` - the date when the option contracts expire
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `PutCallParityDemoException`

### putBinary

    public double putBinary(double binaryCall,
                            double riskFreeRate,
                            double timeToExpiry)
                     throws PutCallParityDemoException

  This method returns the Binary put option value at any time up to expiry when the Binary call, risk free interest rate and expiry values are known. Note that the Binary call and put options have the same underlying asset, expiry and strike.

  Parameters:
    `binaryCall` - value of the binary call option
    `riskFreeRate` - risk free interest rate
    `timeToExpiry` - the time (in years) until the put or call Binary options expire
    `PutCallParityDemoException`

### interestBinary

    public double interestBinary(double binaryCall,
                                 double binaryPut,
                                 Date evaluationDate,
                                 Date expiryDate,
                                 BusinessCalendar businessCalendar)
                          throws PutCallParityDemoException

  This method returns the risk free interest rate for all time prior to expiry when of the Binary put/call. Note that the expiry of both options and there strike are the identical.

  Parameters:
    `binaryPut` - value of the Binary put
    `binaryCall` - value of the Binary call
    `evaluationDate` - the date when the option is evaluated
    `expiryDate` - the date when the option contracts expire
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `PutCallParityDemoException`

### interestBinary

    public double interestBinary(double binaryCall,
                                 double binaryPut,
                                 double timeToExpiry)
                          throws PutCallParityDemoException

  This method returns the risk free interest rate for all time prior to expiry when of the Binary put/call. Note that the expiry of both options and there strike are the identical.

  Parameters:
    `binaryPut` - value of the Binary put
    `binaryCall` - value of the Binary call
    `timeToExpiry` - the time (in years) until the put and call Binary option expires
    `PutCallParityDemoException`

### callEuropean

    public double callEuropean(double valueOfPut,
                               double assetPrice,
                               double strike,
                               double riskFreeRate,
                               Date evaluationDate,
                               Date expiryDate,
                               BusinessCalendar businessCalendar)
                        throws PutCallParityDemoException

  This method returns the value of the European call option when the value of the corresponding put option is known. Note that we assume that the underlying asset is assumed not to pay a dividend during the life of the option.

  Parameters:
    `valueOfPut` - the value of the put option
    `assetPrice` - the value of the underlying asset
    `strike` - the strike price of the European call option
    `riskFreeRate` - the risk free interest rate during the life of the option
    `evaluationDate` - the date when the option is evaluated
    `expiryDate` - the date when the option contracts expire
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `PutCallParityDemoException`

### callEuropean

    public double callEuropean(double valueOfPut,
                               double assetPrice,
                               double strike,
                               double riskFreeRate,
                               double timeToExpiry)
                        throws PutCallParityDemoException

  This method returns the value of the European call option when the value of the corresponding put option is known. Note that we assume that the underlying asset is assumed not to pay a dividend during the life of the option.

  Parameters:
    `valueOfPut` - the value of the put option
    `timeToExpiry` - the time (in years) until the expiry of the option contracts
    `assetPrice` - the value of the underlying asset
    `strike` - the strike price of the European call option
    `riskFreeRate` - the risk free interest rate during the life of the option
    `PutCallParityDemoException`

### putEuropean

    public double putEuropean(double valueOfCall,
                              double assetPrice,
                              double strike,
                              double riskFreeRate,
                              Date evaluationDate,
                              Date expiryDate,
                              BusinessCalendar businessCalendar)
                       throws PutCallParityDemoException

  This method returns the value of the European put option when the value of the corresponding call option is known. Note that the underlying asset is assumed not to pay a dividend during the life of the option, and the put and call options have the same expiry and strike.

  Parameters:
    `valueOfCall` - the value of the call option
    `assetPrice` - the value of the underlying asset
    `strike` - strike of the options
    `riskFreeRate` - risk free interest rate
    `evaluationDate` - the date when the option is evaluated
    `expiryDate` - the date when the option contracts expire
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `PutCallParityDemoException`

### putEuropean

    public double putEuropean(double valueOfCall,
                              double assetPrice,
                              double strike,
                              double riskFreeRate,
                              double timeToExpiry)
                       throws PutCallParityDemoException

  This method returns the value of the European put option when the value of the corresponding call option is known. Note that the underlying asset is assumed not to pay a dividend during the life of the option, and the put and call options have the same expiry and strike.

  Parameters:
    `valueOfCall` - the value of the call option
    `timeToExpiry` - the time (in years) until the option contract expires
    `assetPrice` - the value of the underlying asset
    `strike` - strike of the options
    `riskFreeRate` - risk free interest rate
    `PutCallParityDemoException`

### interestEuropean

    public double interestEuropean(double valueOfCall,
                                   double valueOfPut,
                                   double assetValue,
                                   double strike,
                                   Date evaluationDate,
                                   Date expiryDate,
                                   BusinessCalendar businessCalendar)
                            throws PutCallParityDemoException

  This method returns the implied risk free interest rate when the value of the European put/call options and the underlying asset price is known. Note that the put and call options have the same expiry and strike.

  Parameters:
    `valueOfCall` - value of the call option
    `valueOfPut` - value of the put option
    `assetValue` - the value of the underlying asset
    `strike` - strike of the options contracts
    `evaluationDate` - the date when the option is evaluated
    `expiryDate` - the date when the option contracts expire
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `PutCallParityDemoException`

### interestEuropean

    public double interestEuropean(double valueOfCall,
                                   double valueOfPut,
                                   double assetValue,
                                   double strike,
                                   double timeToExpiry)
                            throws PutCallParityDemoException

  This method returns the implied risk free interest rate when the value of the European put/call options and the underlying asset price is known. Note that the put and call options have the same expiry and strike.

  Parameters:
    `valueOfCall` - value of the call option
    `valueOfPut` - value of the put option
    `assetValue` - the value of the underlying asset
    `timeToExpiry` - the time (in years) until the put and call options expire
    `strike` - strike of the options contracts
    `PutCallParityDemoException`

### callEuropeanWithDividends

    public double callEuropeanWithDividends(double putValue,
                                            double dividendYield,
                                            double assetPrice,
                                            double strike,
                                            double riskFreeRate,
                                            Date evaluationDate,
                                            Date expiryDate,
                                            BusinessCalendar businessCalendar)
                                     throws PutCallParityDemoException

  Returns the value of a European call option on an underlying asset which pays a continuous dividend. Index and currency European call options are examples of such assets.

  Parameters:
    `dividendYield` - the continuous dividend yield of the underlying asset during life of the option contract
    `assetPrice` - the underlying asset price at evaluation time
    `riskFreeRate` - the risk free interest rate
    `putValue` - the value at evaluation time of the correspond put option with same expiry and strike as the call option value being calculated
    `strike` - the strike of the European call (and put) option
    `evaluationDate` - the date when the option is evaluated
    `expiryDate` - the date when the option contracts expire
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `PutCallParityDemoException`

### callEuropeanWithDividends

    public double callEuropeanWithDividends(double putValue,
                                            double dividendYield,
                                            double assetPrice,
                                            double strike,
                                            double riskFreeRate,
                                            double timeToExpiry)
                                     throws PutCallParityDemoException

  Returns the value of a European call option on an underlying asset which pays a continuous dividend. Index and currency European call options are examples of such assets.

  Parameters:
    `dividendYield` - the continuous dividend yield of the underlying asset during life of the option contract
    `assetPrice` - the underlying asset price at evaluation time
    `riskFreeRate` - the risk free interest rate
    `putValue` - the value at evaluation time of the correspond put option with same expiry and strike as the call option value being calculated
    `timeToExpiry` - the time (in years) until the option expires
    `strike` - the strike of the European call (and put) option
    `PutCallParityDemoException`

### putEuropeanWithDividends

    public double putEuropeanWithDividends(double callValue,
                                           double dividendYield,
                                           double assetPrice,
                                           double strike,
                                           double riskFreeRate,
                                           Date evaluationDate,
                                           Date expiryDate,
                                           BusinessCalendar businessCalendar)
                                    throws PutCallParityDemoException

  Returns the value of a European put option on an underlying asset which pays a continuous dividend. Index and currency European put options are examples of such assets.

  Parameters:
    `dividendYield` - the continuous dividend yield of the underlying asset during life of the option contract
    `assetPrice` - the underlying asset price at evaluation time
    `riskFreeRate` - the risk free interest rate
    `callValue` - the value at evaluation time of the correspond call option with same the expiry and strike as the call option
    `strike` - the strike of the European put (and call) option
    `evaluationDate` - the date when the option is evaluated
    `expiryDate` - the date when the option contracts expire
    `businessCalendar` - The instance of a `BusinessCalendar` interface implementation. Specify `null` to select the London business calendar.
    `PutCallParityDemoException`

### putEuropeanWithDividends

    public double putEuropeanWithDividends(double callValue,
                                           double dividendYield,
                                           double assetPrice,
                                           double strike,
                                           double riskFreeRate,
                                           double timeToExpiry)
                                    throws PutCallParityDemoException

  Returns the value of a European put option on an underlying asset which pays a continuous dividend. Index and currency European put options are examples of such assets.

  Parameters:
    `dividendYield` - the continuous dividend yield of the underlying asset during life of the option contract
    `assetPrice` - the underlying asset price at evaluation time
    `riskFreeRate` - the risk free interest rate
    `callValue` - the value at evaluation time of the correspond call option with same the expiry and strike as the call option
    `timeToExpiry` - the time (in years) until the option expires
    `strike` - the strike of the European put (and call) option
    `PutCallParityDemoException`

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