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

## webcab.lib.finance.options.exotic
Interface PayoffFunction

All Superinterfaces:
  Serializable

All Known Implementing Classes:
  BinaryPayoff, SimplePayoff, SpreadStrategyPayoff, StraddleStrategyPayoff, StrangleStrategyPayoff, StronglyPathDependentPayoff

public interface PayoffFunction
extends Serializable

This interface must be implemented by all user supplied payoff functions. It has several public constants defined that are used to denote standard contract parameters. It also has one method, which is called by the algorithms when payoff function evaluation is needed. The user must implement this method so that it returns the value of the payoff function.

Method Summary
`double` `getValueAt(double time, double[] assetPrices, double[] pathDependentValues, int noAssets)` Computes the value of the payoff function.

Method Detail

### getValueAt

    public double getValueAt(double time,
                             double[] assetPrices,
                             double[] pathDependentValues,
                             int noAssets)
                      throws Exception

  Computes the value of the payoff function. If you don't need one or more parameters which are supplied, you can simply ignore them.

  Parameters:
    `time` - The time, used only for Bermudan options.
    `assetPrices` - A vector containing `n` asset prices.
    `pathDependentValues` - a vector containing the path dependent values. associated with the asset prices. Used only for strongly path dependent options.
    `noAssets` - the total number of assets.
  Returns:
    The value of the payoff function.
    `Exception`

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