Skip to content

Commit 70280a2

Browse files
committed
Test params for fractional backtest plot.
1 parent 1b49e0a commit 70280a2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

backtesting/test/_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,8 @@ def test_file_size(self):
647647
def test_params(self):
648648
bt = Backtest(GOOG.iloc[:100], SmaCross)
649649
bt.run()
650+
fbt = FractionalBacktest(GOOG.iloc[:100], SmaCross, fractional_unit=1/1e6)
651+
fbt.run()
650652
with _tempfile() as f:
651653
for p in dict(plot_volume=False, # noqa: C408
652654
plot_equity=False,
@@ -662,6 +664,7 @@ def test_params(self):
662664
show_legend=False).items():
663665
with self.subTest(param=p[0]):
664666
bt.plot(**dict([p]), filename=f, open_browser=False)
667+
fbt.plot(**dict([p]), filename=f, open_browser=False)
665668

666669
def test_hide_legend(self):
667670
bt = Backtest(GOOG.iloc[:100], SmaCross)

0 commit comments

Comments
 (0)