Libor.LiborDerivatives
Class LiborDerivative

java.lang.Object
  extended byLibor.LiborDerivatives.LiborDerivative
Direct Known Subclasses:
CallableReverseFloater, Cap, Caplet, ReverseFloater, Swap, Swaption, TriggerSwap, ZeroCouponBond

public abstract class LiborDerivative
extends java.lang.Object

A derivative whose payoff is a functional of the path of a Libor process. Since our implementation of the Libor process computes forward Libors L_i only at the reset times T_j the payoff H must be a deterministic function H=H(L_j(T_k); k<=j). This case covers caps, swaps, swaptions trigger swaps, Bermudian swaptions and others but does not cover more exotic derivatives which must evaluate Libors more frequently.


Constructor Summary
LiborDerivative(LiborProcess LP)
          Payoff computed from full Libor paths, no control variate or lognormal Libor vector.
LiborDerivative(LiborProcess LP, int k, int Tmax)
          Optimized, only the Libors which are needed computed only as far as needed (speed).
LiborDerivative(LiborProcess LP, int k, int Tmax, LiborVector LV)
          Optimized, only the Libors which are needed computed only as far as needed (speed), allocates log-normal Libor vector for fast valuation.
 
Method Summary
 double analyticForwardPrice(int t)
          The value of the time T_n-forward price at discrete time t (continuous time T_t).
 ControlledRandomVariable controlledForwardPayoff()
          The controlled forward transported payoff as a random variable.
 double controlledMonteCarloForwardPrice(int t, int nPath)
          The value of the time T_n-forward price at time discrete t (continuous time T_t).
 double controlVariateMean(int t)
          Mean of the control variate conditioned on the state of the Libor path at time t.
 double[] currentControlledForwardPayoff()
          Payoff-Controlvariate pair computed from current Libor path.
abstract  double currentForwardPayoff()
          Forward transported payoff computed from the current Libor path using the array LP.X of true Libors only.
 RandomVariable forwardPayoff()
          The forward transported payoff as a random variable.
 RandomVariable lognormalForwardPayoff()
          The lognormalForwardPayoff() as a random variable based on the log-normal Libor vector this.LV as a proxy for the vector of true Libors.
 double lognormalForwardPayoffSample()
          The forward transported payoff seen from time t=0 and computed from a new sample of the Libor vector this.LV instead of true Libors derived from paths of the underlying LiborProcess.
 double lognormalMonteCarloForwardPrice(int nPath)
          The value of the time T_n-forward price at time discrete t=0 (continuous time T_t) computed by direct simulation of the approximating log-normal Libor vector this.LV instead of true Libor paths (speed).
 double monteCarloForwardPrice(int t, int nPath)
          The value of the time T_n-forward price at discrete time t (continuous time T_t).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiborDerivative

public LiborDerivative(LiborProcess LP,
                       int k,
                       int Tmax,
                       LiborVector LV)

Optimized, only the Libors which are needed computed only as far as needed (speed), allocates log-normal Libor vector for fast valuation.

"Payoff" means payoff transported forward to the horizon T=T_n. The parameters k,Tmax allow us to avoid the costly computation of full Libor paths.

Parameters:
LP - underlying Libor process.
k - Libors needed to compute payoff: L_j; j>=k.
Tmax - computation of payoff needs Libors until time Tmax.
LV - log-normal approximate Libor vector for fast valuation

LiborDerivative

public LiborDerivative(LiborProcess LP,
                       int k,
                       int Tmax)
Optimized, only the Libors which are needed computed only as far as needed (speed). "Payoff" means payoff transported forward to the horizon T=T_n. The parameters k,Tmax allow us to avoid the costly computation of full Libor paths.

Parameters:
LP - underlying Libor process.
k - Libors needed to compute payoff: L_j; j>=k.
Tmax - computation of payoff needs Libors until time Tmax.

LiborDerivative

public LiborDerivative(LiborProcess LP)

Payoff computed from full Libor paths, no control variate or lognormal Libor vector.

Parameters:
LP - underlying Libor process.
Method Detail

currentForwardPayoff

public abstract double currentForwardPayoff()

Forward transported payoff computed from the current Libor path using the array LP.X of true Libors only. Here LP is the underlying Libor process.

If the option has payoffs at several points along the path these must all be transported forward and aggregated at the horizon T_n.

Why the forward transporting? Recall that we are simulating the Libor dynamics under the forward martingale measure P_n. Consequently a Monte Carlo simulation computes expectations E^{P_n} in this probability and we compute the forward price c_t(H) of an option H at time t as the conditional expectation E^{P_n}_t(h). This formula is correct only if h is the value of the option payoff(s) at time T_n.


forwardPayoff

public RandomVariable forwardPayoff()
The forward transported payoff as a random variable.


controlVariateMean

public double controlVariateMean(int t)
Mean of the control variate conditioned on the state of the Libor path at time t. This is a default implementation (error message and program abort) intended to be overidden in concrete subclasses which do implement a control variate.


currentControlledForwardPayoff

public double[] currentControlledForwardPayoff()

Payoff-Controlvariate pair computed from current Libor path. Can make use of the array LP.X of true Libors or of one or both of the log-normal approximations LP.X0, LP.X1. Make sure the boolean flags controlVariateNeedsX0, controlVariateNeedsX1 are set from the implementing concrete subclass to ensure that the underlying Libor process computes the corresponding paths forward.

This is a default implementation (error message and program abort) intended to be overidden in concrete subclasses which do implement a control variate.


controlledForwardPayoff

public ControlledRandomVariable controlledForwardPayoff()
The controlled forward transported payoff as a random variable.


lognormalForwardPayoffSample

public double lognormalForwardPayoffSample()

The forward transported payoff seen from time t=0 and computed from a new sample of the Libor vector this.LV instead of true Libors derived from paths of the underlying LiborProcess.

This is a default implementation (error message and program abort) intended to be overidden in concrete subclasses.

The idea is to replace the simulation of Libor paths with the much faster direct simulation of the log-normal Libor approximations. One hopes that the distribution of the approximation is sufficiently close to the distribution of true Libor. In our implementations we rely on the X0 approximation. Run the program Examples.LiborPaths.java to see how closely the X0-paths track true Libor.

Note that this applies only to prices computed at time t=0.


lognormalForwardPayoff

public RandomVariable lognormalForwardPayoff()
The lognormalForwardPayoff() as a random variable based on the log-normal Libor vector this.LV as a proxy for the vector of true Libors.


analyticForwardPrice

public double analyticForwardPrice(int t)
The value of the time T_n-forward price at discrete time t (continuous time T_t). This is a default implementation (error message and program abort) intended to be overidden in concrete subclasses.

Parameters:
t - current disrete time.

monteCarloForwardPrice

public double monteCarloForwardPrice(int t,
                                     int nPath)
The value of the time T_n-forward price at discrete time t (continuous time T_t).

Parameters:
t - current disrete time.
nPath - number of Libor paths simulated.

controlledMonteCarloForwardPrice

public double controlledMonteCarloForwardPrice(int t,
                                               int nPath)
The value of the time T_n-forward price at time discrete t (continuous time T_t).

Parameters:
t - current disrete time.
nPath - number of Libor paths simulated.

lognormalMonteCarloForwardPrice

public double lognormalMonteCarloForwardPrice(int nPath)

The value of the time T_n-forward price at time discrete t=0 (continuous time T_t) computed by direct simulation of the approximating log-normal Libor vector this.LV instead of true Libor paths (speed).

Parameters:
nPath - number of Libor vector samples.