static { USD_DSC_NODES[0] = TermDepositCurveNode.of( TermDepositTemplate.of(Period.ofDays(1), USD_DEPOSIT_T0), QuoteKey.of(StandardId.of(SCHEME, USD_DSC_ID_VALUE[0]))); USD_DSC_NODES[1] = TermDepositCurveNode.of( TermDepositTemplate.of(Period.ofDays(1), USD_DEPOSIT_T1), QuoteKey.of(StandardId.of(SCHEME, USD_DSC_ID_VALUE[1]))); for (int i = 0; i < USD_DSC_NB_OIS_NODES; i++) { USD_DSC_NODES[USD_DSC_NB_DEPO_NODES + i] = FixedOvernightSwapCurveNode.of( FixedOvernightSwapTemplate.of( Period.ZERO, Tenor.of(USD_DSC_OIS_TENORS[i]), USD_FIXED_1Y_FED_FUND_OIS), QuoteKey.of(StandardId.of(SCHEME, USD_DSC_ID_VALUE[USD_DSC_NB_DEPO_NODES + i]))); } }
@Override public SwapTrade trade(LocalDate valuationDate, MarketData marketData) { double fixedRate = marketData.getValue(rateKey) + additionalSpread; return template.toTrade(valuationDate, BuySell.BUY, 1, fixedRate); }
@Override public DatedCurveParameterMetadata metadata(LocalDate valuationDate) { SwapTrade trade = template.toTrade(valuationDate, BuySell.BUY, 1, 1); return TenorCurveNodeMetadata.of(trade.getProduct().getEndDate(), template.getTenor()); }