Ejemplo n.º 1
0
 // -------------------------------------------------------------------------
 @Override
 public ResolvedFxSingleBarrierOption resolve(ReferenceData refData) {
   if (rebate != null) {
     return ResolvedFxSingleBarrierOption.of(underlyingOption.resolve(refData), barrier, rebate);
   }
   return ResolvedFxSingleBarrierOption.of(underlyingOption.resolve(refData), barrier);
 }
Ejemplo n.º 2
0
 // -------------------------------------------------------------------------
 @ImmutableValidator
 private void validate() {
   if (rebate != null) {
     ArgChecker.isTrue(rebate.getAmount() > 0d, "rebate must be positive");
     ArgChecker.isTrue(
         underlyingOption.getUnderlying().getCurrencyPair().contains(rebate.getCurrency()),
         "The rebate currency must be one of underlying currency pair");
   }
 }
Ejemplo n.º 3
0
 /**
  * Gets currency pair of the base currency and counter currency.
  *
  * <p>This currency pair is conventional, thus indifferent to the direction of FX.
  *
  * @return the currency pair
  */
 public CurrencyPair getCurrencyPair() {
   return underlyingOption.getCurrencyPair();
 }