Exemple #1
0
        public override IborIndex Clone(YieldTermStructure forwardingCurve)
        {
            if (Impl.QlObj is not global::QuantLib.OvernightIndex iborIdx)
            {
                throw new InvalidOperationException(
                          $"Implementation object reference is of type {Impl.QlObj.GetType().FullName} which is not derived from {nameof(global::QuantLib.OvernightIndex)}");
            }
            var qlObj = iborIdx.clone(forwardingCurve.GetHandle());

            if (qlObj is global::QuantLib.OvernightIndex onIdx)
            {
                return(new OvernightIndex(onIdx));
            }

            // This should never happen
            return(new IborIndex(qlObj));
        }
Exemple #2
0
 public IsdaCdsEngine(DefaultProbabilityTermStructure creditCurve, double recoveryRate, YieldTermStructure discountCurve)
     : base(new QlIsdaCdsEngine(creditCurve.GetHandle(), recoveryRate, discountCurve.GetHandle()))
 {
 }
 public DiscountingSwapEngine(YieldTermStructure discountCurve)
     : base(new QlDiscountingSwapEngine(discountCurve.GetHandle()))
 {
 }
Exemple #4
0
 public ForwardPointsEngine(ExchangeRate spotExchangeRate, FxForwardPointTermStructure forwardPointsCurve,
                            YieldTermStructure baseDiscountCurve, YieldTermStructure quoteDiscountCurve)
     : base(new QlFwdPtsEngine(spotExchangeRate.QlObj, forwardPointsCurve.GetHandle(), baseDiscountCurve.GetHandle(), quoteDiscountCurve.GetHandle()))
 {
 }