MCPcopy Index your code
hub / github.com/kernc/backtesting.py / test_params

Method test_params

backtesting/test/_test.py:672–689  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

670 self.assertLess(os.path.getsize(f), 500000)
671
672 def test_params(self):
673 bt = Backtest(GOOG.iloc[:100], SmaCross)
674 bt.run()
675 with _tempfile() as f:
676 for p in dict(plot_volume=False, # noqa: C408
677 plot_equity=False,
678 plot_return=True,
679 plot_pl=False,
680 plot_drawdown=True,
681 plot_trades=False,
682 superimpose=False,
683 resample='1W',
684 smooth_equity=False,
685 relative_equity=False,
686 reverse_indicators=True,
687 show_legend=False).items():
688 with self.subTest(param=p[0]):
689 bt.plot(**dict([p]), filename=f, open_browser=False)
690
691 def test_hide_legend(self):
692 bt = Backtest(GOOG.iloc[:100], SmaCross)

Callers

nothing calls this directly

Calls 4

runMethod · 0.95
plotMethod · 0.95
BacktestClass · 0.90
_tempfileFunction · 0.85

Tested by

no test coverage detected