/** * 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 FX Swap, the amount in the first currency of the pair is received * in the near leg and paid in the far leg, while the second currency is paid in the * near leg and received in the far leg. * * @param tradeDate the date of the trade * @param buySell the buy/sell flag * @param notional the notional amount, in the first currency of the currency pair * @param nearFxRate the FX rate for the near leg * @param forwardPoints the FX points to be added to the FX rate at the far leg * @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 FxSwapTrade createTrade( LocalDate tradeDate, BuySell buySell, double notional, double nearFxRate, double forwardPoints, ReferenceData refData) { return convention.createTrade( tradeDate, periodToNear, periodToFar, buySell, notional, nearFxRate, forwardPoints, refData); }