示例#1
0
        // ************************************************************
        // METHODS
        // ************************************************************

        /*
         * protected void SetRateCurve(Period period_)
         * {
         *  // Check for valuation date
         *  if (_valuationDate == null ||_valuationDate == DateTime.MinValue)
         *  { throw new ArgumentException("DateException", "Valuation date not set. Unable to set rate curve."); }
         *
         *  // Extract the key info
         *  int nb = period_.length();
         *  TimeUnit tu = period_.units();
         *
         *  // Case 1 : Against 3 or 6 month floating rates
         *  if (tu == TimeUnit.Months)
         *  {
         *      if (nb == 3)
         *      {
         *          _curve = new myRateCurveEURv3m(); // as myRateCurve;
         *      }
         *      else if (nb == 6)
         *      {
         *          _curve = new myRateCurveEUR(); // as myRateCurve;
         *      }
         *  }
         *
         *  // Case 1 : Against EONIA
         *  else if (tu == TimeUnit.Days)
         *  {
         *      if (nb == 1)
         *      {
         *          _curve = new myRateCurveEUROIS(); // as myRateCurve;
         *      }
         *  }
         *
         *  else
         *  {
         *      throw new NotImplementedException();
         *  }
         * }
         */

        // Compute the present value (PV)

        // Public
        public double PV_v3m(DateTime valuationDate)
        {
            _curveDescription = "EURIBOR_3M";
            myRateCurveEURv3m rateCurve = new myRateCurveEURv3m(valuationDate);

            return(Compute_PV(valuationDate, _defaultPeriod, rateCurve));
        }
示例#2
0
 public void ForceRateCurve(myRateCurveEURv3m argCurve)
 {
     _rateCurve = argCurve;
 }
示例#3
0
 private void InitializeRateCurve()
 {
     _rateCurve = new myRateCurveEURv3m(this.PricingDate);
 }