public override Builder set(string propertyName, object newValue) { switch (propertyName.GetHashCode()) { case 102727412: // label this.label_Renamed = (string)newValue; break; case -518800962: // observableId this.observableId_Renamed = (ObservableId)newValue; break; case 110246592: // tenor this.tenor_Renamed = (Tenor)newValue; break; case 746995843: // spotDateOffset this.spotDateOffset_Renamed = (DaysAdjustment)newValue; break; case -1065319863: // businessDayAdjustment this.businessDayAdjustment_Renamed = (BusinessDayAdjustment)newValue; break; case 1905311443: // dayCount this.dayCount_Renamed = (DayCount)newValue; break; default: throw new NoSuchElementException("Unknown property: " + propertyName); } return(this); }
public override Builder set(string propertyName, object newValue) { switch (propertyName.GetHashCode()) { case -1321546630: // template this.template_Renamed = (FixedIborSwapTemplate)newValue; break; case -938107365: // rateId this.rateId_Renamed = (ObservableId)newValue; break; case 291232890: // additionalSpread this.additionalSpread_Renamed = (double?)newValue.Value; break; case 102727412: // label this.label_Renamed = (string)newValue; break; case 3076014: // date this.date_Renamed = (CurveNodeDate)newValue; break; case -263699392: // dateOrder this.dateOrder_Renamed = (CurveNodeDateOrder)newValue; break; default: throw new NoSuchElementException("Unknown property: " + propertyName); } return(this); }
public override Builder set(string propertyName, object newValue) { switch (propertyName.GetHashCode()) { case -1321546630: // template this.template_Renamed = (FxSwapTemplate)newValue; break; case -1054985843: // fxRateId this.fxRateId_Renamed = (FxRateId)newValue; break; case -566044884: // farForwardPointsId this.farForwardPointsId_Renamed = (ObservableId)newValue; break; case 102727412: // label this.label_Renamed = (string)newValue; break; case 3076014: // date this.date_Renamed = (CurveNodeDate)newValue; break; case -263699392: // dateOrder this.dateOrder_Renamed = (CurveNodeDateOrder)newValue; break; default: throw new NoSuchElementException("Unknown property: " + propertyName); } return(this); }
public override Builder set(string propertyName, object newValue) { switch (propertyName.GetHashCode()) { case -1321546630: // template this.template_Renamed = (CdsTemplate)newValue; break; case 102727412: // label this.label_Renamed = (string)newValue; break; case -518800962: // observableId this.observableId_Renamed = (ObservableId)newValue; break; case 866287159: // legalEntityId this.legalEntityId_Renamed = (StandardId)newValue; break; case 2049149709: // quoteConvention this.quoteConvention_Renamed = (CdsQuoteConvention)newValue; break; case 747425396: // fixedRate this.fixedRate_Renamed = (double?)newValue; break; default: throw new NoSuchElementException("Unknown property: " + propertyName); } return(this); }
/// <summary> /// Restricted copy constructor. </summary> /// <param name="beanToCopy"> the bean to copy from, not null </param> internal Builder(CdsIsdaCreditCurveNode beanToCopy) { this.template_Renamed = beanToCopy.Template; this.label_Renamed = beanToCopy.Label; this.observableId_Renamed = beanToCopy.ObservableId; this.legalEntityId_Renamed = beanToCopy.LegalEntityId; this.quoteConvention_Renamed = beanToCopy.QuoteConvention; this.fixedRate_Renamed = beanToCopy.fixedRate; }
/// <summary> /// Restricted copy constructor. </summary> /// <param name="beanToCopy"> the bean to copy from, not null </param> internal Builder(FixedIborSwapCurveNode beanToCopy) { this.template_Renamed = beanToCopy.Template; this.rateId_Renamed = beanToCopy.RateId; this.additionalSpread_Renamed = beanToCopy.AdditionalSpread; this.label_Renamed = beanToCopy.Label; this.date_Renamed = beanToCopy.Date; this.dateOrder_Renamed = beanToCopy.DateOrder; }
/// <summary> /// Restricted copy constructor. </summary> /// <param name="beanToCopy"> the bean to copy from, not null </param> internal Builder(DepositIsdaCreditCurveNode beanToCopy) { this.label_Renamed = beanToCopy.Label; this.observableId_Renamed = beanToCopy.ObservableId; this.tenor_Renamed = beanToCopy.Tenor; this.spotDateOffset_Renamed = beanToCopy.SpotDateOffset; this.businessDayAdjustment_Renamed = beanToCopy.BusinessDayAdjustment; this.dayCount_Renamed = beanToCopy.DayCount; }
/// <summary> /// Restricted copy constructor. </summary> /// <param name="beanToCopy"> the bean to copy from, not null </param> internal Builder(FxSwapCurveNode beanToCopy) { this.template_Renamed = beanToCopy.Template; this.fxRateId_Renamed = beanToCopy.FxRateId; this.farForwardPointsId_Renamed = beanToCopy.FarForwardPointsId; this.label_Renamed = beanToCopy.Label; this.date_Renamed = beanToCopy.Date; this.dateOrder_Renamed = beanToCopy.DateOrder; }
/// <summary> /// Restricted copy constructor. </summary> /// <param name="beanToCopy"> the bean to copy from, not null </param> internal Builder(XCcyIborIborSwapCurveNode beanToCopy) { this.template_Renamed = beanToCopy.Template; this.fxRateId_Renamed = beanToCopy.FxRateId; this.spreadId_Renamed = beanToCopy.SpreadId; this.additionalSpread_Renamed = beanToCopy.AdditionalSpread; this.label_Renamed = beanToCopy.Label; this.date_Renamed = beanToCopy.Date; this.dateOrder_Renamed = beanToCopy.DateOrder; }
private IborFixingDepositCurveNode(IborFixingDepositTemplate template, ObservableId rateId, double additionalSpread, string label, CurveNodeDate date, CurveNodeDateOrder dateOrder) { JodaBeanUtils.notNull(template, "template"); JodaBeanUtils.notNull(rateId, "rateId"); JodaBeanUtils.notEmpty(label, "label"); JodaBeanUtils.notNull(dateOrder, "dateOrder"); this.template = template; this.rateId = rateId; this.additionalSpread = additionalSpread; this.label = label; this.date_Renamed = date; this.dateOrder = dateOrder; }
private DummyFraCurveNode(Period periodToStart, Period periodToEnd, ObservableId rateId, double spread, string label, CurveNodeDateOrder order) { JodaBeanUtils.notNull(periodToStart, "periodToStart"); JodaBeanUtils.notNull(periodToEnd, "periodToEnd"); JodaBeanUtils.notNull(rateId, "rateId"); JodaBeanUtils.notEmpty(label, "label"); JodaBeanUtils.notNull(order, "order"); this.periodToStart = periodToStart; this.periodToEnd = periodToEnd; this.rateId = rateId; this.spread = spread; this.label = label; this.order = order; }
private FxSwapCurveNode(FxSwapTemplate template, FxRateId fxRateId, ObservableId farForwardPointsId, string label, CurveNodeDate date, CurveNodeDateOrder dateOrder) { JodaBeanUtils.notNull(template, "template"); JodaBeanUtils.notNull(fxRateId, "fxRateId"); JodaBeanUtils.notNull(farForwardPointsId, "farForwardPointsId"); JodaBeanUtils.notEmpty(label, "label"); JodaBeanUtils.notNull(dateOrder, "dateOrder"); this.template = template; this.fxRateId = fxRateId; this.farForwardPointsId = farForwardPointsId; this.label = label; this.date_Renamed = date; this.dateOrder = dateOrder; }
private CdsIsdaCreditCurveNode(CdsTemplate template, string label, ObservableId observableId, StandardId legalEntityId, CdsQuoteConvention quoteConvention, double?fixedRate) { JodaBeanUtils.notNull(template, "template"); JodaBeanUtils.notEmpty(label, "label"); JodaBeanUtils.notNull(observableId, "observableId"); JodaBeanUtils.notNull(legalEntityId, "legalEntityId"); JodaBeanUtils.notNull(quoteConvention, "quoteConvention"); this.template = template; this.label = label; this.observableId = observableId; this.legalEntityId = legalEntityId; this.quoteConvention = quoteConvention; this.fixedRate = fixedRate; validate(); }
private XCcyIborIborSwapCurveNode(XCcyIborIborSwapTemplate template, FxRateId fxRateId, ObservableId spreadId, double additionalSpread, string label, CurveNodeDate date, CurveNodeDateOrder dateOrder) { JodaBeanUtils.notNull(template, "template"); JodaBeanUtils.notNull(fxRateId, "fxRateId"); JodaBeanUtils.notNull(spreadId, "spreadId"); JodaBeanUtils.notEmpty(label, "label"); JodaBeanUtils.notNull(dateOrder, "dateOrder"); this.template = template; this.fxRateId = fxRateId; this.spreadId = spreadId; this.additionalSpread = additionalSpread; this.label = label; this.date_Renamed = date; this.dateOrder = dateOrder; }
private DepositIsdaCreditCurveNode(string label, ObservableId observableId, Tenor tenor, DaysAdjustment spotDateOffset, BusinessDayAdjustment businessDayAdjustment, DayCount dayCount) { JodaBeanUtils.notEmpty(label, "label"); JodaBeanUtils.notNull(observableId, "observableId"); JodaBeanUtils.notNull(tenor, "tenor"); JodaBeanUtils.notNull(spotDateOffset, "spotDateOffset"); JodaBeanUtils.notNull(businessDayAdjustment, "businessDayAdjustment"); JodaBeanUtils.notNull(dayCount, "dayCount"); this.label = label; this.observableId = observableId; this.tenor = tenor; this.spotDateOffset = spotDateOffset; this.businessDayAdjustment = businessDayAdjustment; this.dayCount = dayCount; }
//------------------------------------------------------------------------- // loads a single fixing series CSV file private static ImmutableMap <ObservableId, LocalDateDoubleTimeSeries> parseSingle(CharSource resource) { IDictionary <ObservableId, LocalDateDoubleTimeSeriesBuilder> builders = new Dictionary <ObservableId, LocalDateDoubleTimeSeriesBuilder>(); try { CsvFile csv = CsvFile.of(resource, true); foreach (CsvRow row in csv.rows()) { string referenceStr = row.getField(REFERENCE_FIELD); string dateStr = row.getField(DATE_FIELD); string valueStr = row.getField(VALUE_FIELD); Index index = LoaderUtils.findIndex(referenceStr); ObservableId id = IndexQuoteId.of(index); double value = double.Parse(valueStr); LocalDate date; if (index is PriceIndex) { try { YearMonth ym = LoaderUtils.parseYearMonth(dateStr); date = ym.atEndOfMonth(); } catch (Exception) { date = LoaderUtils.parseDate(dateStr); if (date.DayOfMonth != date.lengthOfMonth()) { throw new System.ArgumentException(Messages.format("Fixing Series CSV loader for price index must have date at end of month: {}", resource)); } } } else { date = LoaderUtils.parseDate(dateStr); } LocalDateDoubleTimeSeriesBuilder builder = builders.computeIfAbsent(id, k => LocalDateDoubleTimeSeries.builder()); builder.put(date, value); } } catch (Exception ex) { throw new System.ArgumentException(Messages.format("Error processing resource as CSV file: {}", resource), ex); } return(MapStream.of(builders).mapValues(builder => builder.build()).toMap()); }
private CdsIndexIsdaCreditCurveNode(CdsTemplate template, string label, ObservableId observableId, StandardId cdsIndexId, IList <StandardId> legalEntityIds, CdsQuoteConvention quoteConvention, double?fixedRate) { JodaBeanUtils.notNull(template, "template"); JodaBeanUtils.notEmpty(label, "label"); JodaBeanUtils.notNull(observableId, "observableId"); JodaBeanUtils.notNull(cdsIndexId, "cdsIndexId"); JodaBeanUtils.notNull(legalEntityIds, "legalEntityIds"); JodaBeanUtils.notNull(quoteConvention, "quoteConvention"); this.template = template; this.label = label; this.observableId = observableId; this.cdsIndexId = cdsIndexId; this.legalEntityIds = ImmutableList.copyOf(legalEntityIds); this.quoteConvention = quoteConvention; this.fixedRate = fixedRate; validate(); }
public LocalDateDoubleTimeSeries getTimeSeries(ObservableId id) { return(TIME_SERIES); }
/// <summary> /// Sets the identifier of the market data value that provides the rate. </summary> /// <param name="rateId"> the new value, not null </param> /// <returns> this, for chaining, not null </returns> public Builder rateId(ObservableId rateId) { JodaBeanUtils.notNull(rateId, "rateId"); this.rateId_Renamed = rateId; return(this); }
/// <summary> /// Returns a curve node for a Fixed-Ibor interest rate swap using the /// specified instrument template, rate key, spread and label. /// </summary> /// <param name="template"> the template defining the node instrument </param> /// <param name="rateId"> the identifier of the market data providing the rate for the node instrument </param> /// <param name="additionalSpread"> the additional spread amount added to the rate </param> /// <param name="label"> the label to use for the node </param> /// <returns> a node whose instrument is built from the template using a market rate </returns> public static FixedIborSwapCurveNode of(FixedIborSwapTemplate template, ObservableId rateId, double additionalSpread, string label) { return(new FixedIborSwapCurveNode(template, rateId, additionalSpread, label, CurveNodeDate.END, CurveNodeDateOrder.DEFAULT)); }
/// <summary> /// Returns a curve node with points upfront convention. /// </summary> /// <param name="template"> the template </param> /// <param name="observableId"> the observable ID </param> /// <param name="legalEntityId"> the legal entity ID </param> /// <param name="fixedRate"> the fixed rate </param> /// <returns> the curve node </returns> public static CdsIsdaCreditCurveNode ofPointsUpfront(CdsTemplate template, ObservableId observableId, StandardId legalEntityId, double?fixedRate) { return(builder().template(template).observableId(observableId).legalEntityId(legalEntityId).quoteConvention(CdsQuoteConvention.POINTS_UPFRONT).fixedRate(fixedRate).build()); }
//------------------------------------------------------------------------- /// <summary> /// Returns a curve node for a Fixed-Ibor interest rate swap using the /// specified instrument template and rate. /// <para> /// A suitable default label will be created. /// /// </para> /// </summary> /// <param name="template"> the template used for building the instrument for the node </param> /// <param name="rateId"> the identifier of the market rate used when building the instrument for the node </param> /// <returns> a node whose instrument is built from the template using a market rate </returns> public static FixedIborSwapCurveNode of(FixedIborSwapTemplate template, ObservableId rateId) { return(of(template, rateId, 0d)); }
/// <summary> /// Returns a curve node for a Fixed-Ibor interest rate swap using the /// specified instrument template, rate key and spread. /// <para> /// A suitable default label will be created. /// /// </para> /// </summary> /// <param name="template"> the template defining the node instrument </param> /// <param name="rateId"> the identifier of the market data providing the rate for the node instrument </param> /// <param name="additionalSpread"> the additional spread amount added to the rate </param> /// <returns> a node whose instrument is built from the template using a market rate </returns> public static FixedIborSwapCurveNode of(FixedIborSwapTemplate template, ObservableId rateId, double additionalSpread) { return(builder().template(template).rateId(rateId).additionalSpread(additionalSpread).build()); }
public LocalDateDoubleTimeSeries getTimeSeries(ObservableId id) { return(underlying.getTimeSeries(id)); }
public LocalDateDoubleTimeSeries getTimeSeries(ObservableId id) { LocalDateDoubleTimeSeries timeSeries = underlying1.getTimeSeries(id); return(!timeSeries.Empty ? timeSeries : underlying2.getTimeSeries(id)); }
/// <summary> /// Returns a curve node with quoted spread convention. /// </summary> /// <param name="template"> the template </param> /// <param name="observableId"> the observable ID </param> /// <param name="legalEntityId"> the legal entity ID </param> /// <param name="fixedRate"> the fixed rate </param> /// <returns> the curve node </returns> public static CdsIsdaCreditCurveNode ofQuotedSpread(CdsTemplate template, ObservableId observableId, StandardId legalEntityId, double?fixedRate) { return(builder().template(template).observableId(observableId).legalEntityId(legalEntityId).quoteConvention(CdsQuoteConvention.QUOTED_SPREAD).fixedRate(fixedRate).build()); }
/// <summary> /// Returns a curve node for an Ibor deposit using the specified template, rate key, spread and label. /// </summary> /// <param name="template"> the template defining the node instrument </param> /// <param name="rateId"> the identifier of the market data providing the rate for the node instrument </param> /// <param name="additionalSpread"> the additional spread amount added to the rate </param> /// <param name="label"> the label to use for the node, if null or empty an appropriate default label will be used </param> /// <returns> a node whose instrument is built from the template using a market rate </returns> public static IborFixingDepositCurveNode of(IborFixingDepositTemplate template, ObservableId rateId, double additionalSpread, string label) { return(new IborFixingDepositCurveNode(template, rateId, additionalSpread, label, CurveNodeDate.END, CurveNodeDateOrder.DEFAULT)); }
/// <summary> /// Returns a curve node for an Ibor deposit using the specified template, rate key and spread. /// <para> /// A suitable default label will be created. /// /// </para> /// </summary> /// <param name="template"> the template defining the node instrument </param> /// <param name="rateId"> the identifier of the market data providing the rate for the node instrument </param> /// <param name="additionalSpread"> the additional spread amount added to the rate </param> /// <returns> a node whose instrument is built from the template using a market rate </returns> public static IborFixingDepositCurveNode of(IborFixingDepositTemplate template, ObservableId rateId, double additionalSpread) { return(builder().template(template).rateId(rateId).additionalSpread(additionalSpread).build()); }
//------------------------------------------------------------------------- /// <summary> /// Returns a curve node for an Ibor deposit using the specified template and rate key. /// <para> /// A suitable default label will be created. /// /// </para> /// </summary> /// <param name="template"> the template used for building the instrument for the node </param> /// <param name="rateId"> the identifier of the market rate used when building the instrument for the node </param> /// <returns> a node whose instrument is built from the template using a market rate </returns> public static IborFixingDepositCurveNode of(IborFixingDepositTemplate template, ObservableId rateId) { return(of(template, rateId, 0d)); }
/// <summary> /// Sets the identifier of the market data value that provides the quoted value. </summary> /// <param name="observableId"> the new value, not null </param> /// <returns> this, for chaining, not null </returns> public Builder observableId(ObservableId observableId) { JodaBeanUtils.notNull(observableId, "observableId"); this.observableId_Renamed = observableId; return(this); }