Libor.LiborDerivatives
Class Cap

java.lang.Object
  extended byLibor.LiborDerivatives.LiborDerivative
      extended byLibor.LiborDerivatives.Cap

public class Cap
extends LiborDerivative

The cap on [T_p,T_q] with strike rate kappa implemented as the sum of individual caplets.


Constructor Summary
Cap(LiborProcess LP, int p, int q, double kappa)
          Libors L_j needed for j>=p and until time min(T_q,T_{n-1}) (for forward transporting the payoff).
 
Method Summary
 double analyticForwardPrice(int t)
          The sum of the caplet prices.
 double controlVariateMean(int t)
          Mean of the control variate conditioned on the state of the Libor path at time t.
 double[] currentControlledForwardPayoff()
          Control variate is the sum of forward transported Libors L_i(T_i)*B_{i+1}(T_i)/B_n(T_i), j=p,...,q-1.
 double currentForwardPayoff()
          Payoff from current Libor path transported forward to time T_n.
static void main(java.lang.String[] args)
          Test program.
 
Methods inherited from class Libor.LiborDerivatives.LiborDerivative
controlledForwardPayoff, controlledMonteCarloForwardPrice, forwardPayoff, lognormalForwardPayoff, lognormalForwardPayoffSample, lognormalMonteCarloForwardPrice, monteCarloForwardPrice
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cap

public Cap(LiborProcess LP,
           int p,
           int q,
           double kappa)
Libors L_j needed for j>=p and until time min(T_q,T_{n-1}) (for forward transporting the payoff).

Parameters:
LP - underlying Libor process.
p - caps Libor on [T_p,T_q].
q - caps Libor on [T_p,T_q].
kappa - strike rate.
Method Detail

currentForwardPayoff

public double currentForwardPayoff()
Payoff from current Libor path transported forward to time T_n. The sum of the individual caplet payoffs.

Specified by:
currentForwardPayoff in class LiborDerivative

controlVariateMean

public double controlVariateMean(int t)
Mean of the control variate conditioned on the state of the Libor path at time t. The sum of the individual caplet control variate means.

Overrides:
controlVariateMean in class LiborDerivative
Parameters:
t - current discrete time (continuous time T_t).

currentControlledForwardPayoff

public double[] currentControlledForwardPayoff()
Control variate is the sum of forward transported Libors L_i(T_i)*B_{i+1}(T_i)/B_n(T_i), j=p,...,q-1. See LiborProcess.ps

Overrides:
currentControlledForwardPayoff in class LiborDerivative

analyticForwardPrice

public double analyticForwardPrice(int t)

The sum of the caplet prices.

Overrides:
analyticForwardPrice in class LiborDerivative
Parameters:
t - current discrete time.

main

public static void main(java.lang.String[] args)

Test program. Allocates a Libor process of dimension n=15 and prices the (at the money) cap cap([T_5,T_15],0.04).

Compares the Monte Carlo forward price to the analytic price and computes the correlation of the payoff with the control variate.