@Override public SwapTrade trade(LocalDate valuationDate, MarketData marketData) { double marketQuote = marketData.getValue(spreadKey) + additionalSpread; FxRate fxRate = marketData.getValue(fxKey()); double rate = fxRate.fxRate(template.getCurrencyPair()); return template.toTrade(valuationDate, BuySell.BUY, 1, rate, marketQuote); }
private FxRateKey fxKey() { return FxRateKey.of(template.getCurrencyPair()); }
@Override public DatedCurveParameterMetadata metadata(LocalDate valuationDate) { SwapTrade trade = template.toTrade(valuationDate, BuySell.BUY, 1, 1, 0); return TenorCurveNodeMetadata.of(trade.getProduct().getEndDate(), template.getTenor(), label); }