Documentation of 'org.jquantlib.instruments.Forward' Java class
Forward
org.jquantlib.instruments

Class Forward

  • All Implemented Interfaces:
    Observable, Observer
    Direct Known Subclasses:
    ForwardRateAgreement


    public abstract class Forward
    extends Instrument
    Abstract base forward class

    Derived classes must implement the virtual functions spotValue() (NPV or spot price) and spotIncome() associated with the specific relevant underlying (e.g. bond, stock, commodity, loan/deposit). These functions must be used to set the protected member variables underlyingSpotValue_ and underlyingIncome_ within performCalculations() in the derived class before the base-class implementation is called.

    spotIncome() refers generically to the present value of coupons, dividends or storage costs.

    discountCurve_ is the curve used to discount forward contract cash flows back to the evaluation day, as well as to obtain forward values for spot values/prices.

    incomeDiscountCurve_, which for generality is not automatically set to the discountCurve_, is the curve used to discount future income/dividends/storage-costs etc back to the evaluation date.

    • Method Detail

      • spotValue

        public abstract double spotValue()
      • forwardValue

        public double forwardValue()
      • impliedYield

        public InterestRate impliedYield(double underlyingSpotValue,
                                         double forwardValue,
                                         Date settlementDate,
                                         Compounding compoundingConvention,
                                         DayCounter dayCounter)
        Simple yield calculation based on underlying spot and forward values, taking into account underlying income.

        When \f$ t>0 \f$, call with:

         underlyingSpotValue=spotValue(t);
         forwardValue=strikePrice;
         
        to get current yield. For a repo, if , impliedYield should reproduce the spot repo rate. For FRA's, this should reproduce the relevant zero rate at the FRA's maturity date;
      • settlementDate

        public Date settlementDate()
      • performCalculations

        public void performCalculations()
        Description copied from class: Instrument
        This method performs the actual calculations and set any needed results.
        See Also:
        LazyObject.performCalculations()
      • isExpired

        public boolean isExpired()
        Specified by:
        isExpired in class Instrument
        Returns:
        true if the instrument is still tradeable.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.