(self)
| 929 | def test_SignalStrategy(self): |
| 930 | class S(SignalStrategy): |
| 931 | def init(self): |
| 932 | sma = self.data.Close.s.rolling(10).mean() |
| 933 | self.set_signal(self.data.Close > sma, |
| 934 | self.data.Close < sma) |
| 935 | |
| 936 | stats = Backtest(GOOG, S).run() |
| 937 | self.assertIn(stats['# Trades'], (1179, 1180)) # varies on different archs? |
nothing calls this directly
no test coverage detected