コード例 #1
0
 private double getPrice(final double power, final boolean isCall) {
   return MODEL
       .getGreeks(getDefinition(power, isCall), BUNDLE, REQUIRED_GREEKS)
       .get(Greek.FAIR_PRICE);
 }
コード例 #2
0
 private double getBSPrice(final double power, final boolean isCall) {
   final StandardOptionDataBundle bsBundle = getModifiedDataBundle(BUNDLE, power);
   return BS_MODEL
       .getGreeks(getDefinition(power, isCall), bsBundle, REQUIRED_GREEKS)
       .get(Greek.FAIR_PRICE);
 }
コード例 #3
0
 private void assertPriceEquals(
     final LogOptionDefinition definition, final double sigma, final double price) {
   final StandardOptionDataBundle bundle = getBundle(sigma);
   final GreekResultCollection actual = MODEL.getGreeks(definition, bundle, REQUIRED_GREEKS);
   assertEquals(actual.get(Greek.FAIR_PRICE), price, EPS);
 }