Kronos
reads the tape.
A foundation model that turns financial candlesticks into tokens, then learns to forecast what a market sequence might do next.
Markets leave a shape.
Kronos learns its grammar.
Market data arrives as candles: open, high, low, close, often with volume. Kronos compresses those numbers into discrete tokens, much like turning a stream into a vocabulary.
A transformer learns what token sequences tend to follow others. At inference time, it samples future candles from the recent history you provide.
- 01What you get
A model that can forecast candle sequences and support related tasks such as volatility estimation and synthetic sequence generation. - 02What you still decide
Whether a forecast is useful, how to handle risk, and whether a strategy survives realistic testing.
Start from learned market patterns.
Less from scratch
Try a pretrained model as a baseline before assembling and training a task-specific forecaster.
More than a price line
The framework also targets volatility forecasting and synthetic K-line generation.
Adaptable starting point
Use the public weights for inference, then explore the repository’s fine-tuning pipeline with your own data.
Useful experiments, before ambitious claims.
- AResearch baseline
Compare a pretrained model against persistence, statistical methods, and task-specific models on a clean time split. - BVolatility study
Test whether forecasted high-low behaviour improves a risk-monitoring or volatility-estimation workflow. - CMarket simulation
Generate synthetic candle sequences for stress tests or pipeline development, then check whether they preserve the properties you care about.
The bars here are drawn to explain the workflow. They are not a Kronos result or a market forecast.
Under the
bonnet.
The interesting choice is to model candles as a language, then generate one token sequence at a time.
Each candle carries several kinds of information.
A K-line, also called a candlestick, summarises trading over a fixed interval. OHLC records the opening, highest, lowest and closing prices.
Kronos uses a specialised tokenizer to map continuous, multi-dimensional candle data into hierarchical discrete tokens. Its model then predicts the next token sequence autoregressively.
- 01Input: ordered bars with known timestamps.
- 02Tokenizer: quantise price movement and trading activity.
- 03Transformer: learn which token patterns tend to come next.
Continuous prices become a sequence the model can learn.
Bars
Time-ordered OHLC data. Volume and amount can add trading activity.
Tokenizer
Quantises continuous values into hierarchical discrete tokens.
Autoregressive model
A decoder-only transformer predicts likely next tokens.
Forecast bars
The predictor maps generated tokens back to price and activity values.
Autoregressive means the model produces a sequence one step at a time, using previous context to generate the next token.
The predictor handles normalisation and inverse normalisation. Timestamp alignment and the meaning of your sampling interval remain your responsibility.
Promising benchmark results. Read the metric closely.
Choose a checkpoint for your constraints.
| Checkpoint | Parameters | Context | Use it to |
|---|---|---|---|
| Kronos-mini | 4.1M | 2,048 | Start with a small model and longer context window. |
| Kronos-small | 24.7M | 512 | Run an accessible baseline; this is the README’s first forecast example. |
| Kronos-base | 102.3M | 512 | Compare a larger released checkpoint. |
| Kronos-large | 499.2M | 512 | Listed in the model table, but weights are not marked open-source. |
Context is measured in bars in the repository’s predictor guide. The README recommends keeping the small/base lookback at or below 512; longer inputs are truncated.
Parameter count alone does not tell you latency, memory use or quality on your data. Measure on the hardware and frequency you plan to use.
A forecast is an input to a decision.
Good questions to ask
- +Does it beat a simple baseline on a forward-looking test?
- +Do forecast errors change across assets, regimes or frequencies?
- +Does the forecast improve a downstream risk or research task?
Claims the model does not settle
- −Whether a strategy earns after costs, slippage and market impact.
- −Whether it generalises to your asset, venue, timeframe or current regime.
- −How to size positions, cap losses or satisfy your compliance obligations.
Test the whole decision path, not just the chart.
- Set a simple baselinePersistence or a standard forecasting method gives you a useful floor.
- Split by timeKeep validation and test periods later than training. Avoid leakage from overlapping windows.
- Match the real cadenceAlign bar frequency, timestamps, market hours and missing-data handling.
- Measure by regimeReport errors and rank metrics across assets and distinct market periods.
- Model trading frictionsIf a signal informs a strategy, include fees, spread, slippage and market impact.
- Paper trade firstMonitor drift and operational failures before any live use.
Build your
first forecast.
Start with a released checkpoint and a clean sequence of bars. Establish a baseline before you fine-tune.
Keep the first run small.
Use Python 3.10 or later, install the repository requirements, then load a tokenizer and a matching model from Hugging Face.
The README pairs the base tokenizer with Kronos-small. Check model-card requirements and hardware before running.
# In a clone of the Kronos repository pip install -r requirements.txt from model import ( Kronos, KronosTokenizer, KronosPredictor, ) tokenizer = KronosTokenizer.from_pretrained( "NeoQuasar/Kronos-Tokenizer-base" ) model = Kronos.from_pretrained( "NeoQuasar/Kronos-small" ) predictor = KronosPredictor( model, tokenizer, max_context=512 )
Make time explicit.
Build a pandas DataFrame with one row per bar, sorted oldest to newest. Include timestamps on a regular cadence and at least these fields:
Use a lookback within the checkpoint’s context limit. Create future timestamps at the same interval as the historical bars.
Check for duplicates, missing intervals, invalid OHLC ordering and timezone errors before inference.
import pandas as pd df = pd.read_csv("bars.csv") df["timestamps"] = pd.to_datetime( df["timestamps"] ) df = df.sort_values("timestamps") lookback = 400 pred_len = 24 x_df = df.loc[:lookback-1, [ "open", "high", "low", "close", "volume", "amount", ]] x_ts = df.loc[:lookback-1, "timestamps"] y_ts = df.loc[lookback:lookback+pred_len-1, "timestamps"]
Check outputs before you trust them.
pred_df = predictor.predict(
df=x_df,
x_timestamp=x_ts,
y_timestamp=y_ts,
pred_len=pred_len,
T=1.0,
top_p=0.9,
sample_count=1,
)
print(pred_df.head())The predictor returns forecasted OHLC values and, where supplied or supported, volume and amount indexed by the future timestamps.
- Plot forecast against held-out truthUse a test segment the model never saw during tuning.
- Compare more than one sampleSampling settings affect generated paths. Record them with each run.
- Try batch inference
predict_batchexpects equal lookback and prediction lengths across series. - Fine-tune only with a reasonUse the repo’s Qlib workflow after a baseline reveals a real gap.
T=1.0, top_p=0.9 and sample_count=1. Treat these as example settings, then validate on your task.Adapt the data and measure the result.
Paths + ranges
Set data, checkpoint, date range, epochs and batch size in the config.
Qlib dataset
Run preprocessing to create time-split train, validation and test files.
Tokenizer, then model
Run the tokenizer stage, followed by predictor fine-tuning with torchrun.
Backtest carefully
Run the supplied test script, then add realistic costs and risk controls.
Replace the example GPU count with your setup. The repository describes this workflow as a demonstration and cautions that its top-K backtest omits the depth expected of a production strategy.
Promising model.
Earned evidence still required.
Kronos offers a practical way to test pretrained forecasting on financial bars. Its value depends on whether it holds up on your data, in your evaluation, after realistic costs.
Start here
- 1Run Kronos-small on a clean dataset.
- 2Compare with a simple baseline using a forward time split.
- 3Keep, adapt or discard it based on measured results.
Sources
Code, model catalogue, forecast API, fine-tuning guide and stated caveats.
Method, training corpus and reported benchmark results.
Checkpoint details and current usage notes.