public class Swap extends AbstractLIBORMonteCarloProduct
legReceiver.getValue(evaluationTime, model).sub(legPayer.getValue(evaluationTime, model))
where legReceiver and legPayer are SwapLegs.| Constructor and Description |
|---|
Swap(AbstractLIBORMonteCarloProduct legReceiver,
AbstractLIBORMonteCarloProduct legPayer)
Create a swap which values as
legReceiver - legPayer. |
Swap(AbstractNotional notional,
ScheduleInterface scheduleReceiveLeg,
AbstractIndex indexReceiveLeg,
double spreadReceiveLeg,
ScheduleInterface 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. |
| Modifier and Type | Method and Description |
|---|---|
RandomVariableInterface |
getValue(double evaluationTime,
LIBORModelMonteCarloSimulationInterface model)
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime.
|
getFactorDrift, getValue, getValueForModifiedData, getValuesgetCurrency, getValue, getValue, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, toStringpublic Swap(AbstractLIBORMonteCarloProduct legReceiver, AbstractLIBORMonteCarloProduct legPayer)
legReceiver - legPayer.legReceiver - The receiver leg.legPayer - The payer leg.public Swap(AbstractNotional notional, ScheduleInterface scheduleReceiveLeg, AbstractIndex indexReceiveLeg, double spreadReceiveLeg, ScheduleInterface 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.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 RandomVariableInterface getValue(double evaluationTime, LIBORModelMonteCarloSimulationInterface model) throws CalculationException
AbstractLIBORMonteCarloProductgetValue 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.Copyright © 2017. All rights reserved.