Predicting Stock Market Prices Guided Project

Hi DQ Community,

I was able to get mae down to 11.8 by using only 3 features. Adding any other features I created, only increase mae . My next improvement would be to add some Leading Economic Indicators as features and try to fine tune my model. I would love to hear your feedback.


1 Like

Hi, thanks for sharing your project! :slightly_smiling_face: I think I’ve found the mistake in your code when you were calculating features.

For example, when you are calculating average price from the past 5 days, you don’t need to include data from the current day, otherwise, the features would have a strong correlation with the target column (or in other words: features would have an insight about the target column).

So, when you calculate the average price from the past 5 days for date=β€˜1950-01-10’, you need to use β€˜close price’ from dates[β€˜1950-01-03’, β€˜1950-01-04’, β€˜1950-01-05’, β€˜1950-01-06’, β€˜1950-01-09’]. But In your project, you can see that the first day when your code calculated the β€˜Avg Price 5 Day’ is β€˜1950-01-09’ instead β€˜1950-01-10’.

Hope that helps!

1 Like