Deep Learning / Machine Learning Prediction for Individual Stocks and Financial Assets

A Robust A.I. Investment Performance Architecture

AI and Financial Assets are changing the game. Learn how AI integration can optimize asset management, boost decision-making, and improve financial outcomes

The logic follows from straightforward investment thinking. Building on the Nobel prize-winning work of William Sharpe and the
Capital Asset Pricing Model (CAPM): each stock prediction follows a basic regression equation:

ERi = Rf + βi ( ERm Rf )

Where:
ERi = Expected Return of Investment
ERm = Expected Stock Market Return
Rf = Risk-free rate of return (yes, Risk-free is a fallacy, but it's not material so bear with me)
βi = Beta of the investment

Assuming that the risk-free assets offer no effective real return (after inflation) we can simplify the equation to:

ERi = ERm βi + α

This is called a single-factor model. We use a 2-factor model with both the stock market and the sector's return. These factors strongly explain asset performance, so predicting them well can yield a tremendous advantage. Accordingly, our process takes the form:

ERi = ERm βi ERs BSIS + α

In this model, each stock has its own predicted machine learning model Alpha. Then it shares the predictions
for the sectors and market using its own unique observed Betas.

That asset’s alpha is computed primarily from information on the company’s financial reports. We use about 70 data points from the financial statements and then expand those 70 data elements across ratios and multiple time scales to create about 500 data features for every stock. The deep learning machine learning algorithms find the most predictive combinations of these features and discards the data features with no explanatory power.

In addition to a  market forecast, we are predicting the return from both the stocks’ sector beta, and the stocks’ market beta as the two combined offer much more explanatory power than a single factor model. These market and sector A.I Predictions are powered by a cadre of economic data and performance data of key indices.

Machine Learning Stocks Prediction Results and Analysis with AI and Financial Assets

The chart below provides the results of the meta model’s annual return predictions for 1926 U.S. stock exchange-listed stocks having sufficient history and data to qualify for the model. 1926 represents the subset of the Russell 3000 Stock Market Index that we had sufficient financial statement history at the time of the research in Spring 2022.   Please reach out for the latest tests results.

The tests cover the 1926 stocks from 2014 through 2021 with each stock’s predicted return correlated against the actual return produced for the same prediction period. Each asset is correlated against its quarterly predictions and gives one observation to the histogram below. A correlation of zero would suggest that predictions were random and a correlation of 1 suggests perfect clairvoyance.

Considerable and assiduous efforts are taken to ensure bias mitigation. This includes walking forward out of sample validation, separation of models into training testing and validation, a careful review of feature data, sensible governance of feature data and selection, and perhaps especially, selection of bias-minimizing objective functions.

Free Investment Tracking Software
Free Stock Performance Analysis
Free Stock Performance Analysis
Free Portfolio Evaluation Tool
Free Stock Performance Analysis
Free Stock Performance Analysis

For further interpretation, you can conclude that any value with a negative correlation is a bad prediction. While a full 10% of our predictions could classify as a bad prediction we can also see that only 1.5% would count as a really bad prediction, correlating less than -.25. It follows then that our directional accuracy is 90%.

The hard part of conducting such a test is not in producing an attractive result, but in ensuring that any returns produced can be trusted.

The elimination of biases is not easy. This is the downfall of most machine learning projects.

Here, follows a year-by-year examination of the results of the tests, followed by an aggregate.

What I love about this manner of performance evaluation is that it is easy to understand in investment terms the success of the results. Do the actual returns grow steadily? To make these graphs we classify all of our predictions into 8 octiles (labeled as deciles). The rightmost octile (bar) consists of ⅛ of the 1926 stocks with the highest predicted return for that period and the leftmost octile with the lowest predicted return. If then, the actual returns that are graphed conform to the shape then we know we are adding predictive value.

As you can see, the results are not perfect (never trust perfect AI-based stock predictions!) but are good enough to obtain a realistic and persistent performance advantage.

We tested a few variations around the Time Horizon. In these charts, Time Horizon 4 means 4 quarters or a 1-year prediction. Our results were comparable across multiple time horizons, which we have configured as an input variable for generating the predictions. Window size refers to the amount of history data we use. Window size = 0 means we use all the data available preceding the date of the prediction. We observed that the more data we used, the better the results; this is common in machine-learning applications.

Year-Over-year (YOY) Decile performance

you can scroll the years to see each year's predicted vs actual performance

Aggregate performance 2016-2021

For this period, the S&P 500 produced an annual return of 14.75% and the S&P 1500 produced an annual return of 14.50%.

Portfolios selected from our top decile over the same period would average a return of 28%.

Accordingly, one could judge the performance of the model by buying the top decile and shorting the bottom decile. This long/short, market-neutral portfolio strategy would yield a nearly 8 % return.

Free Stock Performance Analysis
Free Stock Portfolio Analyzer

Results of Market and Sector Models

Free Portfolio Assessment Tool
Free Stock Performance Analysis

Scroll the charts below to explore the performance of the sector models.  for the sectors, we used a regression of the best-fit sector irrespective of SIC or S&P classification.

Free Stock Performance Analysis
Free Investment Tracking Software
Get in Touch - Portfolio ThinkTank Thumbnail

The Future

Free Investment Analysis Software

The future of A.I stock prediction is bright.  It is also moving fast. Stock market predictions and LLM’s have a lot in common.  So much of the developments around LLM’s can be recycled for stock prediction.   More data.  More features,  more models, more results, more feedback, more learning.   This is a machine-learning flywheel.  As we continue to build out the model, we expect results to improve.   We also expect more competition.   We also expect that a considerable double barrier to adoption will create excess returns for the earlier adopters.  barrier # 1;  Baby boomers have thrived on simple, passive index investing.   I suspect that some will never consider changing, even in the face clear evidence supporting a better approach.  #2   The clear evidence itself.  The evidence is slow to accumulate and even slower to disseminate.  This gives a classic information asymmetry.  You have plenty of time to get on the right side of this.   Portfolio ThinkTank  is working to shift the line of symmetry from the likes of DE Shaw,  Two Sigma and Rentech to investors and advisors everywhere.  The ones smart enough to look for the evidence and brave enough to act.   

However,  eventually the world will change and investors will not be content to merely own the stock market in a low cost index fund.   Investors will want portfolios, not just custom tailored,  but customized, parameterized, personalized and optimized from a Nth degree of granularity depending on how interested, educated and  sophisticated an investor they are.

We believe that the combination of stock-specific ML model formation set within the CAPM prediction architecture provides a real opportunity for the predictions to help in delivering better performance for investors across assets, economic conditions, and time.

You can use our predictions now in our latest portfolio optimization software.  You can also take our prediction model and make it your own with customizations.    See https://advisors.portfoliothinktank.com/product/custom-pre-trained-deep-learning-predictions/ to learn more about how we can customize an A.I model to invest like you want.

James Damschroder - Headshot

AUTHOR

James Damschroder

Free Stock Performance Analysis
Free Portfolio Insight Tool

ACKNOWLEDGEMENTS

Special thanks to Chenyue Zhang, Bingshen Lu and Marissa Rubb for their  project contributions and talents.  Also, thanks to Professor Thomas Diciccio, Academic Advisor and the MPS faculty led by Xiaolong Yang, Ph.D., Sr. Lecturer, Sr. Associate Director, MPS Program.   Special thanks to all of the data science students having made contributions over the years.

Free Investment Tracking Software