Package com.opengamma.analytics.financial.equity.variance.pricing

Examples of com.opengamma.analytics.financial.equity.variance.pricing.EquityVarianceSwapStaticReplicationPricer.priceFromImpliedVols()


    final AffineDividends dividends = (AffineDividends) dividendsObject;
    final SmileSurfaceDataBundle volatilities = getData(inputs);
    final DoubleTimeSeries<LocalDate> underlyingTS = ((HistoricalTimeSeries) tsObject).getTimeSeries();
    final EquityVarianceSwap swap = definition.toDerivative(now, underlyingTS);
    final EquityVarianceSwapStaticReplicationPricer pricer = EquityVarianceSwapStaticReplicationPricer.builder().create(); //TODO don't just use defaults
    final double pv = pricer.priceFromImpliedVols(swap, spot, yieldCurve, dividends, volatilities);
    final ValueProperties properties = desiredValue.getConstraints().copy()
        .withoutAny(ValuePropertyNames.FUNCTION).with(ValuePropertyNames.FUNCTION, getUniqueId()).get();
    final ValueSpecification spec = new ValueSpecification(getValueRequirementName(), target.toSpecification(), properties);
    return Collections.singleton(new ComputedValue(spec, pv));
  }
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.