Course Name: Financial Time Series Analysis, Section No: 15, Unit No: 6, Unit ty: Notebk
https://i.imgur.com/FNUaPi9.png
Hi I see in this notebook we're using current prediction (which actually predicts tomorrow price) and comparing with tomorrow closing. If current prediction is bigger than tomorrow price we buy, otherwise we sell.
This logic represent problems: 1) we go long even when the current prediction is lower the next predict & 2) look ahead bias.
I've found for AR model (same course, section 14, Unit 3 (notebook)) we used the following logic to generate trading signals
We compared today prediction with yesterday prediction. If today prediction is bigger than yesterday prediction then we buy, otherwise we sell.
Is this not more appropiate approach as we don't need to look for tomorrow values (something we don't have) and avoid buy even when current prediction (which predicts tomorrow price) is bearish?
Hey Daniel,
In time series data, shift(1) refers to shifting the data one period back. In that sense, the strategy logic is actually:
If current day's prediction is greater than yesterday's price we buy, otherwise we sell.
Hope this helps!
Thanks
Rushda
Hey Daniel,
You're right, thankyou for pointing this out. This has been fixed
Thanks
Rushda
Thanks for your excellent support.