(self)
| 648 | self.assertTrue(stats.isnull().any()) |
| 649 | |
| 650 | def test_optimize_speed(self): |
| 651 | bt = Backtest(GOOG.iloc[:100], SmaCross) |
| 652 | start = time.process_time() |
| 653 | bt.optimize(fast=range(2, 20, 2), slow=range(10, 40, 2)) |
| 654 | end = time.process_time() |
| 655 | print(end - start) |
| 656 | handicap = 5 if 'win' in sys.platform else .1 |
| 657 | self.assertLess(end - start, .3 + handicap) |
| 658 | |
| 659 | |
| 660 | class TestPlot(TestCase): |