/** * Creates a trade based on this template. * <p> * This returns a trade based on the specified date. * The notional is unsigned, with buy/sell determining the direction of the trade. * If buying the Ibor fixing deposit, the floating rate is paid from the counterparty, with the fixed rate being received. * If selling the Ibor fixing deposit, the floating received is paid to the counterparty, with the fixed rate being paid. * * @param tradeDate the date of the trade * @param buySell the buy/sell flag, see {@link IborFixingDeposit#getBuySell()} * @param notional the notional amount, in the payment currency of the template * @param fixedRate the fixed rate, typically derived from the market * @param refData the reference data, used to resolve the trade dates * @return the trade * @throws ReferenceDataNotFoundException if an identifier cannot be resolved in the reference data */ public IborFixingDepositTrade createTrade( LocalDate tradeDate, BuySell buySell, double notional, double fixedRate, ReferenceData refData) { return convention.createTrade(tradeDate, depositPeriod, buySell, notional, fixedRate, refData); }
ResolvedIborFixingDepositTrade fix0 = c.createTrade(VALUATION_DATE, EUR_EURIBOR_6M.getTenor().getPeriod(), BuySell.BUY, 1.0, 0.0, REF_DATA).resolve(REF_DATA); double rateFixing = MARKET_QUOTE.value(fix0, MULTICURVE_EUR_2_CALIBRATED); ResolvedIborFixingDepositTrade fix = c.createTrade(VALUATION_DATE, EUR_EURIBOR_6M.getTenor().getPeriod(), BuySell.BUY, 1.0, rateFixing, REF_DATA).resolve(REF_DATA); tradesE3.add(fix);
double notional = 1d; double fixedRate = 0.045; IborFixingDepositTrade trade = convention.createTrade(tradeDate, depositPeriod, BUY, notional, fixedRate, REF_DATA); LocalDate startExpected = SPOT_ADJ.adjust(tradeDate, REF_DATA); LocalDate endExpected = startExpected.plus(depositPeriod);