|
WebCab Bonds v2.01 (J2SE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--webcab.lib.finance.pricing.contracts.GeneralContractCommon
|
+--webcab.lib.finance.pricing.contracts.FixedExchangeMomentsContractCommon
|
+--webcab.lib.finance.pricing.contracts.standard.FloorForward
Implements a floor which can be used only with forward curve models. Two
such models are presently provided: HJM and SimplifiedBGM
A floor guarantees to the holder that floating interest rates will not exceed a predefined maximum level. If the rates go beyond this level, the holder will be compensated by receiving the fraction that is beneath the minimum from a fixed premium.
Observation: As the payments are made regularly a standard floor
uses a floating rate at moment t the forward rate registered
at time t - dt with dt maturity.
In arrears floors use the current forward rate, not the one registered in the
last step. This contract is a standard floor. To evaluate an in arrears floor
you should use the CapSpot contract with a suitable model for the
forward rate (you can safely use the spot rate models as models for one forward
rate). If, for efficiency or convenience, you want to use other models than
HJM and SimplifiedBGM, you can use CapSpot also to
price standard floors
| Field Summary |
| Fields inherited from class webcab.lib.finance.pricing.contracts.GeneralContractCommon |
BUYER_INITIATED, NO_EARLY_EXERCISE, SELLER_INITIATED |
| Constructor Summary | |
FloorForward(double principal,
double settlement,
double floorRate,
double tenor,
double expiry)
Creates a new FloorForwardt contract which uses the first
interest rate model found. |
|
FloorForward(String interestRateContextName,
double principal,
double firstResetDate,
double floorRate,
double tenor,
double expiry)
Creates a new FloorForward contract which uses a specified
interest rate model (identified using the context). |
|
| Method Summary | |
double |
getExpiry()
Returns the maturity time for this contract. |
double[] |
getMoments()
Returns an array containing the moments of all cash exchanges (payoffs). |
int |
getNMoments()
Returns the total number of payoffs for the contract. |
double |
getPayoff(int moment,
ContextGraph contextGraph,
Path contextHistory,
StochasticDifferentialModel updatedModel)
Returns the amount exchanged at a moment specified by its index in the payoff moments vector (the vector returned by method getMoments()). |
boolean |
needsUpdatedModel()
Returns whether this contract is a multi-order contract. |
| Methods inherited from class webcab.lib.finance.pricing.contracts.FixedExchangeMomentsContractCommon |
getAccumulatedCashflow, getFirstMoment |
| Methods inherited from class webcab.lib.finance.pricing.contracts.GeneralContractCommon |
getEarlyExercise |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface webcab.lib.finance.pricing.contracts.FixedExchangeMomentsContract |
getFirstMoment |
| Methods inherited from interface webcab.lib.finance.pricing.contracts.GeneralContract |
getAccumulatedCashflow |
| Constructor Detail |
public FloorForward(double principal,
double settlement,
double floorRate,
double tenor,
double expiry)
FloorForwardt contract which uses the first
interest rate model found. The payoff of this contract is:
principal * max(floorRate - floatingRate, 0).
principal - the sum which is insured against interest rate fluctuationsfloorRate - the minimum admissible interest rate without compensationtenor - the period between two consecutive regular paymentsexpiry - the maturity time of the contract
public FloorForward(String interestRateContextName,
double principal,
double firstResetDate,
double floorRate,
double tenor,
double expiry)
throws InvalidParametersException
FloorForward contract which uses a specified
interest rate model (identified using the context). The payoff of this contract
is: principal * max(floorRate - floatingRate, 0).
interestRateContextName - the context providing the floating interest rateprincipal - the sum which is insured against interest rate fluctuationsfirstResetDate - the moment when the first payment takes placefloorRate - the minimum admissible interest rate without compensationtenor - the period between two consecutive regular paymentsexpiry - the maturity time of the contract| Method Detail |
public double[] getMoments()
FixedExchangeMomentsContract
getMoments in interface FixedExchangeMomentsContractgetMoments in class FixedExchangeMomentsContractCommonpublic int getNMoments()
FixedExchangeMomentsContractgetMoments()
method.
getNMoments in interface FixedExchangeMomentsContractgetNMoments in class FixedExchangeMomentsContractCommon
public double getPayoff(int moment,
ContextGraph contextGraph,
Path contextHistory,
StochasticDifferentialModel updatedModel)
throws BondsException
FixedExchangeMomentsContractgetMoments()).
getPayoff in interface FixedExchangeMomentsContractgetPayoff in class FixedExchangeMomentsContractCommonmoment - the index of the moment for which the payoff is computed
(the current moment)contextGraph - the context graph produced by the model. The context graph contains a
snapshot of the models' variables at the current moment. See ContextGraph
for information on how to search for a specific variable on which the contract
is dependent.contextHistory - provides access to previous values of all the models' variables.
The full history of the simulation between settlement and the current moment is
accessible.updatedModel - an instance of the model used to price the contract.
It can be used with a pricer to evaluate an underlying contract (in case
we have a second-order contract like, for example, a bond option). The
initial values for this models' variables are implicitly set to the current values.
If the higher order contract is path dependent and needs the values for
the underlying contract at previous moments of time, you need to set the
initial values of the model to the values that existed at that moment
of time. You can use the path to find the historic context and then
use the updatedModel.setInitialContext()
method to set the initial values.
BondsExceptionpublic double getExpiry()
GeneralContract
getExpiry in interface GeneralContractgetExpiry in class GeneralContractCommonpublic boolean needsUpdatedModel()
GeneralContractupdatedModel parameter of getAccumulatedCashflow()
method is needed. This information is used by the pricing algorithm
to decide if it is necessary to initialize the above mentioned parameter.
The overall efficiency of the algorithm is improved if the initialization
is not performed.
needsUpdatedModel in interface GeneralContractneedsUpdatedModel in class GeneralContractCommonfalse the updatedModel parameter
is not correctly initialized and must not be used.
|
WebCab Bonds v2.01 (J2SE Edition) |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||