polakowo / vectorbt

Find your trading edge, using the fastest engine for backtesting, algorithmic trading, and research.

Home Page:https://vectorbt.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

UserWarning when run .stats()

mrnicemann123 opened this issue · comments

When I try to run the .stats() command, I get the user warning below. It is all connected to ratio calculation.
I want the .stats() to show me all 4 ratios.
Thanks for the help!

C:\Users\dann\anaconda3\lib\site-packages\vectorbt\generic\stats_builder.py:396: UserWarning: Metric 'sharpe_ratio' requires frequency to be set warnings.warn(warning_message) C:\Users\dann\anaconda3\lib\site-packages\vectorbt\generic\stats_builder.py:396: UserWarning: Metric 'calmar_ratio' requires frequency to be set warnings.warn(warning_message) C:\Users\dann\anaconda3\lib\site-packages\vectorbt\generic\stats_builder.py:396: UserWarning: Metric 'omega_ratio' requires frequency to be set warnings.warn(warning_message) C:\Users\dann\anaconda3\lib\site-packages\vectorbt\generic\stats_builder.py:396: UserWarning: Metric 'sortino_ratio' requires frequency to be set warnings.warn(warning_message)

even i had the same warning

Just pass the frequency of your data such as freq="1D" to from_signals.