Examples of BlackScholesMertonModel


Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.BlackScholesMertonModel

    final int n = 1001;
    final OptionDefinition call1 = new EuropeanVanillaOptionDefinition(SPOT * .9, EXPIRY, true);
    final OptionDefinition put1 = new EuropeanVanillaOptionDefinition(SPOT * .9, EXPIRY, false);
    final OptionDefinition call2 = new EuropeanVanillaOptionDefinition(SPOT * 1.1, EXPIRY, true);
    final OptionDefinition put2 = new EuropeanVanillaOptionDefinition(SPOT * 1.1, EXPIRY, false);
    final AnalyticOptionModel<OptionDefinition, StandardOptionDataBundle> bsm = new BlackScholesMertonModel();
    TreeOptionModel<OptionDefinition, StandardOptionDataBundle> treeModel = new BinomialOptionModel<>(CRR, n, 5);
    assertGreeks(call1, treeModel, bsm);
    assertGreeks(put1, treeModel, bsm);
    assertGreeks(call2, treeModel, bsm);
    assertGreeks(put2, treeModel, bsm);
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.