Пример #1
0
 def testHT_DCPHASE(self):
     ds = self.__loadMedPriceDS()
     self.assertTrue(compare(indicator.HT_DCPHASE(ds, 252)[63], 22.1496,
                             4))  # Original value 22.1495
     self.assertTrue(compare(indicator.HT_DCPHASE(ds, 252)[-3], -31.182, 3))
     self.assertTrue(compare(indicator.HT_DCPHASE(ds, 252)[-2], 23.2691, 4))
     self.assertTrue(compare(indicator.HT_DCPHASE(ds, 252)[-1], 47.2765, 4))
Пример #2
0
 def testHT_DCPHASE(self):
     ds = self.__loadMedPriceDS()
     self.assertAmountsAreEqual(
         indicator.HT_DCPHASE(ds, 252)[63], 22.1496,
         4)  # Original value 22.1495
     self.assertAmountsAreEqual(
         indicator.HT_DCPHASE(ds, 252)[-3], -31.182, 3)
     self.assertAmountsAreEqual(
         indicator.HT_DCPHASE(ds, 252)[-2], 23.2691, 4)
     self.assertAmountsAreEqual(
         indicator.HT_DCPHASE(ds, 252)[-1], 47.2765, 4)