Hello All,
I don't fully understand batch_transform or I'm using it wrongly.
I'm trying to get my EMA calculation to match TA-Lib as a learning exercise. So I want to start with a 22-day window of prices for which I caclulate the simple average. But I can't seem to get the average of days 1 to 22, only days 2 - 23 and rolling.
To me it seems that on day 22 handle_data says we don't have a full 22-day window so there is no result until day 23.
This is a contrived example so please don't tell me better ways to calculate an average. My issue is understanding how to get a value on day t for a window of length t. I want to use the first 22 days of AAPL prices i.e. 2002-01-03 (Day 1) to 2002-02-04 (Day 22) but I only get the first average when I change the end date to 2002-02-05 (Day 23).
Regards,
Peter