Exemple #1
0
 def testAD(self):
     barDs = self.__loadBarDS()
     self.assertTrue(compare(indicator.AD(barDs, 252)[0], -1631000.00))
     self.assertTrue(compare(indicator.AD(barDs, 252)[1], 2974412.02))
     self.assertTrue(compare(indicator.AD(barDs, 252)[-2], 8707691.07))
     self.assertTrue(compare(indicator.AD(barDs, 252)[-1], 8328944.54))
 def testAD(self):
     barDs = self.__loadBarDS()
     self.assertAmountsAreEqual(indicator.AD(barDs, 252)[0], -1631000.00)
     self.assertAmountsAreEqual(indicator.AD(barDs, 252)[1], 2974412.02)
     self.assertAmountsAreEqual(indicator.AD(barDs, 252)[-2], 8707691.07)
     self.assertAmountsAreEqual(indicator.AD(barDs, 252)[-1], 8328944.54)