MCPcopy Create free account
hub / github.com/kernc/backtesting.py / test_resolutions

Method test_resolutions

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

Source from the content-addressed store, hash-verified

697 time.sleep(5)
698
699 def test_resolutions(self):
700 with _tempfile() as f:
701 for rule in 'ms s min h D W ME'.split():
702 with self.subTest(rule=rule):
703 df = EURUSD.iloc[:2].resample(rule).agg(OHLCV_AGG).dropna().iloc[:1100]
704 bt = Backtest(df, SmaCross)
705 bt.run()
706 bt.plot(filename=f, open_browser=False)
707
708 def test_range_axis(self):
709 df = GOOG.iloc[:100].reset_index(drop=True)

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