net.finmath.montecarlo.interestrate.products.components
Class Period
- java.lang.Object
-
- net.finmath.montecarlo.AbstractMonteCarloProduct
-
- net.finmath.montecarlo.interestrate.products.AbstractLIBORMonteCarloProduct
-
- net.finmath.montecarlo.interestrate.products.components.AbstractProductComponent
-
- net.finmath.montecarlo.interestrate.products.components.AbstractPeriod
-
- net.finmath.montecarlo.interestrate.products.components.Period
-
- All Implemented Interfaces:
- java.io.Serializable, ProductInterface
public class Period extends AbstractPeriod
A period. A period has references to the index (coupon) and the notional. It provides the fixing date for the index, the period length, and the payment date.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Period(double periodStart, double periodEnd, double fixingDate, double paymentDate, AbstractNotional notional, AbstractProductComponent index, boolean couponFlow, boolean notionalFlow, boolean payer)Create a simple period with notional and index (coupon) flow.Period(double periodStart, double periodEnd, double fixingDate, double paymentDate, AbstractNotional notional, AbstractProductComponent index, double daycountFraction, boolean couponFlow, boolean notionalFlow, boolean payer)Create a simple period with notional and index (coupon) flow.Period(double periodStart, double periodEnd, double fixingDate, double paymentDate, AbstractNotional notional, AbstractProductComponent index, double daycountFraction, boolean couponFlow, boolean notionalFlow, boolean payer, boolean isExcludeAccruedInterest)Create a simple period with notional and index (coupon) flow.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description RandomVariableInterfacegetCoupon(LIBORModelMonteCarloSimulationInterface model)RandomVariableInterfacegetValue(double evaluationTime, LIBORModelMonteCarloSimulationInterface model)This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime.java.lang.StringtoString()-
Methods inherited from class net.finmath.montecarlo.interestrate.products.components.AbstractPeriod
getCurrency, getDaycountFraction, getFixingDate, getIndex, getNotional, getPaymentDate, getPeriodEnd, getPeriodStart, queryUnderlyings
-
Methods inherited from class net.finmath.montecarlo.interestrate.products.components.AbstractProductComponent
getValues
-
Methods inherited from class net.finmath.montecarlo.interestrate.products.AbstractLIBORMonteCarloProduct
getFactorDrift, getValue, getValueForModifiedData
-
Methods inherited from class net.finmath.montecarlo.AbstractMonteCarloProduct
getValue, getValue, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData
-
-
-
-
Constructor Detail
-
Period
public Period(double periodStart, double periodEnd, double fixingDate, double paymentDate, AbstractNotional notional, AbstractProductComponent index, double daycountFraction, boolean couponFlow, boolean notionalFlow, boolean payer, boolean isExcludeAccruedInterest)Create a simple period with notional and index (coupon) flow.- Parameters:
periodStart- The period start.periodEnd- The period end.fixingDate- The fixing date (as double).paymentDate- The payment date (as double).notional- The notional object relevant for this period.index- The index (used for coupon calculation) associated with this period.daycountFraction- The daycount fraction (coupon = index(fixingDate) * daycountFraction).couponFlow- If true, the coupon will be payed. Otherwise there will be not coupon flow.notionalFlow- If true, there will be a positive notional flow at period start (but only if peirodStart > evaluationTime) and a negative notional flow at period end (but only if periodEnd > evaluationTime). Otherwise there will be no notional flows.payer- If true, the period will be a payer period, i.e. notional and coupon at period end are payed (negative). Otherwise it is a receiver period.isExcludeAccruedInterest- If the true, the valuation will exclude accrued interest, if any.
-
Period
public Period(double periodStart, double periodEnd, double fixingDate, double paymentDate, AbstractNotional notional, AbstractProductComponent index, double daycountFraction, boolean couponFlow, boolean notionalFlow, boolean payer)Create a simple period with notional and index (coupon) flow. The valuation does not exclude the accrued interest, i.e., the valuation reports a so called dirty price.- Parameters:
periodStart- The period start.periodEnd- The period end.fixingDate- The fixing date (as double).paymentDate- The payment date (as double).notional- The notional object relevant for this period.index- The index (used for coupon calculation) associated with this period.daycountFraction- The daycount fraction (coupon = index(fixingDate) * daycountFraction).couponFlow- If true, the coupon will be payed. Otherwise there will be not coupon flow.notionalFlow- If true, there will be a positive notional flow at period start (but only if peirodStart > evaluationTime) and a negative notional flow at period end (but only if periodEnd > evaluationTime). Otherwise there will be no notional flows.payer- If true, the period will be a payer period, i.e. notional and coupon at period end are payed (negative). Otherwise it is a receiver period.
-
Period
public Period(double periodStart, double periodEnd, double fixingDate, double paymentDate, AbstractNotional notional, AbstractProductComponent index, boolean couponFlow, boolean notionalFlow, boolean payer)Create a simple period with notional and index (coupon) flow. The valuation does not exclude the accrued interest, i.e., the valuation reports a so called dirty price.- Parameters:
periodStart- The period start.periodEnd- The period end.fixingDate- The fixing date (as double).paymentDate- The payment date (as double).notional- The notional object relevant for this period.index- The index (coupon) associated with this period.couponFlow- If true, the coupon will be payed. Otherwise there will be not coupon flow.notionalFlow- If true, there will be a positive notional flow at period start (but only if peirodStart > evaluationTime) and a negative notional flow at period end (but only if periodEnd > evaluationTime). Otherwise there will be no notional flows.payer- If true, the period will be a payer period, i.e. notional and coupon at period end are payed (negative). Otherwise it is a receiver period.
-
-
Method Detail
-
getValue
public RandomVariableInterface getValue(double evaluationTime, LIBORModelMonteCarloSimulationInterface model) throws CalculationException
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime. Note: For a lattice this is often the value conditional to evalutationTime, for a Monte-Carlo simulation this is the (sum of) value discounted to evaluation time. Cashflows prior evaluationTime are not considered.- Specified by:
getValuein classAbstractPeriod- Parameters:
evaluationTime- The time on which this products value should be observed.model- The model used to price the product.- Returns:
- The random variable representing the value of the product discounted to evaluation time
- Throws:
CalculationException- Thrown if the valuation fails, specific cause may be available via thecause()method.
-
getCoupon
public RandomVariableInterface getCoupon(LIBORModelMonteCarloSimulationInterface model) throws CalculationException
- Specified by:
getCouponin classAbstractPeriod- Throws:
CalculationException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classAbstractPeriod
-
-
DataMelt 3.0 © DataMelt by jWork.ORG