You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the backtesting.py to carry out a simple backtest strategy about the simple moving average crossing. But Sharpe, Sortino and Calmar Ratio all show 0. What's wrong with my code or data? Kindly ask for your help. The 3 ratios show proper values when I used the test GOOG dataset from the library, which is in daily interval. My data is in 5minute interval.
Not sure if the issue is related to the timestamp column of my dataset which is a csv. On the other hand, I tried to use a dataset from yfinance python library for AAPL which loads the data and datetimeindex automatically and the analysis runs properly with the all the 3 ratios shown. However, in my original dataset, I have to use below to set the timestamp column and index.
I am also uncertain if it is just because a negative sharpe ratio is not allowed. However, I do have a friend who runs another analysis which shows a negative sharpe ratio.
Expected Behavior
I am using the backtesting.py to carry out a simple backtest strategy about the simple moving average crossing. But Sharpe, Sortino and Calmar Ratio all show 0. What's wrong with my code or data? Kindly ask for your help. The 3 ratios show proper values when I used the test GOOG dataset from the library, which is in daily interval. My data is in 5minute interval.
Not sure if the issue is related to the timestamp column of my dataset which is a csv. On the other hand, I tried to use a dataset from yfinance python library for AAPL which loads the data and datetimeindex automatically and the analysis runs properly with the all the 3 ratios shown. However, in my original dataset, I have to use below to set the timestamp column and index.
A subset of the csv data from binance is here: https://drive.google.com/file/d/1y3cfelTStSOjjPxhM7ZnXwnoV7fYvRbC/view?usp=drive_link
Steps to Reproduce
btc['timestamp'] = pd.to_datetime(btc['timestamp'], format="%d/%m/%Y %H:%M")
btc.set_index('timestamp', inplace=True)
Additional info
The text was updated successfully, but these errors were encountered: