Esempio n. 1
0
        /// <summary>Adds the specified  (interest rate) caplet tenor convention.
        /// </summary>
        /// <param name="value">The caplet tenor convention to add.</param>
        /// <returns>A value indicating whether <paramref name="value"/> has been added.</returns>
        public static ItemAddedState Add(IIRCapletTenorConvention value)
        {
            ItemAddedState state = sm_Pool.Add(value);

            //sm_Logger.Add_PoolItemState(state, (value != null) ? value.Name : null);
            return(state);
        }
 /// <summary>Sets the standard caplet tenor convention and sets the <see cref="CapletTenorConventionState"/> to <see cref="ConventionState.StandardValue"/>.
 /// </summary>
 /// <param name="capletTenorConvention">The caplet tenor convention.</param>
 internal void SetStandardCapletTenorConvention(IIRCapletTenorConvention capletTenorConvention)
 {
     if (capletTenorConvention == null)
     {
         throw new ArgumentNullException("capletTenorConvention");
     }
     m_CapletTenorConvention      = capletTenorConvention;
     m_CapletTenorConventionState = ConventionState.StandardValue;
 }
 /// <summary>Initializes a new instance of the <see cref="ReadOnlyMoneyMarketConventions"/> class.
 /// </summary>
 /// <param name="moneyMarketConventions">The money market conventions.</param>
 /// <exception cref="ArgumentNullException">Thrown, if <paramref name="moneyMarketConventions"/> is <c>null</c>.</exception>
 /// <exception cref="ArgumentException">Thrown, if <paramref name="moneyMarketConventions"/> is not completely defined.</exception>
 public ReadOnlyMoneyMarketConventions(MoneyMarketConventions moneyMarketConventions)
 {
     if (moneyMarketConventions == null)
     {
         throw new ArgumentNullException("moneyMarketConventions");
     }
     if (moneyMarketConventions.IsCompletelyDefined == false)
     {
         throw new ArgumentException(String.Format(ExceptionMessages.ArgumentIsNotWellDefined, "Money market conventions"), "moneyMarketConventions");
     }
     BusinessDayConvention = moneyMarketConventions.BusinessDayConvention;
     FixingLag             = moneyMarketConventions.FixingLag;
     BusinessDaysToSettle  = moneyMarketConventions.BusinessDaysToSettle.Value;
     CapletTenorConvention = moneyMarketConventions.CapletTenorConvention;
     DayCountConvention    = moneyMarketConventions.DayCountConvention;
     FutureBasePointValue  = moneyMarketConventions.FutureBasePointValue;
     LiborIndexName        = moneyMarketConventions.LiborIndexName;
     LiborRateRoundingRule = moneyMarketConventions.LiborRateRoundingRule;
 }
Esempio n. 4
0
 /// <summary>Gets a specified (interest rate) caplet tenor convention.
 /// </summary>
 /// <param name="name">The name of the caplet tenor convention.</param>
 /// <param name="value">The value (output).</param>
 /// <returns>A value indicating whether <paramref name="value"/> contains valid data.</returns>
 public static bool TryGetValue(string name, out IIRCapletTenorConvention value)
 {
     return(sm_Pool.TryGetValue(name, out value));
 }