当前位置: 首页>>代码示例>>C#>>正文


C# BusinessDayConvention类代码示例

本文整理汇总了C#中BusinessDayConvention的典型用法代码示例。如果您正苦于以下问题:C# BusinessDayConvention类的具体用法?C# BusinessDayConvention怎么用?C# BusinessDayConvention使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BusinessDayConvention类属于命名空间,在下文中一共展示了BusinessDayConvention类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FloatingRateBond

        public FloatingRateBond(int settlementDays, double faceAmount, Schedule schedule, IborIndex index,
            DayCounter paymentDayCounter, BusinessDayConvention paymentConvention, int fixingDays,
            List<double> gearings, List<double> spreads)
            : this(settlementDays, faceAmount, schedule, index, paymentDayCounter, BusinessDayConvention.Following,
				   fixingDays, gearings, spreads, new List<double>(), new List<double>(), false, 100, null)
        {
        }
开发者ID:ariesy,项目名称:QLNet,代码行数:7,代码来源:FloatingRateBond.cs

示例2: FixedRateBond

      //! fixed-rate bond
      /*! \ingroup instruments

          \test calculations are tested by checking results against
                cached values.
      */
 

      //! simple annual compounding coupon rates      
      public FixedRateBond(int settlementDays, double faceAmount, Schedule schedule,List<double> coupons, 
                           DayCounter accrualDayCounter, BusinessDayConvention paymentConvention = BusinessDayConvention.Following,
                           double redemption = 100, Date issueDate = null,Calendar paymentCalendar = null,
			                  Period exCouponPeriod = null,
                           Calendar exCouponCalendar = null,
									BusinessDayConvention exCouponConvention = BusinessDayConvention.Unadjusted,
                           bool exCouponEndOfMonth = false)
         : base(settlementDays, paymentCalendar == null ? schedule.calendar() : paymentCalendar, 
                issueDate) 
      {
         frequency_ = schedule.tenor().frequency();
         dayCounter_ = accrualDayCounter;
         maturityDate_ = schedule.endDate();

         cashflows_ = new FixedRateLeg(schedule)
            .withCouponRates(coupons, accrualDayCounter)
				.withExCouponPeriod(exCouponPeriod,
										  exCouponCalendar,
										  exCouponConvention,
										  exCouponEndOfMonth)
            .withPaymentCalendar(calendar_)
            .withNotionals(faceAmount)
            .withPaymentAdjustment(paymentConvention); 

         addRedemptionsToCashflows(new List<double>() { redemption });

         if (cashflows().Count == 0)
            throw new ApplicationException("bond with no cashflows!");

         if (redemptions_.Count != 1)
            throw new ApplicationException("multiple redemptions created");
      }
开发者ID:akasolace,项目名称:qlnet,代码行数:41,代码来源:Fixedratebond.cs

示例3: FixedRateBond

        public FixedRateBond(int settlementDays, double faceAmount, Schedule schedule,
            List<double> coupons, DayCounter accrualDayCounter,
            BusinessDayConvention paymentConvention, double redemption, Date issueDate)
            : this(settlementDays, faceAmount, schedule, coupons, accrualDayCounter,
				   paymentConvention, redemption, issueDate, new Calendar())
        {
        }
开发者ID:ammachado,项目名称:QLNet,代码行数:7,代码来源:Fixedratebond.cs

示例4: SwaptionVolatilityDiscrete

        public SwaptionVolatilityDiscrete(List<Period> optionTenors,
                                   List<Period> swapTenors,
                                   Date referenceDate,
                                   Calendar cal,
                                   BusinessDayConvention bdc,
                                   DayCounter dc)
            : base(referenceDate, cal, bdc, dc)
        {
            nOptionTenors_ = optionTenors.Count;
            optionTenors_ = optionTenors;
            optionDates_ = new InitializedList<Date>(nOptionTenors_);
            optionTimes_ = new InitializedList<double>(nOptionTenors_);
            optionDatesAsReal_ = new InitializedList<double>(nOptionTenors_);
            nSwapTenors_ = swapTenors.Count;
            swapTenors_ = swapTenors;
            swapLengths_ = new InitializedList<double>(nSwapTenors_);

            checkOptionTenors();
            initializeOptionDatesAndTimes();

            checkSwapTenors();
            initializeSwapLengths();

            optionInterpolator_ = new LinearInterpolation(optionTimes_,
                                            optionTimes_.Count,
                                            optionDatesAsReal_);

            optionInterpolator_.update();
            optionInterpolator_.enableExtrapolation();
        }
开发者ID:akasolace,项目名称:qlnet,代码行数:30,代码来源:swaptionvoldiscrete.cs

示例5: FloatingRateBond

        public FloatingRateBond(int settlementDays, double faceAmount, Schedule schedule, IborIndex index, DayCounter paymentDayCounter,
                                BusinessDayConvention paymentConvention, int fixingDays, List<double> gearings, List<double> spreads,
                                List<double> caps, List<double> floors, bool inArrears, double redemption, Date issueDate)
            : base(settlementDays, schedule.calendar(), issueDate) {
            maturityDate_ = schedule.endDate();
            cashflows_ = new IborLeg(schedule, index)
                            .withPaymentDayCounter(paymentDayCounter)
                            .withFixingDays(fixingDays)
                            .withGearings(gearings)
                            .withSpreads(spreads)
                            .withCaps(caps)
                            .withFloors(floors)
                            .inArrears(inArrears)
                            .withNotionals(faceAmount)
                            .withPaymentAdjustment(paymentConvention);

            addRedemptionsToCashflows(new List<double>() { redemption });

            if (cashflows().Count == 0)
                throw new ApplicationException("bond with no cashflows!");
            if (redemptions_.Count != 1)
                throw new ApplicationException("multiple redemptions created");

            index.registerWith(update);
        }
开发者ID:akasolace,项目名称:qlnet,代码行数:25,代码来源:FloatingRateBond.cs

示例6: AmortizingFixedRateBond

      public AmortizingFixedRateBond(
                          int settlementDays,
                          List<double> notionals,
                          Schedule schedule,
                          List<double> coupons,
                          DayCounter accrualDayCounter,
                          BusinessDayConvention paymentConvention = BusinessDayConvention.Following,
                          Date issueDate = null)
         :base(settlementDays, schedule.calendar(), issueDate)
      {
         frequency_ = schedule.tenor().frequency();
         dayCounter_ = accrualDayCounter;
         schedule_ = schedule;

         maturityDate_ = schedule.endDate();

         cashflows_ = new FixedRateLeg(schedule)
             .withCouponRates(coupons, accrualDayCounter)
             .withNotionals(notionals)
             .withPaymentAdjustment(paymentConvention).value();
             

         addRedemptionsToCashflows();

         if ( cashflows().empty())
            throw new ApplicationException("bond with no cashflows!");
      }
开发者ID:akasolace,项目名称:qlnet,代码行数:27,代码来源:AmortizingFixedRateBond.cs

示例7: SwapRateHelper

        public SwapRateHelper(double rate, Period tenor, Calendar calendar,
            Frequency fixedFrequency, BusinessDayConvention fixedConvention, DayCounter fixedDayCount,
            IborIndex iborIndex)
            : this(rate, tenor, calendar, fixedFrequency, fixedConvention, fixedDayCount, iborIndex,
		                      	     new Handle<Quote>(), new Period(0, TimeUnit.Days))
        {
        }
开发者ID:StreetConnect,项目名称:QLNet,代码行数:7,代码来源:SwapRateHelper.cs

示例8: ZeroCouponBond

 public ZeroCouponBond(int settlementDays, Calendar calendar, double faceAmount, Date maturityDate, BusinessDayConvention paymentConvention, double redemption, Date issueDate)
     : base(settlementDays, calendar, issueDate)
 {
     maturityDate_ = maturityDate;
     Date redemptionDate = calendar_.adjust(maturityDate, paymentConvention);
     setSingleRedemption(faceAmount, redemption, redemptionDate);
 }
开发者ID:ammachado,项目名称:QLNet,代码行数:7,代码来源:Zerocouponbond.cs

示例9: ConstantOptionletVolatility

        //! floating reference date, floating market data
        public ConstantOptionletVolatility(int settlementDays, Calendar cal, BusinessDayConvention bdc,
                                           Handle<Quote> vol, DayCounter dc)
            : base(settlementDays, cal, bdc, dc)
        {
            volatility_ = vol;

            volatility_.registerWith(update);
        }
开发者ID:akasolace,项目名称:qlnet,代码行数:9,代码来源:ConstantOptionletVolatility.cs

示例10: withExCouponPeriod

 public CPILegBase withExCouponPeriod(Period period, Calendar cal, BusinessDayConvention convention, bool endOfMonth = false)
 {
     exCouponPeriod_ = period;
       exCouponCalendar_ = cal;
       exCouponAdjustment_ = convention;
       exCouponEndOfMonth_ = endOfMonth;
       return this;
 }
开发者ID:Yenyenx,项目名称:qlnet,代码行数:8,代码来源:RateLegBase.cs

示例11: IborIndex

 public IborIndex(string familyName, Period tenor, int settlementDays, Currency currency,
          Calendar fixingCalendar, BusinessDayConvention convention, bool endOfMonth,
          DayCounter dayCounter)
     : this(familyName, tenor, settlementDays, currency,
            fixingCalendar, convention, endOfMonth,
            dayCounter, new Handle<YieldTermStructure>())
 {
 }
开发者ID:Yenyenx,项目名称:qlnet,代码行数:8,代码来源:IBORIndex.cs

示例12: DepositRateHelper

 public DepositRateHelper(double rate, Period tenor, int fixingDays, Calendar calendar,
     BusinessDayConvention convention, bool endOfMonth, DayCounter dayCounter)
     : base(rate)
 {
     iborIndex_ = new IborIndex("no-fix", tenor, fixingDays, new Currency(), calendar, convention,
                                endOfMonth, dayCounter, termStructureHandle_);
     initializeDates();
 }
开发者ID:StreetConnect,项目名称:QLNet,代码行数:8,代码来源:DepositRateHelper.cs

示例13: ConstantCapFloorTermVolatility

 // fixed reference date, fixed market data
 public ConstantCapFloorTermVolatility(Date referenceDate,
                                     Calendar cal,
                                     BusinessDayConvention bdc,
                                     double volatility,
                                     DayCounter dc)
     : base(referenceDate, cal, bdc, dc)
 {
     volatility_ = new Handle<Quote>(new SimpleQuote(volatility));
 }
开发者ID:Yenyenx,项目名称:qlnet,代码行数:10,代码来源:ConstantCapFloorTermVolatility.cs

示例14: FixedRateBondHelper

        //public FixedRateBondHelper(Quote cleanPrice, int settlementDays, double faceAmount, Schedule schedule,
        //                   List<double> coupons, DayCounter dayCounter,
        //                   BusinessDayConvention paymentConv = Following,
        //                   double redemption = 100.0,
        //                   Date issueDate = null);
        public FixedRateBondHelper(Handle<Quote> cleanPrice, int settlementDays, double faceAmount, Schedule schedule,
                                   List<double> coupons, DayCounter dayCounter, BusinessDayConvention paymentConvention,
                                   double redemption, Date issueDate)
            : base(cleanPrice, new FixedRateBond(settlementDays, faceAmount, schedule,
                                                 coupons, dayCounter, paymentConvention,
                                                 redemption, issueDate)) {

            fixedRateBond_ = bond_ as FixedRateBond;
        }
开发者ID:minikie,项目名称:OTCDerivativesCalculatorModule,代码行数:14,代码来源:Bondhelpers.cs

示例15: ConstantSwaptionVolatility

 //! fixed reference date, fixed market data
 public ConstantSwaptionVolatility( Date referenceDate,
                            Calendar cal,
                            BusinessDayConvention bdc,
                            double vol,
                            DayCounter dc)
     : base(referenceDate, cal, bdc, dc)
 {
     volatility_ = new Handle<Quote>(new SimpleQuote(vol));
     maxSwapTenor_ = new Period(100, TimeUnit.Years);
 }
开发者ID:akasolace,项目名称:qlnet,代码行数:11,代码来源:swaptionconstantvol.cs


注:本文中的BusinessDayConvention类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。