public override void FromXML(XmlNode node) { CheckNode(node, "FRA"); _type = Type.FRA; _id = GetChildValue(node, "Id", true); _strIndex = GetChildValue(node, "Index", true); _index = Parsers.ParseIborIndex(_strIndex); }
public virtual void Build() { // First check that we have an overnight index. _index = (OvernightIndex)Parsers.ParseIborIndex(_strIndex); Utils.QL_REQUIRE(_index != null, () => "The index string, " + _strIndex + ", does not represent an overnight index."); _spotLag = Parsers.ParseInteger(_strSpotLag); _fixedDayCounter = Parsers.ParseDayCounter(_strFixedDayCounter); _paymentLag = _strPaymentLag == string.Empty ? 0 : Parsers.ParseInteger(_strPaymentLag); _eom = _strEom == string.Empty ? false : Parsers.ParseBool(_strEom); _fixedFrequency = _strFixedFrequency == string.Empty ? Frequency.Annual : Parsers.ParseFrequency(_strFixedFrequency); _fixedConvention = _strFixedConvention == string.Empty ? BusinessDayConvention.Following : Parsers.ParseBusinessDayConvention(_strFixedConvention); _fixedPaymentConvention = _strFixedPaymentConvention == string.Empty ? BusinessDayConvention.Following : Parsers.ParseBusinessDayConvention(_strFixedPaymentConvention); //_rule = _strRule == string.Empty ? DateGeneration.Rule.Backward : Parsers.ParseDateGenerationRule(_strRule); }
public virtual void Build() { _fixedCalendar = Parsers.ParseCalendar(_strFixedCalendar); _fixedFrequency = Parsers.ParseFrequency(_strFixedFrequency); _fixedConvention = Parsers.ParseBusinessDayConvention(_strFixedConvention); _fixedDayCounter = Parsers.ParseDayCounter(_strFixedDayCounter); _index = Parsers.ParseIborIndex(_strIndex); if (_hasSubPeriod) { _floatFrequency = Parsers.ParseFrequency(_strFloatFrequency); //_subPeriodsCouponType = Parsers.ParseSubPeriodsCouponType(_strSubPeriodsCouponType); } else { _floatFrequency = Frequency.NoFrequency; //_subPeriodsCouponType = QuantExt::SubPeriodsCoupon::Compounding; } }
/// <summary> /// Index based constructor /// </summary> /// <param name="id"></param> /// <param name="index"></param> public FraConvention(string id, string index) : base(id, Type.FRA) { _strIndex = index; _index = Parsers.ParseIborIndex(index); }