java.lang.Object
net.finmath.montecarlo.AbstractMonteCarloProduct
net.finmath.montecarlo.interestrate.products.AbstractTermStructureMonteCarloProduct
net.finmath.montecarlo.interestrate.products.components.AbstractProductComponent
net.finmath.montecarlo.interestrate.products.components.AbstractPeriod
net.finmath.montecarlo.interestrate.products.components.Period
- All Implemented Interfaces:
Serializable
,Product
,TermStructureMonteCarloProduct
,MonteCarloProduct
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.
- Version:
- 1.1
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionPeriod(double periodStart, double periodEnd, double fixingDate, double paymentDate, Notional 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, Notional 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, Notional notional, AbstractProductComponent index, double daycountFraction, boolean couponFlow, boolean notionalFlow, boolean payer, boolean isExcludeAccruedInterest)
Create a simple period with notional and index (coupon) flow.Period(LocalDateTime referenceDate, double periodStart, double periodEnd, double fixingDate, double paymentDate, Notional 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
Modifier and TypeMethodDescriptiongetCoupon(double evaluationTime, TermStructureMonteCarloSimulationModel model)
getValue(double evaluationTime, TermStructureMonteCarloSimulationModel model)
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime.toString()
Methods inherited from class net.finmath.montecarlo.interestrate.products.components.AbstractPeriod
getCurrency, getDaycountFraction, getFixingDate, getIndex, getNotional, getPaymentDate, getPeriodEnd, getPeriodStart, getReferenceDate, queryUnderlyings
Methods inherited from class net.finmath.montecarlo.interestrate.products.components.AbstractProductComponent
getExecutor, getValues
Methods inherited from class net.finmath.montecarlo.interestrate.products.AbstractTermStructureMonteCarloProduct
getFactorDrift, getValue, getValueForModifiedData
Methods inherited from class net.finmath.montecarlo.AbstractMonteCarloProduct
getValue, getValue, getValues, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.finmath.montecarlo.MonteCarloProduct
getValue, getValue, getValues, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData
-
Constructor Details
-
Period
public Period(LocalDateTime referenceDate, double periodStart, double periodEnd, double fixingDate, double paymentDate, Notional notional, AbstractProductComponent index, double daycountFraction, boolean couponFlow, boolean notionalFlow, boolean payer, boolean isExcludeAccruedInterest)Create a simple period with notional and index (coupon) flow.- Parameters:
referenceDate
- The date corresponding to time \( t = 0 \).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, Notional 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, Notional 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, Notional 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 Details
-
getValue
public RandomVariable getValue(double evaluationTime, TermStructureMonteCarloSimulationModel model) throws CalculationExceptionThis 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:
getValue
in interfaceTermStructureMonteCarloProduct
- Specified by:
getValue
in 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 RandomVariable getCoupon(double evaluationTime, TermStructureMonteCarloSimulationModel model) throws CalculationException- Specified by:
getCoupon
in classAbstractPeriod
- Throws:
CalculationException
-
toString
- Overrides:
toString
in classAbstractPeriod
-