Examples of RealizedVariance


Examples of com.opengamma.analytics.financial.equity.variance.pricing.RealizedVariance

   */
  public void swapObservationsCompleted() {
    final VarianceSwap swapPaysTomorrow = new VarianceSwap(-1., -tPlusOne, tPlusOne, varStrike, varNotional, Currency.EUR, annualization, nObs - 1, 0, obs, obsWeight);

    final double pv = PRICER.presentValue(swapPaysTomorrow, MARKET);
    final double variance = new RealizedVariance().evaluate(swapPaysTomorrow);
    final double pvOfHedge = swapStartsNow.getVarNotional() * (variance - swapStartsNow.getVarStrike()) * MARKET.getDiscountCurve().getDiscountFactor(tPlusOne);
    assertEquals(pvOfHedge, pv, 0.01);
  }
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.