A field guide to market sequences

Kronos
reads the tape.

A foundation model that turns financial candlesticks into tokens, then learns to forecast what a market sequence might do next.

Plain English to implementationRepo + paper
OBSERVED K-LINESSAMPLED FUTURE PATH
The short version

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.
In one sentence: Kronos is a pretrained sequence model for OHLCV-style financial bars, not a complete trading system.
Why use it?

Start from learned market patterns.

01

Less from scratch

Try a pretrained model as a baseline before assembling and training a task-specific forecaster.

02

More than a price line

The framework also targets volatility forecasting and synthetic K-line generation.

03

Adaptable starting point

Use the public weights for inference, then explore the repository’s fine-tuning pipeline with your own data.

These are workflow benefits. They do not guarantee better decisions, positive returns, or an edge in a live market.
Where it might fit

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.
Illustrative onlyHistory → sampled futures
INPUT WINDOWMODEL OUTPUT

The bars here are drawn to explain the workflow. They are not a Kronos result or a market forecast.

Deep dive

Under the
bonnet.

The interesting choice is to model candles as a language, then generate one token sequence at a time.

The data representation

Each candle carries several kinds of information.

One candlePrice + activity
openclosehighlowvolume / amount may accompany the bar

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.
The model pipeline

Continuous prices become a sequence the model can learn.

INPUT

Bars

Time-ordered OHLC data. Volume and amount can add trading activity.

ENCODE

Tokenizer

Quantises continuous values into hierarchical discrete tokens.

PREDICT

Autoregressive model

A decoder-only transformer predicts likely next tokens.

DECODE

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.

What the paper reports

Promising benchmark results. Read the metric closely.

+93%price-series forecasting RankIC over the leading TSFM baseline reported by the authors
+87%RankIC over the best non-pretrained baseline in their benchmark
−9%mean absolute error in volatility forecasting
+22%generative fidelity for synthetic K-line sequences
How to read this: these are relative benchmark comparisons reported in the paper, across the authors’ task and evaluation setup. RankIC measures rank correlation between predictions and outcomes. None of these percentages means a 93% chance of profit.
Source: Shi et al., arXiv:2508.02739, submitted 2 Aug 2025. The deck uses the abstract’s summary; consult the paper for datasets, splits, baselines and metric definitions.
Model sizes and trade-offs

Choose a checkpoint for your constraints.

CheckpointParametersContextUse it to
Kronos-mini4.1M2,048Start with a small model and longer context window.
Kronos-small24.7M512Run an accessible baseline; this is the README’s first forecast example.
Kronos-base102.3M512Compare a larger released checkpoint.
Kronos-large499.2M512Listed 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.

Scope and limits

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.
The repo explicitly describes its included fine-tuning/backtest pipeline as a simplified demonstration, not a production-ready quantitative strategy.
A fair evaluation

Test the whole decision path, not just the chart.

  1. Set a simple baselinePersistence or a standard forecasting method gives you a useful floor.
  2. Split by timeKeep validation and test periods later than training. Avoid leakage from overlapping windows.
  3. Match the real cadenceAlign bar frequency, timestamps, market hours and missing-data handling.
  4. Measure by regimeReport errors and rank metrics across assets and distinct market periods.
  5. Model trading frictionsIf a signal informs a strategy, include fees, spread, slippage and market impact.
  6. Paper trade firstMonitor drift and operational failures before any live use.
A backtest is evidence about a historical simulation. It does not establish future performance.
Implementation guide

Build your
first forecast.

Start with a released checkpoint and a clean sequence of bars. Establish a baseline before you fine-tune.

Step 1 · Install and load

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.

Python 3.10+PyTorchHugging Face Hub

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
)
Step 2 · Prepare your bars

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:

openhighlowclosevolume · optionalamount · optional

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"]
The README’s example slices future timestamps from a file containing later bars. For a real forecast, generate the future timestamps yourself at the correct cadence.
Steps 3–5 · Run and evaluate

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.

  1. Plot forecast against held-out truthUse a test segment the model never saw during tuning.
  2. Compare more than one sampleSampling settings affect generated paths. Record them with each run.
  3. Try batch inferencepredict_batch expects equal lookback and prediction lengths across series.
  4. Fine-tune only with a reasonUse the repo’s Qlib workflow after a baseline reveals a real gap.
The README’s default example uses T=1.0, top_p=0.9 and sample_count=1. Treat these as example settings, then validate on your task.
Fine-tuning path

Adapt the data and measure the result.

01 · CONFIGURE

Paths + ranges

Set data, checkpoint, date range, epochs and batch size in the config.

02 · PREPARE

Qlib dataset

Run preprocessing to create time-split train, validation and test files.

03 · TRAIN

Tokenizer, then model

Run the tokenizer stage, followed by predictor fine-tuning with torchrun.

04 · EVALUATE

Backtest carefully

Run the supplied test script, then add realistic costs and risk controls.

python finetune/qlib_data_preprocess.py torchrun --standalone --nproc_per_node=2 finetune/train_tokenizer.py torchrun --standalone --nproc_per_node=2 finetune/train_predictor.py python finetune/qlib_test.py --device cuda:0

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.

Take it with you

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

  1. 1Run Kronos-small on a clean dataset.
  2. 2Compare with a simple baseline using a forward time split.
  3. 3Keep, adapt or discard it based on measured results.

Sources

Repository and README ↗

Code, model catalogue, forecast API, fine-tuning guide and stated caveats.

Research paper · arXiv:2508.02739 ↗

Method, training corpus and reported benchmark results.

Kronos-small on Hugging Face ↗

Checkpoint details and current usage notes.

Thank you.