1 of 17

Project Maui Using News Sentiment to Predict Stock Price Movements

Ava Lee, Brody Wacker, Devin Nigro, Richard Bertrand

2 of 17

Project Goal

Original Goal

  • Predict intraday movement in stock price between the current point in time and the end of the trading day to determine if a trade will be profitable by end of day.
  • Machine learning model to be implemented that took in average news sentiment between h0 and h-24 (h = hour) as features, and intraday change in price between h0 and 4pm as the target on a rolling single-day basis historically .

Actual Goal

  • Predict change in price between yesterday’s stock price and today’s stock price to determine if there is a positive or negative change in price day over day.

3 of 17

Data

Limitations

  • Lack of affordable availability of historical intraday stock price data
    • Had to change scope of project from intraday predictions to day over day
  • News API only allows for 30 days of historical articles to be pulled in
    • Limited training data likely affects the accuracy of our model

Sources

  • IEX Finance - historical stock price data
  • News API / Reuters - historical news articles

4 of 17

News Sentiment Model

  • Pulled 20 Articles per day from news API
    • Could only pull for past 30 days
    • Request limitations informed Dataframe Structure
  • Cleaned up articles using Lemmatization and stop word removal
    • Marginally affected polarity score
  • Applied Vader Sentiment Analyzer to return Polarity Score

5 of 17

Machine Learning Model

  • Logit model from scikit-learn linear models
    • LSTM and 3-layer sequential models from tensorflow & keras
  • Model selection varies by industry

6 of 17

Is the glass half full?

7 of 17

Actual vs. OLS Predicted Returns for Disney over the Past 5 Days

8 of 17

Next Steps

With more time, we would have done the following:

  • Algorithm to parse keywords from company names to improve relevance of news articles pulled from the News API
  • Need to incorporate handling for when there is no news on a given day
  • Weight news sentiment scores closer in time to have greater significance in the machine learning model, as more recent news articles likely have a greater impact on price change
  • Improve user interface + model customization
    • Explore front-end libraries to improve aesthetics
    • Incorporate additional adjustable parameters for investment recommendation bounds, news sources, number of days to account for in machine learning model, lags in machine learning model, etc.

9 of 17

Questions?

10 of 17

Appendix

11 of 17

What is the predicted return (in %) if prediction is -1 and actual move is -0.005?

12 of 17

What does this mean?

13 of 17

3-layer Neural Network Model

14 of 17

Gradient Boosting

15 of 17

Decision Trees New vs. Old

New

Old

16 of 17

Predictions on

Positive vs. Negative News

17 of 17

Sample Model Outputs