Replies: 1 comment 2 replies
-
You need to provide a proper frequency, in your case pass |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I use SQLAlchemy as data source on vbt pro package, rename columns set the index and use prepare_tzaware_index to format the index. Ended up with this dataframe:
Close
Start
2022-01-01 00:00:00+00:00 34.215
2022-01-01 00:15:00+00:00 34.139
2022-01-01 00:30:00+00:00 34.258
2022-01-01 00:45:00+00:00 34.051
2022-01-01 01:00:00+00:00 34.170
... ...
2023-03-29 10:00:00+00:00 20.803
2023-03-29 10:15:00+00:00 20.811
2023-03-29 10:30:00+00:00 20.783
...
2023-03-29 10:45:00+00:00 20.905
2023-03-29 11:00:00+00:00 21.034
[43433 rows x 1 columns]
but when I run any strategy time statistics seems to be off, probably because it goes to nanoseconds?:
Start 2022-01-01 00:00:00+00:00
End 2023-03-29 11:00:00+00:00
Period 0 days 00:00:00.000651495
Start Value 1000.0
Min Value 942.755537
Max Value 8254.925568
End Value 8098.072937
Total Return [%] 709.807294
Benchmark Return [%] -38.524039
Total Time Exposure [%] 34.556673
Max Gross Exposure [%] 100.0
Max Drawdown [%] 20.608154
Max Drawdown Duration 0 days 00:00:00.000162195
Total Orders 5198
Total Fees Paid 4617.754282
Total Trades 2599
Win Rate [%] 35.782993
Best Trade [%] 14.278529
Worst Trade [%] -0.67976
Avg Winning Trade [%] 1.148082
Avg Losing Trade [%] -0.439589
Avg Winning Trade Duration 0 days 00:00:00.000000131
Avg Losing Trade Duration 0 days 00:00:00.000000061
Profit Factor 1.432124
...
Calmar Ratio 21.375007
Omega Ratio 1.177482
Sortino Ratio 2562384.305518
what I'm missing< what I should do on input data in order to get the time based statistics working? Could you please give me some guidance / example what I should do to process the input ohlcv data from DB to vbt pro?
Beta Was this translation helpful? Give feedback.
All reactions