Blank rows in rawdata.get_daily_prices after resample #962
Unanswered
GolovinAlexx
asked this question in
Q&A
Replies: 2 comments 7 replies
-
Sorry I don't follow, can you paste an example in? |
Beta Was this translation helpful? Give feedback.
0 replies
-
For example, 2022-09-05 for prices, and 2022-09-05, 2022-09-06 for returns. |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all!
I'm learning the backtesting part of pysystemtrade. I am working with my own historical daily data.
As I understand, at Raw data stage we have "adjusted daily priced", calculated from "raw adjusted prices" using the resample("1B") function.
Business day != market day, because market may be closed on Monday for example. After resampling pandas will insert an empty row on Monday in the daily data. Now the return between Tuesday and Friday is return between Tuesday and Monday and is NaN. Return between Monday and Friday is NaN too.
Is this is correct way of code? And is it logical to damage a simple raw data by inserting blank rows at business, but not market days?
Beta Was this translation helpful? Give feedback.
All reactions