Class AccruedInterest

  • All Implemented Interfaces:
    Serializable, Product, TermStructureMonteCarloProduct, MonteCarloProduct

    public class AccruedInterest
    extends AbstractIndex
    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 Detail

      • 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 Detail

      • getValue

        public RandomVariable getValue​(double fixingTime,
                                       TermStructureMonteCarloSimulationModel model)
                                throws CalculationException
        Description 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 interface TermStructureMonteCarloProduct
        Specified by:
        getValue in class AbstractIndex
        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 the cause() method.
      • queryUnderlyings

        public Set<String> 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 class AbstractProductComponent
        Returns:
        A set of underlying names referenced by this product component (i.e., required for valuation) or null if none.