
45 exchanges provide data for a large model: Kronos, which treats price movements as a language to be learned.
Kronos is the first open-source base model specifically trained on financial K-lines. It converts OHLCV data into discrete tokens and then uses a self-recurrent Transformer for pre-training. Today, Kronos achieved the highest ranking with 575 stars, and its paper has been accepted by AAAI 2026.
Related tags
45 Exchanges Use K-Line Data to Train Large Models: Kronos Treats Price Fluctuations as a Language
This article is based on the README of the GitHub project shiyu-coder/Kronos.
Summary: Kronos is the first open-source foundational model specifically trained on financial K-lines. It uses a specialized tokenizer to convert OHLCV data into discrete tokens, and then uses a self-regressive Transformer to "learn the language" of the market. The project has gained 575 stars today, making it the fastest growing project on the daily chart, with a total of 42,857 stars.
Treating K-lines as a language is a common metaphor in the quantitative finance field. Kronos has made this concept a reality: It first uses a tokenizer to discretize continuous K-line data into tokens, and then uses a decoder-only Transformer to perform self-regressive pre-training on these tokens – mirroring the training paradigm for language models, but with "words" replaced by prices and volumes.
The project gained 575 stars on GitHub Trending today, making it the fastest growing project on the daily chart, with a total of 42,857 stars.
How Does It Differ From General Time Series Models?
A statement in the README highlights the key difference: Unlike general time series foundational models (TSFM), Kronos is specifically designed for financial data, which has unique characteristics of "high noise."
This distinction isn't just marketing jargon. General time series models typically perform well on data with strong patterns, such as power loads, traffic flow, and weather. However, financial sequences have extremely high levels of noise, and the signal-to-noise ratio fluctuates significantly depending on market conditions. Kronos addresses this with a two-stage framework:
- Specialized Tokenizer: Discretizes continuous, multi-dimensional K-line data (OHLCV) into layered discrete tokens;
- Self-Regressive Transformer: Pre-trains on these tokens, enabling a single model to perform various quantitative tasks.
The training data comes from over 45 global exchanges. The project's paper has been accepted by AAAI 2026 – this is a strong signal for serious quantitative teams that it's not just a weekend project.
Model Library: From 4.1M to 102.3M, Based on Compute
The README provides a complete model table, all hosted on Hugging Face:
| Model | Tokenizer | Context Length | Parameters | Open Source |
|---|---|---|---|---|
| Kronos-mini | Kronos-Tokenizer-2k | 2048 | 4.1M | Yes |
| Kronos-small | Kronos-Tokenizer-base | 512 | 24.7M | Yes |
| Kronos-base | Kronos-Tokenizer-base | 512 | 102.3M | Yes |
| Kronos-large | Kronos-Tokenizer-base | 512 | 499.2M | No |
Interestingly, the distribution of parameter sizes is noteworthy: The smallest 4.1M model has the longest 2048 context length, while the 24.7M and 102.3M models have 512 context lengths. The README specifically notes that the max_context for both Kronos-small and Kronos-base is 512, and recommends keeping the lookback length of the input data below this value; the KronosPredictor will automatically truncate data exceeding this length. The large 499.2M version does not have an open-source release.
Prediction in a Few Lines
The inference is highly streamlined: To load the tokenizer and model:
from model import Kronos, KronosTokenizer, KronosPredictor
To predict, you need a DataFrame with columns like 'open', 'high', 'low', 'close' (volume and amount are optional), historical timestamps, and future time stamps. Then:
pred_df = predictor.predict(
df=x_df, x_timestamp=x_timestamp, y_timestamp=y_timestamp,
pred_len=120, T=1.0, top_p=0.9, sample_count=1
)
This returns a DataFrame with OHLCV predictions indexed by the future time stamps. The parameters T, top_p, and sample_count allow for probabilistic prediction – sampling multiple paths and averaging them, rather than simply providing a single deterministic curve. This is more meaningful in financial scenarios where uncertainty is high.
To predict multiple assets simultaneously, use predict_batch(), which performs independent normalization and reverse-normalization on each asset. The constraint is that the historical length and prediction length must be consistent for all sequences, and each DataFrame must have those four columns.
The official website also provides a live demo showing BTC/USDT predictions for the next 24 hours.
The Fine-Tuning Pipeline Is Complete, But The Author Has Drawn a Red Line
The README provides an example using A-shares, outlining a four-step fine-tuning pipeline: Configuration (modifying data paths, checkpoints, instrument, and train_time_range in finetune/config.py), preparing and splitting data with Qlib (qlib_data_preprocess.py, producing train/val/test pkl files), two-stage training (first training the tokenizer to adapt to the domain, then training the predictor), and finally using qlib_test.py to load the model, generate signals, and perform a simple top-K strategy backtesting.
A particularly noteworthy aspect is its disclaimer: This pipeline is simply a demonstration of the fine-tuning process, a simplified example that is not a production-ready quantitative trading system. Robust quantitative strategies require more complex techniques such as combination optimization and risk factor neutrality to achieve stable alpha. The README also concludes with three important considerations for moving from demo to production:
- Feed raw signals into a combination optimization model for risk factor neutrality to isolate “pure alpha.”
- Modify the loading logic if you change the data source.
- Start with a top-K strategy as a starting point, and then implement dynamic position management,
More News
Want to see more quality content?
Browse all news