private boolean isCash(ResolvedSwaption product) { return product.getSwaptionSettlement().getSettlementType().equals(SettlementType.CASH); }
private boolean isCash(ResolvedSwaption product) { return product.getSwaptionSettlement().getSettlementType().equals(SettlementType.CASH); }
private boolean isCash(ResolvedSwaption product) { return product.getSwaptionSettlement().getSettlementType().equals(SettlementType.CASH); }
private boolean isCash(ResolvedSwaption product) { return product.getSwaptionSettlement().getSettlementType().equals(SettlementType.CASH); }
/** * Validates that the swaption is single currency physical. * * @param swaption the swaption */ protected void validateSwaption(ResolvedSwaption swaption) { ArgChecker.isFalse(swaption.getUnderlying().isCrossCurrency(), "Underlying swap must be single currency"); ArgChecker.isTrue(swaption.getSwaptionSettlement().getSettlementType().equals(SettlementType.PHYSICAL), "Swaption must be physical settlement"); }
private void validate(ResolvedSwaption swaption, RatesProvider ratesProvider, HullWhiteOneFactorPiecewiseConstantParametersProvider hwProvider) { ArgChecker.isTrue(hwProvider.getValuationDateTime().toLocalDate().equals(ratesProvider.getValuationDate()), "Hull-White model data and rate data should be for the same date"); ArgChecker.isFalse(swaption.getUnderlying().isCrossCurrency(), "underlying swap should be single currency"); ArgChecker.isTrue(swaption.getSwaptionSettlement().getSettlementType().equals(SettlementType.PHYSICAL), "swaption should be physical settlement"); }
/** * Validates that the swaption is single currency cash par-yield. * * @param swaption the swaption */ protected void validateSwaption(ResolvedSwaption swaption) { ArgChecker.isFalse(swaption.getUnderlying().isCrossCurrency(), "Underlying swap must be single currency"); ArgChecker.isTrue(swaption.getSwaptionSettlement().getSettlementType().equals(SettlementType.CASH), "Swaption must be cash settlement"); CashSwaptionSettlement cashSettle = (CashSwaptionSettlement) swaption.getSwaptionSettlement(); ArgChecker.isTrue(cashSettle.getMethod().equals(CashSwaptionSettlementMethod.PAR_YIELD), "Cash settlement method must be par yield"); }