back

I trained an AI Model to Detect Trading Candlesticks (from scratch using ViTs)

AI now predicts market patterns automatically

In the fast-evolving landscape of algorithmic trading, computer vision models are making significant inroads. A fascinating new development demonstrates how vision transformer (ViT) architectures—originally designed for image recognition—can be repurposed to identify candlestick patterns in financial charts with remarkable accuracy. This innovation could transform how traders analyze markets and make decisions.

Key Points

  • Using vision transformer (ViT) neural networks originally designed for image recognition, researchers can now identify 16 distinct candlestick patterns with over 97% accuracy
  • The model leverages a relatively small dataset of just 2,560 labeled images, proving that effective pattern recognition systems can be built without enormous training sets
  • Unlike traditional rules-based approaches that use predefined mathematical criteria, this AI approach "sees" patterns holistically, potentially capturing nuances human traders recognize but struggle to formalize

Reimagining Technical Analysis Through Machine Vision

The most compelling aspect of this research is how it bridges the gap between human visual intuition and algorithmic trading. Traditional technical analysis relies on traders visually identifying patterns like "hammer," "engulfing," or "morning star" formations. While rules-based systems attempt to codify these patterns with mathematical definitions, they often miss the contextual understanding that experienced traders develop.

This matters because technical analysis has always occupied an uncomfortable middle ground between art and science. Professional traders insist certain visual patterns predict market movements, while skeptics point to the lack of consistent mathematical validation. By teaching AI to recognize these patterns the way humans do—visually, rather than through rigid formulas—we might finally quantify whether these patterns truly have predictive power.

Beyond The Video: Real-World Applications and Limitations

What the video doesn't address is how this technology might be deployed in actual trading environments. Pattern recognition alone doesn't constitute a complete trading strategy. A hammer pattern might signal a potential reversal, but without consideration of volume, broader market context, or fundamental factors, acting on pattern recognition alone remains risky.

Several quantitative hedge funds are already combining computer vision with reinforcement learning to develop more sophisticated trading algorithms. Renaissance Technologies, for instance, reportedly uses machine learning models that incorporate visual pattern recognition alongside hundreds of other signals. Their Medallion Fund's legendary performance (averaging roughly 66% annual returns before fees over decades)

Recent Videos

May 6, 2026

Hermes Agent Master Class

https://www.youtube.com/watch?v=R3YOGfTBcQg Welcome to the Hermes Agent Master Class — an 11-episode series taking you from zero to fully leveraging every feature of Nous Research's open-source agent. In this first episode, we install Hermes from scratch on a brand new machine with no prior skills or memory, walk through full configuration with OpenRouter, tour the most important CLI and slash commands, and run our first real task: a competitor research report on a custom children's book AI business idea. Every future episode will build on this fresh install so you can see the compounding value of the agent in real time....

Apr 29, 2026

Andrej Karpathy – Outsource your thinking, but you can’t outsource your understanding

https://www.youtube.com/watch?v=96jN2OCOfLs Here's what Andrej Karpathy just figured out that everyone else is still dancing around: we're not in an era of "better models." We're in a different era of computing altogether. And the difference between understanding that and not understanding it is the difference between being a vibe coder and being an agentic engineer. Last October, Karpathy had a realization. AI didn't stop being ChatGPT-adjacent. It fundamentally shifted. Agentic coherent workflows started to actually work. And he's spent the last three months living in side projects, VB coding, exploring what's actually possible. What he found is a framework that explains...

Mar 30, 2026

Andrej Karpathy on the Decade of Agents, the Limits of RL, and Why Education Is His Next Mission

A summary of key takeaways from Andrej Karpathy's conversation with Dwarkesh Patel In a wide-ranging conversation with Dwarkesh Patel, Andrej Karpathy — former head of AI at Tesla, founding member of OpenAI, and creator of some of the most popular AI educational content on the internet — shared his views on where AI is headed, what's still broken, and why he's now pouring his energy into education. Here are the key takeaways. "It's the Decade of Agents, Not the Year of Agents" Karpathy's now-famous quote is a direct pushback on industry hype. Early agents like Claude Code and Codex are...