Examples of price()


Examples of com.barchart.feed.api.model.data.Book.Entry.price()

       
        Entry entry = top.ask();
       
        if (!entry.isNull()) {
          sb.append(" ASK TOP").append(" price=")
              .append(entry.price().asDouble())
              .append(" qty=").append(entry.size().asDouble());
        }
       
        entry = top.bid();
       
View Full Code Here

Examples of com.barchart.feed.api.model.data.Book.Entry.price()

       
        entry = top.bid();
       
        if (!entry.isNull()) {
          sb.append(" BID TOP").append(" price=")
              .append(entry.price().asDouble())
              .append(" qty=").append(entry.size().asDouble());
        }

        System.out.println(sb.toString());
View Full Code Here

Examples of com.barchart.feed.api.model.data.Book.Entry.price()

       
        Entry entry = top.ask();
       
        if (!entry.isNull()) {
          sb.append(" ASK TOP").append(" price=")
              .append(entry.price().asDouble())
              .append(" qty=").append(entry.size().asDouble());
        }
       
        entry = top.bid();
       
View Full Code Here

Examples of com.barchart.feed.api.model.data.Book.Entry.price()

       
        entry = top.bid();
       
        if (!entry.isNull()) {
          sb.append(" BID TOP").append(" price=")
              .append(entry.price().asDouble())
              .append(" qty=").append(entry.size().asDouble());
        }

        System.out.println(sb.toString());
View Full Code Here

Examples of com.barchart.feed.base.book.api.MarketBookEntry.price()

          MarketBookEntry entry = top.side(MarketBookSide.ASK);

          if (!entry.isNull()) {
            sb.append(" ASK TOP").append(" price=")
                .append(ValueUtil.asDouble(entry.price()))
                .append(" qty=").append(entry.size().asLong());
          }

          entry = top.side(MarketBookSide.BID);
View Full Code Here

Examples of com.barchart.feed.base.book.api.MarketBookEntry.price()

          entry = top.side(MarketBookSide.BID);

          if (!entry.isNull()) {
            sb.append(" BID TOP").append(" price=")
                .append(ValueUtil.asDouble(entry.price()))
                .append(" qty=").append(entry.size().asLong());
          }

          final MarketBar barCurrent = value
              .get(MarketField.BAR_CURRENT);
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.BjerksundStenslandModel.price()

    final double pdePrice = pricer.price(s0, k, r, b, t, sigma, isCall, isAmerican, sSteps, tSteps);
    final double endTime = System.nanoTime() / 1e6;
    final double duration = endTime - startTime;


    final double amPrice = amPricer.price(s0, k, r, b, t, sigma, isCall);
    final double relErr = Math.abs(1 - pdePrice / amPrice);
    System.out.println(tSteps + "\t" + sSteps + "\t" + duration + df * fwd + "\t" + amPrice + "\t" + pdePrice + "\t" + relErr);

  }
}
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.formula.SABRExtrapolationRightFunction.price()

    final double beta = sabrData.getSABRParameter().getBeta(expiryMaturity);
    final double rho = sabrData.getSABRParameter().getRho(expiryMaturity);
    final double nu = sabrData.getSABRParameter().getNu(expiryMaturity);
    final SABRFormulaData sabrParam = new SABRFormulaData(alpha, beta, rho, nu);
    final SABRExtrapolationRightFunction sabrExtrapolation = new SABRExtrapolationRightFunction(forwardModified, sabrParam, _cutOffStrike, swaption.getTimeToExpiry(), _mu);
    return pvbpModified * sabrExtrapolation.price(option) * (swaption.isLong() ? 1.0 : -1.0);
  }

  /**
   * Computes the present value rate sensitivity to rates of a physical delivery European swaption in the SABR model with extrapolation to the right.
   * @param swaption The swaption.
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.formula.SABRExtrapolationRightFunction.price()

    final double beta = sabrData.getSABRParameter().getBeta(expiryMaturity);
    final double rho = sabrData.getSABRParameter().getRho(expiryMaturity);
    final double nu = sabrData.getSABRParameter().getNu(expiryMaturity);
    final SABRFormulaData sabrParam = new SABRFormulaData(alpha, beta, rho, nu);
    final SABRExtrapolationRightFunction sabrExtrapolation = new SABRExtrapolationRightFunction(forwardModified, sabrParam, _cutOffStrike, swaption.getTimeToExpiry(), _mu);
    InterestRateCurveSensitivity result = pvbpModifiedDr.multipliedBy(sabrExtrapolation.price(option));
    final double priceDF = sabrExtrapolation.priceDerivativeForward(option);
    result = result.plus(forwardModifiedDr.multipliedBy(pvbpModified * priceDF));
    if (!swaption.isLong()) {
      result = result.multipliedBy(-1);
    }
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.formula.SABRExtrapolationRightFunction.price()

    final double beta = sabrData.getSABRParameter().getBeta(expiryMaturity);
    final double rho = sabrData.getSABRParameter().getRho(expiryMaturity);
    final double nu = sabrData.getSABRParameter().getNu(expiryMaturity);
    final SABRFormulaData sabrParam = new SABRFormulaData(alpha, beta, rho, nu);
    final SABRExtrapolationRightFunction sabrExtrapolation = new SABRExtrapolationRightFunction(forwardModified, sabrParam, _cutOffStrike, swaption.getTimeToExpiry(), _mu);
    return MultipleCurrencyAmount.of(ccy, pvbpModified * sabrExtrapolation.price(option) * (swaption.isLong() ? 1.0 : -1.0));
  }

  /**
   * Computes the present value rate sensitivity to rates of a physical delivery European swaption in the SABR model with extrapolation to the right.
   * @param swaption The swaption.
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.