Feature engineering

When it comes to a machine learning algorithm, the first question to ask is usually what features are available, or what the predictive variables are. The driving factors used to predict future prices of DJIA, the Close prices herein, obviously include historical and current Open prices and historical performance (High, Low, and Volume). Note that current or same-day performance (High, Low, and Volume) should not be included as we simply cannot foresee the highest and lowest prices at which the stock traded or the total number of shares traded before the market is closed on that day.

Predicting close price with only these four indicators does not seem promising, and might lead to underfitting. So we need to think of ways ...

Get Python Machine Learning By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.