(self)
| 724 | def test_preview(self): |
| 725 | class Strategy(SmaCross): |
| 726 | def init(self): |
| 727 | super().init() |
| 728 | |
| 729 | def ok(x): |
| 730 | return x |
| 731 | |
| 732 | self.a = self.I(SMA, self.data.Open, 5, overlay=False, name='ok') |
| 733 | self.b = self.I(ok, np.random.random(len(self.data.Open))) |
| 734 | |
| 735 | bt = Backtest(GOOG, Strategy) |
| 736 | bt.run() |