Beispiel #1
0
        public static RnRFunction ZcFunction(double duration, double fwdZc, double[] meanReversions, double[,] covariances)
        {
            var    zcRateCoeffs = meanReversions.Map(l => ZcRateCoeff(duration, l));
            double cvx          = covariances.BilinearProd(zcRateCoeffs, zcRateCoeffs);

            return(RnRFunctions.ExpAffine(fwdZc * Math.Exp(-0.5 * cvx), zcRateCoeffs));
        }
Beispiel #2
0
        public RnRFunction Spot(DateTime date)
        {
            var forwardWithoutDivs = assetDiscountCurve.Zc(probaMeasure.Date) / assetDiscountCurve.Zc(date);

            return(RnRFunctions.Affine(0.0, new[] { forwardWithoutDivs }));
        }
Beispiel #3
0
 public override RnRFunction Zc(DateTime date, DateTime maturity, double fwdZc)
 {
     return(RnRFunctions.Constant(fwdZc, dimension));
 }