Examples of BondFutureOptionPremiumSecurityDefinition


Examples of com.opengamma.analytics.financial.instrument.future.BondFutureOptionPremiumSecurityDefinition

    }
    final BondFutureDefinition underlyingFuture = _underlyingConverter.visitBondFutureSecurity(underlyingSecurity);
    final ZonedDateTime expirationDate = security.getExpiry().getExpiry();
    final double strike = security.getStrike();
    final boolean isCall = security.getOptionType() == OptionType.CALL ? true : false;
    return new BondFutureOptionPremiumSecurityDefinition(underlyingFuture, expirationDate, strike, isCall);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.instrument.future.BondFutureOptionPremiumSecurityDefinition

    ArgumentChecker.notNull(trade.getPremium(), "Bond future option trade must have a premium set. The interpretation of premium is the market price, without unit, i.e. not %");
    //TODO fix the next two lines - it's here to avoid double-multiplying when stuff is scaled at the position level
    final int quantity = 1;
    final double premium = -trade.getPremium() * Math.signum(trade.getQuantity().doubleValue());
    final ZonedDateTime tradeDate = trade.getTradeDate().atTime(trade.getTradeTime()).atZoneSameInstant(ZoneOffset.UTC); //TODO get the real time zone
    final BondFutureOptionPremiumSecurityDefinition underlyingOption = (BondFutureOptionPremiumSecurityDefinition) securityDefinition;
    return new BondFutureOptionPremiumTransactionDefinition(underlyingOption, quantity, tradeDate, premium);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.