(self)
| 894 | self.assertIsInstance(res3, pd.DataFrame) |
| 895 | |
| 896 | def test_plot_heatmaps(self): |
| 897 | bt = Backtest(GOOG, SmaCross) |
| 898 | stats, heatmap = bt.optimize(fast=range(2, 7, 2), |
| 899 | slow=range(7, 15, 2), |
| 900 | return_heatmap=True) |
| 901 | with _tempfile() as f: |
| 902 | for agg in ('mean', |
| 903 | lambda x: np.percentile(x, 75)): |
| 904 | plot_heatmaps(heatmap, agg, filename=f, open_browser=False) |
| 905 | |
| 906 | # Preview |
| 907 | plot_heatmaps(heatmap, filename=f) |
| 908 | time.sleep(5) |
| 909 | |
| 910 | def test_random_ohlc_data(self): |
| 911 | generator = random_ohlc_data(GOOG, frac=1) |
nothing calls this directly
no test coverage detected