Ejemplo n.º 1
0
        public void RandomWalkIndexHigh()
        {
            var rwih = new RandomWalkIndexHighIndicator(_data, 5);

            TaTestsUtils.AssertDecimalEquals(rwih.GetValue(6), 0.2118);
            TaTestsUtils.AssertDecimalEquals(rwih.GetValue(7), 0.1581);
            TaTestsUtils.AssertDecimalEquals(rwih.GetValue(8), 0.3741);
            TaTestsUtils.AssertDecimalEquals(rwih.GetValue(9), 0.5798);
            TaTestsUtils.AssertDecimalEquals(rwih.GetValue(10), 0.7518);
            TaTestsUtils.AssertDecimalEquals(rwih.GetValue(11), 0.9861);
            TaTestsUtils.AssertDecimalEquals(rwih.GetValue(12), 0.9652);
            TaTestsUtils.AssertDecimalEquals(rwih.GetValue(13), 0.5408);
            TaTestsUtils.AssertDecimalEquals(rwih.GetValue(14), -0.1607);
            TaTestsUtils.AssertDecimalEquals(rwih.GetValue(15), -1.0879);
            TaTestsUtils.AssertDecimalEquals(rwih.GetValue(16), -1.1186);
            TaTestsUtils.AssertDecimalEquals(rwih.GetValue(17), -1.4072);
            TaTestsUtils.AssertDecimalEquals(rwih.GetValue(18), -0.6779);
        }
Ejemplo n.º 2
0
        public void randomWalkIndexHigh()
        {
            RandomWalkIndexHighIndicator rwih = new RandomWalkIndexHighIndicator(data, 5);


            Assert.AreEqual(rwih.GetValue(6), 0.5006262987743697562919584092M);
            Assert.AreEqual(rwih.GetValue(7), 0.3381230500710659083529760736M);
            Assert.AreEqual(rwih.GetValue(8), 0.7223662368421644750642479413M);
            Assert.AreEqual(rwih.GetValue(9), 0.9549226380057807567194967401M);
            Assert.AreEqual(rwih.GetValue(10), 1.1681868872491170783879085932M);
            Assert.AreEqual(rwih.GetValue(11), 1.3740103611235391071741549306M);
            Assert.AreEqual(rwih.GetValue(12), 1.25315522352721792878641636M);
            Assert.AreEqual(rwih.GetValue(13), 0.6202832197679790238402898723M);
            Assert.AreEqual(rwih.GetValue(14), -0.1743172831086535593979681536M);
            Assert.AreEqual(rwih.GetValue(15), -1.1591689063905048844651929841M);
            Assert.AreEqual(rwih.GetValue(16), -1.1662517885354832367875193289M);
            Assert.AreEqual(rwih.GetValue(17), -1.4539265716895695884198632904M);
            Assert.AreEqual(rwih.GetValue(18), -0.6963994177442214751041670408M);
        }