Stock Picking with Machine Learning

Novel Machine Learning Stock Sorting by Outperformance Probability

Sponsored by

Hi! Here's Iván with this week's exciting newsletter, brimming with insights and discoveries on building robust investment strategies and risk models using Machine Learning.

In this edition, I am presenting the following sections:

  • 🕹️ AI-Finance Insights: I summarize three must-read academic papers that mix cutting-edge ML/DL with Quant Finance:

    • Stock Picking with Machine Learning

    • Portfolios Through Deep Reinforcement Learning and Interpretable AI

    • FinLlama: Financial Sentiment Classification for Algorithmic Trading Applications

  • 💊 AI Essentials: The section on top AI & Quant Finance learning resources: Today, I'm sharing a 10-hour video course, recently updated in 2024, that offers an incredible journey from beginner to expert in Machine Learning. This course, perfect for anyone seeking a comprehensive and hands-on introduction to the field, is an essential resource for learning Machine Learning from various perspectives.

  • 🥐 Sentiment Insights: In this edition, I recommend a paper that presents an interesting approach to forecasting financial market trends. It explores how analyzing tweets from influential leaders, combined with historical data, can enhance tactical asset allocation strategies.

Today’s Sponsor

Discover an AI Networking Solution That Guarantees Results

The speed of innovation with AI exceeds prior rates of change by 3x or more. IT leaders today need enterprise networks that bridge the gap between goals and resources needed.

Nile redefines enterprise networks, with AI-powered automation for campus and branch IT infrastructures–all backed by performance guarantees. Join the broadcast April 16th for new insights and demos from analysts, IT experts, & Nile leaders to get a first look at how Nile is revolutionizing enterprise networking.

AI-Finance Insights

“Stock Picking with Machine Learning”

Instead of sorting stocks by factor characteristics, the paper proposes a novel approach. The authors sort stocks by computing the probability of outperforming the cross-sectional median return in the next week using machine learning algorithms, with fundamentals, equity factors, and technical indicators as inputs.

Here are my simplified takeaways from the paper: 👇

➡ The study looks into how machine learning can help pick the best stocks from the S&P 500, using data from 1999 to 2021. It uses this approach to sift through tons of data for stock selection insights.

➡ It evaluates various machine learning techniques, from the more complex like neural networks to the simpler logistic regression, to see which can better predict stock market winners. The simpler models often perform surprisingly well against their more complicated counterparts.

➡ The research emphasizes weekly stock performance predictions, offering timely insights suitable for the fast-paced nature of today's stock market, rather than long-term forecasts.

➡ One of the key findings is that machine learning models significantly surpass traditional stock picking methods, indicating a powerful role for technology in enhancing stock selection strategies by pinpointing stocks with the best potential to outperform.

➡ The study also compares the risk-adjusted performance across different machine learning models, revealing that an ensemble approach delivers the highest Sharpe ratios of 0.84 (for a portfolio size of 50), 0.79 (for 100), and 0.73 (for 200). These figures notably outdo the performance of a simple equally weighted benchmark portfolio with a Sharpe ratio of 0.57 and even the S&P 500 index's 0.40, showcasing the superior performance of this method.

➡ Overall, this paper underscores a significant advancement in using machine learning for financial market predictions. By leveraging large datasets and sophisticated algorithms, it opens the door to more strategic, data-driven investment decisions that can lead to better returns.

“Portfolios Through Deep Reinforcement Learning and Interpretable AI” 

The main paper innovation lies in using DRL to directly optimize the portfolio objective function without the need to estimate the vector of expected returns and risk in a previous step. The out-of-sample results are promising, and the idea is worth reading.

Here are my simplified takeaways from the paper: 👇

➡ The paper introduces a new approach to portfolio management using deep reinforcement learning, moving beyond traditional methods by employing attention-based neural networks designed for the complex data in finance.

➡ It presents an AlphaPortfolio model that achieves excellent out-of-sample performance, including high Sharpe ratios and risk-adjusted alpha, across various market conditions and while accounting for transaction costs and economic constraints.

➡ This approach directly optimizes portfolio objectives from the data, avoiding the preliminary step of estimating returns or risks, thus demonstrating robustness and adaptability to market dynamics and investment challenges.

➡ The study shows the advantages of reinforcement learning over the conventional supervised learning models for portfolio management, offering a method that supports diverse objectives and accommodates market interactions.

➡ Through polynomial-feature-sensitivity analysis, the paper identifies crucial drivers of investment performance, highlighting the model's ability to adjust to market changes and the non-linear nature of financial data.

➡ The out-of-sample (OOS) Sharpe ratio can reach up to 0.8 with market-cap-adjusted weights and nearly 2 with equal weights, indicating that even under traditional portfolio construction, the Transformer Encoder (TE) model excels by effectively capturing nonlinearity and path dependence.

➡ However, these achievements are greatly surpassed by the RL-based AlphaPortfolio model, which illustrates the one-step RL approach's superiority. For example, compared to AP's Sharpe ratio of 2, a value-weighted portfolio in the full sample has an OOS Sharpe ratio of only 0.36, demonstrating that using winner scores as estimators with either equal or value weights would significantly underperform AP.

“FinLlama: Financial Sentiment Classification for Algorithmic Trading Applications”

A nice application of "Llama 2" for sentiment analysis in trading strategy development. LLMs are set to become an essential tool for any quant trading strategy in the near future.

Main takeaways in less than 2 min 👇

▶ The paper introduces FinLlama, a cutting-edge approach blending large language models with finance-specific sentiment analysis for algorithmic trading.

▶ By fine-tuning the Llama 2 7B model on financial news, FinLlama offers nuanced insights into market sentiment, quantifying both the direction and intensity of financial news sentiments. It uses a generator-classifier scheme for precise sentiment analysis and employs parameter-efficient tuning to minimize computational demands.

▶The simulation results highlight FinLlama's potential in aiding portfolio management and enhancing market returns, showcasing its ability to build high-return portfolios that stand strong in volatile markets.

▶ In a nutshell, FinLlama adapts advanced AI for finance, making sentiment analysis more accurate and resource-efficient, ultimately offering traders and portfolio managers a powerful tool for informed decision-making based on the sentiment of financial news.

AI-Essentials

Discover an incredible 10-hour video course designed to take you from a beginner to an “expert” in Machine Learning. What's even better is that it's a recent course, updated in 2024. Enjoy! 👇

Sentiment Insights

“Forecasting Financial Markets from influential leaders Tweets”

This study introduces a new interesting approach to forecasting financial market trends by analyzing tweets from influential leaders combined with historical data.

Unlike conventional models focused solely on historical financial data, this research incorporates Natural Language Processing (NLP) to assess the impact of social media on the financial markets.

Key features of this work include a versatile algorithm capable of handling any Twitter account and financial component, the ability to predict how long a tweet affects stock prices, and the analysis of multiple Twitter accounts to forecast market trends.

The paper shows substantial improvements in prediction accuracy by blending sentiments from social media with traditional financial analysis, focusing on both Indian and USA markets and discussing the socio-economic implications of these findings.

Here are my simplified takeaways from the paper: 👇

➡ Integrating a unique deep learning-based model, the study analyzes the influence of social media on financial markets, offering a novel combination of NLP and traditional data analysis. This method demonstrates significant enhancements in predicting market movements, leveraging the power of social media sentiment analysis.

➡ The research introduces a state-of-the-art sentiment analysis technique that not only evaluates immediate impacts but also the lasting influence of tweets on market prices, marking a significant departure from existing financial market prediction models.

➡ Through a multi-step learning process, the model analyzes Twitter sentiments and maps them with financial market components, leading to more accurate forecasts that consider both social media dynamics and traditional market factors.

➡ The study highlights the creation of a versatile and generalized model, emphasizing its adaptability to various Twitter handles and stocks without needing significant alterations, facilitating a broader application across different financial markets.

➡ Overall, this research marks a significant advancement in quantitative finance by employing machine learning and extensive news data analysis to enhance financial forecasting. It establishes a new standard for incorporating NLP into more informed, data-driven trading strategies.

Ready to elevate your investing journey to new heights?

Unlock the power of informed decision-making with our daily newsletter, tailored to empower investors like you. The Early Bird delivers crucial insights that keep you ahead in the stock market, ensuring you make profitable decisions. Sign up today.

If you're enjoying our newsletter and want to support us, please recommend it to anyone you know who's interested in AI and Finance. Your referrals are the biggest compliment and help us grow! 🌟🤖💼