Package com.opengamma.analytics.financial.sensitivity

Examples of com.opengamma.analytics.financial.sensitivity.ValueGreekSensitivity


    new SensitivityAndReturnDataBundle(S1, VALUE_GAMMA, m);
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testWrongUnderlyings1() {
    final Sensitivity<ValueGreek> s = new ValueGreekSensitivity(new ValueGreek(Greek.VANNA), "ValueVanna");
    new SensitivityAndReturnDataBundle(s, VALUE_DELTA, M1);
  }
View Full Code Here


    new SensitivityAndReturnDataBundle(s, VALUE_DELTA, M1);
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testWrongUnderlyings2() {
    final Sensitivity<ValueGreek> s = new ValueGreekSensitivity(new ValueGreek(Greek.VEGA), "ValueVega");
    new SensitivityAndReturnDataBundle(s, VALUE_DELTA, M1);
  }
View Full Code Here

    final Set<String> returnCalculatorName = desiredValue.getConstraints().getValues(ValuePropertyNames.RETURN_CALCULATOR);
    final HistoricalTimeSeries timeSeries = (HistoricalTimeSeries) inputs.getValue(ValueRequirementNames.HISTORICAL_TIME_SERIES);
    final SensitivityAndReturnDataBundle[] dataBundleArray = new SensitivityAndReturnDataBundle[1];
    final Double value = (Double) inputs.getValue(REQUIREMENT_NAME);
    final ValueGreek valueGreek = AvailableValueGreeks.getValueGreekForValueRequirementName(REQUIREMENT_NAME);
    final Sensitivity<?> sensitivity = new ValueGreekSensitivity(valueGreek, position.getUniqueId().toString());
    final Map<UnderlyingType, DoubleTimeSeries<?>> tsReturns = new HashMap<UnderlyingType, DoubleTimeSeries<?>>();
    final Period samplingPeriod = getSamplingPeriod(samplingPeriodName);
    final LocalDate startDate = now.minus(samplingPeriod);
    final Schedule scheduleCalculator = getScheduleCalculator(scheduleCalculatorName);
    final TimeSeriesSamplingFunction samplingFunction = getSamplingFunction(samplingFunctionName);
View Full Code Here

    CALC.evaluate(new SensitivityAndReturnDataBundle[] {null});
  }

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void testThirdOrderSensitivity() {
    final SensitivityAndReturnDataBundle data = new SensitivityAndReturnDataBundle(new ValueGreekSensitivity(new ValueGreek(Greek.SPEED), "A"), 10,
        Collections.<UnderlyingType, DoubleTimeSeries<?>> singletonMap(UnderlyingType.SPOT_PRICE, ImmutableInstantDoubleTimeSeries.of(new long[] {1},
            new double[] {1})));
    CALC.evaluate(data);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.sensitivity.ValueGreekSensitivity

Copyright © 2018 www.massapicom. 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.