Module net.finmath.lib
Class AccruedInterest
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.indices.AbstractIndex
net.finmath.montecarlo.interestrate.products.indices.AccruedInterest
- All Implemented Interfaces:
Serializable
,Product
,TermStructureMonteCarloProduct
,MonteCarloProduct
An accrued interest index.
For a given index I this class's getValue function calculates the value
\( I(t_{0}) \cdot \frac{\max(\text{dcf}(t,T_{end}),0)}{\text{dcf}(T_{start},T_{end})} \) \text{,}
where \( \text{dcf} \) is the given day count convention and T_{start} and T_{end} are the
period start and period end date respectively and \( t \) is the fixing date.
The fixingDate is provided as an argument to the getValue method in terms of a ACT/365 day count fraction from
the given reference date.
Note that the value returned is not numeraire adjusted, i.e., not discounted.
Note that the index is fixed in \( t \). For
- Version:
- 1.0
- Author:
- Christian Fries
- See Also:
- Serialized Form
-
Constructor Summary
ConstructorsConstructorDescriptionAccruedInterest(String name, String currency, LocalDate referenceDate, LocalDate periodStartDate, LocalDate periodEndDate, AbstractIndex index, Double indexFixingTime, DayCountConvention daycountConvention, boolean isNegativeAccruedInterest)
Create an accrued interest index. -
Method Summary
Modifier and TypeMethodDescriptiongetValue(double fixingTime, TermStructureMonteCarloSimulationModel model)
This method returns the value random variable of the product within the specified model, evaluated at a given evalutationTime.Returns a set of underlying names referenced by this product component (i.e., required for valuation) or null if none.Methods inherited from class net.finmath.montecarlo.interestrate.products.indices.AbstractIndex
getName
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
getCurrency, getValue, getValue, getValues, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, toString
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
getCurrency, getValue, getValue, getValues, getValues, getValues, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData, getValuesForModifiedData
-
Constructor Details
-
AccruedInterest
public AccruedInterest(String name, String currency, LocalDate referenceDate, LocalDate periodStartDate, LocalDate periodEndDate, AbstractIndex index, Double indexFixingTime, DayCountConvention daycountConvention, boolean isNegativeAccruedInterest)Create an accrued interest index.- Parameters:
name
- The name of the index.currency
- The payment currency.referenceDate
- The model reference date (corresponding to t=0).periodStartDate
- The period start date.periodEndDate
- The period end date.index
- The index.indexFixingTime
- The fixing time \( t_{0} \) of the index.daycountConvention
- The day count convention.isNegativeAccruedInterest
- If true, the class represents the coupon payment minus the accrued interest, i.e., \( I(t_{0}) \cdot \frac{\max(\text{dcf}(T_{start},t),0)}{\text{dcf}(T_{start},T_{end})} \).
-
-
Method Details
-
getValue
public RandomVariable getValue(double fixingTime, TermStructureMonteCarloSimulationModel model) throws CalculationExceptionDescription copied from interface:TermStructureMonteCarloProduct
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:
getValue
in interfaceTermStructureMonteCarloProduct
- Specified by:
getValue
in classAbstractIndex
- Parameters:
fixingTime
- 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.
-
queryUnderlyings
Description copied from class:AbstractProductComponent
Returns a set of underlying names referenced by this product component (i.e., required for valuation) or null if none.- Specified by:
queryUnderlyings
in classAbstractProductComponent
- Returns:
- A set of underlying names referenced by this product component (i.e., required for valuation) or null if none.
-