QLNet.InterestRate.impliedRate C# (CSharp) Метод

impliedRate() публичный статический Метод

public static impliedRate ( double compound, Date d1, Date d2, DayCounter resultDC, Compounding comp ) : InterestRate
compound double
d1 Date
d2 Date
resultDC DayCounter
comp Compounding
Результат InterestRate
        public static InterestRate impliedRate(double compound, Date d1, Date d2, DayCounter resultDC, Compounding comp)
        {
            return impliedRate(compound, d1, d2, resultDC, comp, Frequency.Annual);
        }

Same methods

InterestRate::impliedRate ( double compound, Date d1, Date d2, DayCounter resultDC, Compounding comp, Frequency freq ) : InterestRate
InterestRate::impliedRate ( double compound, double t, DayCounter resultDC, Compounding comp ) : InterestRate
InterestRate::impliedRate ( double compound, double t, DayCounter resultDC, Compounding comp, Frequency freq ) : InterestRate

Usage Example

Пример #1
0
        /*! 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 \f$ t=0 \f$, impliedYield should reproduce the
         * spot repo rate. For FRA's, this should reproduce the
         * relevant zero rate at the FRA's maturityDate_;
         */
        public InterestRate impliedYield(double underlyingSpotValue, double forwardValue, Date settlementDate,
                                         Compounding compoundingConvention, DayCounter dayCounter)
        {
            double tenor             = dayCounter.yearFraction(settlementDate, maturityDate_);
            double compoundingFactor = forwardValue / (underlyingSpotValue - spotIncome(incomeDiscountCurve_));

            return(InterestRate.impliedRate(compoundingFactor, dayCounter, compoundingConvention, Frequency.Annual, tenor));
        }
All Usage Examples Of QLNet.InterestRate::impliedRate