コード例 #1
0
            /// <summary>Gets a mutable Swap Market convention template which is initially filled with values of
            /// the current instance, i.e. with some standard conventions.
            /// </summary>
            /// <returns>A mutable (inflation-linked) Swap Market convention template.</returns>
            public InflationMarketConventions.InflationSwapConventions GetMutableTemplate()
            {
                InflationMarketConventions.InflationSwapConventions marketConventions = new InflationMarketConventions.InflationSwapConventions();
                marketConventions.SetStandardBusinessDaysToSettle(BusinessDaysToSettle);
                marketConventions.SetStandardFixedBusinessDayConvention(FixedBusinessDayConvention);
                marketConventions.SetStandardFixedDayCountConvention(FixedDayCountConvention);
                marketConventions.SetStandardFixedFrequency(FixedFrequency);
                marketConventions.SetStandardFloatingBusinessDayConvention(FloatingBusinessDayConvention);
                marketConventions.SetStandardFloatingDayCountConvention(FloatingDayCountConvention);
                marketConventions.SetStandardFloatingFrequency(FloatingFrequency);

                return(marketConventions);
            }
コード例 #2
0
 /// <summary>Initializes a new instance of the <see cref="InflationSwapConventions"/> class.
 /// </summary>
 /// <param name="swapMarketConventions">The swap market conventions.</param>
 public InflationSwapConventions(InflationMarketConventions.InflationSwapConventions swapMarketConventions)
 {
     if (swapMarketConventions == null)
     {
         throw new ArgumentNullException("swapMarketConventions");
     }
     if (swapMarketConventions.IsCompletelyDefined == false)
     {
         throw new ArgumentException(String.Format(ExceptionMessages.ArgumentIsNotWellDefined, "Inflation-linked Swap market conventions"), "swapMarketConventions");
     }
     BusinessDaysToSettle          = swapMarketConventions.BusinessDaysToSettle.Value;
     FixedBusinessDayConvention    = swapMarketConventions.FixedBusinessDayConvention;
     FixedDayCountConvention       = swapMarketConventions.FixedDayCountConvention;
     FixedFrequency                = swapMarketConventions.FixedFrequency;
     FloatingBusinessDayConvention = swapMarketConventions.FloatingBusinessDayConvention;
     FloatingDayCountConvention    = swapMarketConventions.FloatingDayCountConvention;
     FloatingFrequency             = swapMarketConventions.FloatingFrequency;
 }