1 of 18

Predicting Asset Prices via Machine Learning

Jake D’Amico, Rahul Bhandaru, Seth Rosen, Jyotirmay Chauhan

2 of 18

Research Question and Motivation

  • Can machine learning methods predict future stock prices or returns?

​

  • Most algorithmic trading systems have proprietary data requiring individuals to pay a high fee for access

​

  • We attempt to use publicly available data to predict stock prices

3 of 18

Data Source

​

  • Data on stocks comes from Center for Research in Security Pricing (CRSP)
    • Data ranges from 1965 to 2020 (not all assets have prices from 1965)

​

  • Access to CRSP has a fee but is a collection of publicly available data compiled for research purposes

4 of 18

Methods

  • We created models of 3 types
    • LSTM
    • SVR
    • Random Forest Regressor

​

  • Mostly trial-and-error tuning of hyperparameters and architecture

​

  • Data had 15 features (including Market Price) and 249,180 data points

​

  • LSTM needed 3d features, so we separated by individual stock while keeping in chronological order
    • Ended with 1,200 arrays of varying sizes, so we padded them with 0s to match largest, then created one 3d numpy array of (1198, 1247, 12)

5 of 18

SVM

  • Too many data points for it to train in a reasonable amount of time

​

  • We tried increasing cache size and using less intensive kernels, but even after running overnight it still hadn’t finished

6 of 18

Random Forest

  • Didn’t have high hopes for its accuracy
    • Mainly wanted to get feature importances as a baseline

​

  • Ended up getting decent results in terms of r2 and mean squared error
    • r2: 0.993…
    • mse: 28.374…

7 of 18

Feature importances from RFR

8 of 18

LSTM

  • This was the LSTM tested which resulted in the highest accuracies
  • Validation split of 0.15
  • Results improved most with the addition of the dropout layers and decreasing of the batch size
  • Validation accuracy consistently higher than training accuracy (likely a result of the dropout)

9 of 18

0.8137

0.9323

10 of 18

Dropping Ask and Bid Price Features

11 of 18

Why we did this:

​

​

  • The price recorded at the end of each month was close to an average between high and low prices for that day

12 of 18

Model Performance

  • Interestingly, while the random forest’s results ended up much worse, the LSTM’s was comparable to before
    • Random Forest
      • r2: 0.962…
      • mse: 155.48…
    • LSTM
      • Training accuracy: 0.8140
      • Validation accuracy: 0.9321

13 of 18

Random Forest

  • This was the new feature importance from the random forest, but it should be treated with a grain of salt since the mse was so far off

14 of 18

LSTM

  • Using the same architecture that gave us the best results with the extra data points
  • Results requiring further inspection

0.8140

0.9121

15 of 18

Implications

  • By using publicly available data we lower the barrier to entry when it comes to algorithmic trading
  • Provides further evidence that future asset prices can be predicted with a relatively high accuracy

16 of 18

Challenges

  • Feature selection

​

  • Rolling monthly prediction

​

  • Model Pipeline issue
    • SVMs - time consuming
    • LSTM - fixing the dataset

17 of 18

Future Directions and Extensions

​

  • Predicting at further distances away from the present

​

  • Inclusion of other firm specific factors that might influence prices or returns

​

  • Inclusion of factors unrelated to firms that affect the entire market

​

  • App that uses algorithmic trading to create optimal investments based on predictions

18 of 18

Questions?