Skip to content

bt.plot results option expectation #1270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ekarudianto opened this issue Apr 25, 2025 · 0 comments
Open

bt.plot results option expectation #1270

ekarudianto opened this issue Apr 25, 2025 · 0 comments

Comments

@ekarudianto
Copy link

Hi, I'm not sure if I should write my current understanding here. So I came accross this library to do backtesting (Love it! keep doing what you're doing!) and I use this code snippet to run the backtesting

    bt = Backtest(
        gold_data,
        SupertrendBacktest,
        cash=ACCOUNT_BALANCE,
        commission=COMMISSION,
        trade_on_close=True,
        finalize_trades=True,
        exclusive_orders=True,
        margin=MARGIN,
    )
    stats = bt.run()
    print(stats)
    bt.plot(
        results=stats,
        filename="backtest-result.html",
        plot_equity=True,
        plot_return=True,
        plot_pl=True,
        plot_trades=True,
        show_legend=True
    )

Now my confusion lies with the bt.plot results option because I thought the stats that you printed will appear on the html report once you're actually put the stats into results option, but once I ran the backtest it doesn't display anything other than the graphs

Image

Can somebody help me understand what is the expectation when we have results prop attached to bt.plot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant