예제 #1
0
 public void testDavesUseCase()
 {
     indicator = new ZScoreSpud(values, 250, true);
     addPoints(@"..\..\testdata\Spuds\testSeries1.csv");
     AlmostEqual(0.470930066149, indicator[0], 1e-6);
     addPoint(36.539344090000, 0.377952911928, 1e-6);
     addPoint(39.180824180000, 0.615454770040, 1e-6);
 }
예제 #2
0
 public void testZScoreBiased()
 {
     indicator = new ZScoreSpud(values, true);
     addPoint(3, 0.0);
     addPoint(7, 1.0);
     addPoint(7);
     AlmostEqual((4.0 / 3.0) / Math.Sqrt(32.0 / 9.0), indicator[0], 1e-6);
     addPoint(19, 10.0 / 6.0);
 }
예제 #3
0
        public void testStandardDeviationBiased()
        {
            var zScoreSpud = new ZScoreSpud(values, 250, true);

            indicator = zScoreSpud;
            addPoint(3);
            addPoint(7);
            AlmostEqual(2, zScoreSpud.standardDeviation(), 1e-6);
            addPoint(7);
            AlmostEqual(1.885618, zScoreSpud.standardDeviation(), 1e-6);
        }
예제 #4
0
        public void testStandardDeviationUnbiased()
        {
            var zScoreSpud = new ZScoreSpud(values, 250, false);

            indicator = zScoreSpud;
            addPoint(3);
            addPoint(7);
            AlmostEqual(2.828427, zScoreSpud.standardDeviation(), 1e-6);
            addPoint(7);
            AlmostEqual(2.309401, zScoreSpud.standardDeviation(), 1e-6);
        }
예제 #5
0
 public void testZScoreWithDefaultConstructor()
 {
     indicator = new ZScoreSpud(values);
     testUnbiased();
 }
예제 #6
0
 public void testZScoreUnBiasedForWindowAlternative()
 {
     indicator = new ZScoreSpud(values, 3, false);
     testUnbiasedThreeWindow();
 }
예제 #7
0
 public void testZScoreUnBiasedForWindow()
 {
     indicator = new ZScoreSpud(values, 3);
     testUnbiasedThreeWindow();
 }
예제 #8
0
 public void testZScoreUnBiased()
 {
     indicator = new ZScoreSpud(values, false);
     testUnbiased();
 }