## Libor.LiborDerivatives Class ReverseFloater

```java.lang.Object Libor.LiborDerivatives.LiborDerivative Libor.LiborDerivatives.ReverseFloater
```

public class ReverseFloater
extends LiborDerivative

The reverse floater `RF(p,q,K1,K2)` receives Libor `delta_jL_j(T_j)` and pays `delta_j*max{K1-L_j(T_j),K2}` at time `T_{j+1}, j=p,p+1,...,q-1`. Here `K1>K2`.

 Constructor Summary ```ReverseFloater(LiborProcess LP, int p, int q, double K1, double K2)```           Libors `L_j` needed for `j>=p` and until time `min(T_q,T_{n-1})`.

 Method Summary ` double` `analyticForwardPrice(int t)`           Analytic `T_n`-forward price at time `t`. ` 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 sum of forward transported Libors ```delta_jL_j(T_j)*B_{j+1}(T_j)/B_n(T_j)= (B_j(T_j)-B_{j+1}(T_j))/B_n(T_j)``` for `j=p,p+1,...,q-1`. ` double` `currentForwardPayoff()`           The payoff transported forward to time `T_n`, value in current Libor path. `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

### ReverseFloater

```public ReverseFloater(LiborProcess LP,
int p,
int q,
double K1,
double K2)```

Libors `L_j` needed for `j>=p` and until time `min(T_q,T_{n-1})`.

Parameters:
`LP` - underlying Libor process.
`p` - accrual starts `T_p`.
`q` - accrual stops `T_q`, with `0<p<q<=n`.
`K1` - see contract definition LiborProcess.ps.
`K2` - see contract definition LiborProcess.ps.
 Method Detail

### currentForwardPayoff

`public double currentForwardPayoff()`
The payoff transported forward to time `T_n`, value in current Libor path.

Specified by:
`currentForwardPayoff` in class `LiborDerivative`

### analyticForwardPrice

`public double analyticForwardPrice(int t)`

Analytic `T_n`-forward price at time `t`. See LiborProcess.ps

.

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

### controlVariateMean

`public double controlVariateMean(int t)`

Mean of the control variate conditioned on the state of the Libor path at time `t`. This is simply `(B_p(t)-B_q(t))/B_n(t)`. See LiborProcess.ps.

Overrides:
`controlVariateMean` in class `LiborDerivative`
Parameters:
`t` - current discrete time `t<=p`.

### currentControlledForwardPayoff

`public double[] currentControlledForwardPayoff()`

Control variate is sum of forward transported Libors ```delta_jL_j(T_j)*B_{j+1}(T_j)/B_n(T_j)= (B_j(T_j)-B_{j+1}(T_j))/B_n(T_j)``` for `j=p,p+1,...,q-1`. Note that the conditional expectation `E^{P_n}_t(.)` of this is the expression `(B_j(t)-B_{j+1}(t))/B_n(t)` which collapse under summation. See LiborProcess.ps .

Overrides:
`currentControlledForwardPayoff` in class `LiborDerivative`

### main

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

Test program. Allocates a Libor process of dimension `n=15` and prices reverse floater `RF(p,q,K1,K2)` with `p=8, q=15, K1=0.09, K2=0.03`. All Libors are intialized at `L_j(0)=0.04`.

Moves the Libor path forward to time `t=T_3` and computes the Monte Carlo forward price of the floater and compares it to the analytic price computed directly from the Libors at time `t=T_3`. The correlation of the payoff with the control variate is computed also.