Examples of FutureOptionExpiries


Examples of com.opengamma.financial.analytics.model.FutureOptionExpiries

    ArgumentChecker.notNull(strike, "strike");
    ArgumentChecker.notNull(surfaceDate, "surface date");
    final String prefix = getFutureOptionPrefix();
    final StringBuffer ticker = new StringBuffer();
    ticker.append(prefix);
    FutureOptionExpiries expiryRule = EXPIRY_RULES.get(prefix); // TODO: Review whether we can hoist from loop in RawVolatilitySurfaceDataFunction.buildDataRequirements
    if (expiryRule == null) {
      s_logger.info("No expiry rule has been setup for " + prefix + ". Using Default of 3rd Friday.");
      expiryRule = EXPIRY_RULES.get("DEFAULT");
    }
    final int nthExpiry = nthOfPeriod.getFirst();
    final Tenor period = nthOfPeriod.getSecond();
    final LocalDate expiry = expiryRule.getExpiry(nthExpiry, surfaceDate, period);
    final String expiryCode = BloombergFutureUtils.getShortExpiryCode(expiry);
    ticker.append(expiryCode);
    ticker.append(strike > useCallAboveStrike() ? "C" : "P");
    ticker.append(" ");
    ticker.append(FORMATTER.format(strike));
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.