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
When trying to run a simple 200 MA strategy, I want make a purchase at the onset of the data. However, the next function iterates only from the onset of the data+200 days.
Is there a way to do this?
Thank you
The text was updated successfully, but these errors were encountered:
When implementing a strategy with 200 MA, you need to account for the initial calculation period. For example with a 200-day MA, you need the data of the previous 200 days before you can generate a valid MA value. During the calculation period, the MA will be NaN - so no signal. This means the strategy will only work from 200 days onwards.
Quick fixes in your case would be to either:
Collect more historical data to your desired start-date.
Pick a later start date where you already have the previous 200 data points.
When trying to run a simple 200 MA strategy, I want make a purchase at the onset of the data. However, the next function iterates only from the onset of the data+200 days.
Is there a way to do this?
Thank you
The text was updated successfully, but these errors were encountered: