Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/02/16 16:16:29 (8 years ago)
Author:
gkronber
Message:

#2649 adapted OnlineSharpeRatioCalculator and OnlineNormalizedMeanSquaredErrorCalculator to use PopulationVariance instead of Variance (minor difference for vectors with only a few elements)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Trading/3.4/Calculators/OnlineSharpeRatioCalculator.cs

    r14185 r14226  
    3131    public double SharpeRatio {
    3232      get {
    33         if (meanAndVarianceCalculator.Variance > 0)
    34           return meanAndVarianceCalculator.Mean / Math.Sqrt(meanAndVarianceCalculator.Variance);
     33        if (meanAndVarianceCalculator.PopulationVariance > 0)
     34          return meanAndVarianceCalculator.Mean / Math.Sqrt(meanAndVarianceCalculator.PopulationVariance);
    3535        else return 0.0;
    3636      }
     
    4646    public OnlineCalculatorError ErrorState {
    4747      get {
    48         return meanAndVarianceCalculator.MeanErrorState | meanAndVarianceCalculator.VarianceErrorState | profitCalculator.ErrorState;
     48        return meanAndVarianceCalculator.MeanErrorState | meanAndVarianceCalculator.PopulationVarianceErrorState | profitCalculator.ErrorState;
    4949      }
    5050    }
Note: See TracChangeset for help on using the changeset viewer.