Esempio n. 1
0
 public void Calculate_OneElementInEquity__EmptyResult()
 {
     CheckForEmpty(EquityDistributionCalculator.Calculate(new List <SystemValue>()
     {
         new SystemValue()
     }));
 }
Esempio n. 2
0
        public void Calculate__CalculateCorrectly(float[] equityValues, float expectedAvg, float expectedStdDev)
        {
            var equity = equityValues.Select(v => new SystemValue()
            {
                Value = v
            }).ToList();
            var result = EquityDistributionCalculator.Calculate(equity);

            result.Average.ToString("F6").ShouldBe(expectedAvg.ToString("F6"));
            result.StdDev.ToString("F6").ShouldBe(expectedStdDev.ToString("F6"));
        }
Esempio n. 3
0
 private static void CalculateEquityDistribution(SystemStateSummary summary, SystemState systemState)
 {
     summary.EquityDistribution = EquityDistributionCalculator.Calculate(systemState.Equity);
 }
Esempio n. 4
0
 public void Calculate_EmptyEquity__EmptyResult()
 {
     CheckForEmpty(EquityDistributionCalculator.Calculate(new List <SystemValue>()));
 }