Ejemplo n.º 1
0
        protected List <DateTime> Adjust(List <DateTime> dateList, myRateCurve rateCurve)
        {
            List <DateTime> res = new List <DateTime>();

            foreach (DateTime dt in dateList)
            {
                res.Add(Adjust(dt, rateCurve));
            }
            return(res);
        }
Ejemplo n.º 2
0
        protected double Compute_Coupons_PV(DateTime valuationDate, myRateCurve rateCurve)
        {
            double cumSum = 0.0;

            foreach (DateTime dt in coupons_Schedule(valuationDate).Keys)
            {
                _couponDF[dt] = 0.01 * rateCurve.getDiscountFactor(dt);
                _couponPV[dt] = _couponDF[dt] * _couponSchedule[dt];
                cumSum       += _couponPV[dt];
            }

            return(cumSum);
        }
Ejemplo n.º 3
0
        protected double Compute_PV(DateTime valuationDate, Period curvePeriod, myRateCurve rateCurve)
        {
            _valuationDate = valuationDate;
            double cumSum = 0.0;

            foreach (DateTime dt in _couponSchedule.Keys)
            {
                _DF[dt] = 0.01 * rateCurve.getDiscountFactor(dt);
                _PV[dt] = _DF[dt] * _couponSchedule[dt];
                cumSum += _PV[dt];
            }

            return(cumSum);
        }
Ejemplo n.º 4
0
        // Adjust the dates

        protected DateTime Adjust(DateTime dateTime, myRateCurve rateCurve)
        {
            Date d = rateCurve.CurveCalendar.adjust(dateTime.ToDate(), rateCurve.CurveBusinessDayConvention);

            return(d.ToDateTime());
        }
Ejemplo n.º 5
0
        // Poretcted

        protected void Compute_PV(DateTime valuationDate, myRateCurve rateCurve)
        {
            Compute_PV(valuationDate, _defaultPeriod, rateCurve);
        }