public class Swap extends AbstractLIBORMonteCarloProduct
legReceiver.getValue(evaluationTime, model).sub(legPayer.getValue(evaluationTime, model))
where legReceiver and legPayer are SwapLegs.| Constructor and Description |
|---|
Swap(AbstractNotional notional,
Schedule scheduleReceiveLeg,
AbstractIndex indexReceiveLeg,
double spreadReceiveLeg,
Schedule schedulePayLeg,
AbstractIndex indexPayLeg,
double spreadPayLeg)
Create a swap from schedules, notional, indices and spreads (fixed coupons).
|
Swap(double[] fixingDates,
double[] paymentDates,
double[] swaprates)
Deprecated.
This constructor is deprecated. If you like to create a payer swap from fixingDates, paymentDates and swaprates use
SimpleSwap. |
Swap(TermStructureMonteCarloProduct legReceiver,
TermStructureMonteCarloProduct legPayer)
Create a swap which values as
legReceiver - legPayer. |
| Modifier and Type | Method and Description |
|---|---|
RandomVariable |
getValue(double evaluationTime,
LIBORModelMonteCarloSimulationModel model)
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime.
|
String |
toString() |
getFactorDrift, getValue, getValueForModifiedData, getValuesgetCurrency, getValue, getValue, getValues, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedDataclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetCurrency, getValue, getValue, getValues, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedDatapublic Swap(TermStructureMonteCarloProduct legReceiver, TermStructureMonteCarloProduct legPayer)
legReceiver - legPayer.legReceiver - The receiver leg.legPayer - The payer leg.public Swap(AbstractNotional notional, Schedule scheduleReceiveLeg, AbstractIndex indexReceiveLeg, double spreadReceiveLeg, Schedule schedulePayLeg, AbstractIndex indexPayLeg, double spreadPayLeg)
notional - The notional.scheduleReceiveLeg - The period schedule for the receiver leg.indexReceiveLeg - The index of the receiver leg, may be null if no index is received.spreadReceiveLeg - The constant spread or fixed coupon rate of the receiver leg.schedulePayLeg - The period schedule for the payer leg.indexPayLeg - The index of the payer leg, may be null if no index is paid.spreadPayLeg - The constant spread or fixed coupon rate of the payer leg.@Deprecated public Swap(double[] fixingDates, double[] paymentDates, double[] swaprates)
SimpleSwap.fixingDates - Vector of fixing datespaymentDates - Vector of payment dates (must have same length as fixing dates)swaprates - Vector of strikes (must have same length as fixing dates)public RandomVariable getValue(double evaluationTime, LIBORModelMonteCarloSimulationModel model) throws CalculationException
TermStructureMonteCarloProductgetValue in interface TermStructureMonteCarloProductgetValue in class AbstractLIBORMonteCarloProductevaluationTime - The time on which this products value should be observed.model - The model used to price the product.CalculationException - Thrown if the valuation fails, specific cause may be available via the cause() method.public String toString()
toString in class AbstractMonteCarloProductCopyright © 2019. All rights reserved.