net.finmath.marketdata.products
Class SwapLeg
- java.lang.Object
-
- net.finmath.marketdata.products.AbstractAnalyticProduct
-
- net.finmath.marketdata.products.SwapLeg
-
- All Implemented Interfaces:
- AnalyticProductInterface, ProductInterface
public class SwapLeg extends AbstractAnalyticProduct implements AnalyticProductInterface
Implements the valuation of a swap leg using curves (discount curve, forward curve). The swap leg valuation supports distinct discounting and forward curves. Support for day counting is limited to the capabilities ofTimeDiscretizationInterface.
-
-
Constructor Summary
Constructors Constructor and Description SwapLeg(ScheduleInterface legSchedule, java.lang.String forwardCurveName, double spread, java.lang.String discountCurveName)Creates a swap leg (without notional exchange).SwapLeg(ScheduleInterface legSchedule, java.lang.String forwardCurveName, double spread, java.lang.String discountCurveName, boolean isNotionalExchanged)Creates a swap leg.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringgetDiscountCurveName()java.lang.StringgetForwardCurveName()ScheduleInterfacegetSchedule()doublegetSpread()doublegetValue(double evaluationTime, AnalyticModelInterface model)Return the valuation of the product using the given model.booleanisNotionalExchanged()java.lang.StringtoString()-
Methods inherited from class net.finmath.marketdata.products.AbstractAnalyticProduct
getValue, getValue
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.finmath.modelling.ProductInterface
getValue
-
-
-
-
Constructor Detail
-
SwapLeg
public SwapLeg(ScheduleInterface legSchedule, java.lang.String forwardCurveName, double spread, java.lang.String discountCurveName, boolean isNotionalExchanged)
Creates a swap leg. The swap leg has a unit notional of 1.- Parameters:
legSchedule- Schedule of the leg.forwardCurveName- Name of the forward curve, leave empty if this is a fix leg.spread- Fixed spread on the forward or fix rate.discountCurveName- Name of the discount curve for the leg.isNotionalExchanged- If true, the leg will pay notional at the beginning of each swap period and receive notional at the end of the swap period. Note that the cash flow date for the notional is periodStart and periodEnd (not fixingDate and paymentDate).
-
SwapLeg
public SwapLeg(ScheduleInterface legSchedule, java.lang.String forwardCurveName, double spread, java.lang.String discountCurveName)
Creates a swap leg (without notional exchange). The swap leg has a unit notional of 1.- Parameters:
legSchedule- Schedule of the leg.forwardCurveName- Name of the forward curve, leave empty if this is a fix leg.spread- Fixed spread on the forward or fix rate.discountCurveName- Name of the discount curve for the leg.
-
-
Method Detail
-
getValue
public double getValue(double evaluationTime, AnalyticModelInterface model)Description copied from interface:AnalyticProductInterfaceReturn the valuation of the product using the given model. The model has to implement the modes ofAnalyticModelInterface.- Specified by:
getValuein interfaceAnalyticProductInterface- Parameters:
evaluationTime- The evaluation time as double. Cash flows prior and including this time are not considered.model- The model under which the product is valued.- Returns:
- The value of the product using the given model.
-
getSchedule
public ScheduleInterface getSchedule()
-
getForwardCurveName
public java.lang.String getForwardCurveName()
-
getSpread
public double getSpread()
-
getDiscountCurveName
public java.lang.String getDiscountCurveName()
-
isNotionalExchanged
public boolean isNotionalExchanged()
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DataMelt 3.0 © DataMelt by jWork.ORG