Examples of SharpeRatioCalculator


Examples of com.opengamma.analytics.financial.riskreward.SharpeRatioCalculator

    final TimeSeriesReturnCalculator returnCalculator = getReturnCalculator(constraints.getValues(ValuePropertyNames.RETURN_CALCULATOR));
    DoubleTimeSeries<?> benchmarkReturnTS = returnCalculator.evaluate(benchmarkTSObject.getTimeSeries());
    DoubleTimeSeries<?>[] series = TimeSeriesIntersector.intersect(assetReturnTS, benchmarkReturnTS);
    assetReturnTS = series[0];
    benchmarkReturnTS = series[1];
    final SharpeRatioCalculator calculator = getCalculator(constraints.getValues(ValuePropertyNames.EXCESS_RETURN_CALCULATOR),
        constraints.getValues(ValuePropertyNames.STD_DEV_CALCULATOR));
    final double ratio = calculator.evaluate(assetReturnTS, benchmarkReturnTS);
    final ValueProperties resultProperties = getResultProperties(desiredValues.iterator().next());
    return Sets.newHashSet(new ComputedValue(new ValueSpecification(ValueRequirementNames.SHARPE_RATIO, targetSpec, resultProperties), ratio));
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.riskreward.SharpeRatioCalculator

    }
    final DoubleTimeSeriesStatisticsCalculator excessReturnCalculator =
        new DoubleTimeSeriesStatisticsCalculator(StatisticsCalculatorFactory.getCalculator(excessReturnCalculatorNames.iterator().next()));
    final DoubleTimeSeriesStatisticsCalculator stdDevCalculator =
        new DoubleTimeSeriesStatisticsCalculator(StatisticsCalculatorFactory.getCalculator(stdDevCalculatorNames.iterator().next()));
    return new SharpeRatioCalculator(WORKING_DAYS_PER_YEAR, excessReturnCalculator, stdDevCalculator);
  }
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.