Can AI Predict Stock Market Trends by Matching Old Chart Shapes?
Original paper: When Price Charts Rhyme: Historical Visual Retrieval for Stock Return Prediction
"Like a geologist matching rock layers in a cliffside to historical strata from another continent, the algorithm scans decades of past market data to find exact visual shapes that mirror today's price movements. When it spots a historical chart matching the current wiggle, it uses the past outcome of that specific pattern to forecast what the stock will do next."
This breakthrough bridges the gap between old-school technical analysis and cutting-edge machine learning by making financial AI fully transparent. Instead of a mysterious black box spitting out numbers, the algorithm points directly to historical precedents, helping investors understand exactly why a trade is being suggested.
- Computer vision can successfully match current stock charts with historical precedents.
- Tuning the AI on future returns more than doubles the trading strategy's Sharpe ratio.
- The method exposes temporary selling pressure and makes financial AI completely transparent.
📑 Original arXiv Technical Abstract
We study whether visually similar price histories predict similar future returns, using a vision model to retrieve each stock's most similar charts from three decades of U.S. price histories. A representation pretrained only on natural images already retrieves neighbors whose realized returns predict the cross-section of stock returns. Aligning the representation with subsequent returns more than doubles the strategy's Sharpe ratio and outperforms a convolutional neural network trained directly on chart images. The predictability is concentrated among stocks with greater limits to arbitrage. Returns and order imbalances around portfolio formation indicate that the signal identifies temporary selling pressure that partially reverts. A sparse autoencoder traces the return-aligned signal to recurring visual states that determine which historical charts are retrieved. Our approach traces each forecast to dated historical charts, making it more transparent than direct image-to-return models and linking rule-based technical analysis with machine-learning chart reading.
✍️ Are you an author of this paper? Add code/demo links or a note
Help readers explore your work — share your official GitHub repo, Hugging Face weights, affiliation, or a clarification note for our editorial review queue.