/// <summary>Gets a mutable Bond Market convention template which is initially filled with values of /// the current instance, i.e. with some standard conventions. /// </summary> /// <returns>A mutable Bond Market convention template.</returns> public InflationMarketConventions.InflationBondConventions GetMutableTemplate() { InflationMarketConventions.InflationBondConventions marketConventions = new InflationMarketConventions.InflationBondConventions(); marketConventions.SetStandardDayCountconvention(DayCountConvention); marketConventions.SetStandardBusinessDayConvention(BusinessDayConvention); marketConventions.SetStandardCouponFrequency(CouponFrequency); return(marketConventions); }
/// <summary>Initializes a new instance of the <see cref="InflationBondConventions"/> class. /// </summary> /// <param name="bondMarketConventions">The bond market conventions.</param> /// <exception cref="ArgumentNullException">Thrown, if <paramref name="bondMarketConventions"/> is <c>null</c>.</exception> /// <exception cref="ArgumentException">Thrown, if <paramref name="bondMarketConventions"/> is not completely defined.</exception> public InflationBondConventions(InflationMarketConventions.InflationBondConventions bondMarketConventions) { if (bondMarketConventions == null) { throw new ArgumentNullException("bondMarketConventions"); } if (bondMarketConventions.IsCompletelyDefined == false) { throw new ArgumentException(String.Format(ExceptionMessages.ArgumentIsNotWellDefined, "Bond market conventions"), "bondMarketConventions"); } BusinessDayConvention = bondMarketConventions.BusinessDayConvention; CouponFrequency = bondMarketConventions.CouponFrequency; DayCountConvention = bondMarketConventions.DayCountConvention; }