Can AI Read Stock Charts? An Experiment with DistilBERT
β’ 1 min read
Mikhail Shardin conducted an experiment: can a language model predict prices if charts are described in text?
The Idea
Instead of raw quotes, the model received natural language descriptions: price rising strongly, volume increasing, near resistance.
The DistilBERT model was trained to predict next-day price increases.
Results
Tested on 200+ Moscow Exchange stocks:
- Average AUC: 0.53 (slightly better than random)
- Best performers: AFLT (0.72), RTSB (0.70), PIKK (0.70)
- Worst performers: PLZL (0.33), VJGZP (0.33)
For trading purposes the result is weak, but the model picked up patterns without direct access to numbers β that alone is interesting.
Technology
Python + PyTorch + Hugging Face + Docker. Walk-forward validation, vectorized processing via pandas. The entire process is reproducible.
Code on GitHub: github.com/empenoso/llm-stock-market-predictor
| Source: Habr | Author: Mikhail Shardin |
Share this article:
Related Posts
Discussion
Join the discussion in our Telegram chat!