Documentation

How Kronos predicts the future

Every number on this site comes from a foundation model. Here's what that actually means.

TL;DR

Kronos is the GPT of stock markets — an open-source foundation model trained on K-line data from 45+ global exchanges.

For each ticker, we sample 30 possible future paths from Kronos and compute probabilities from them.

When you see prob_up 73%, it means 22 out of 30 sampled paths ended higher than the starting price. These are the model's subjective probabilities, not real-world probabilities.

What is Kronos?

  • ◆Architecture: Decoder-only Transformer (same family as ChatGPT)
  • ◆Training data: K-line sequences from 45+ global exchanges
  • ◆Model size: Kronos-small has 24.7M parameters (GPT-2 scale)
  • ◆Origin: Tsinghua University team, paper published 2025-08
  • ◆License: Open source (MIT) — github.com/shiyu-coder/Kronos

Two-stage architecture (the clever bit)

GPT processes text tokens. But stock prices are continuous numbers. Kronos bridges this gap with a two-stage framework:

Stage 1

Tokenizer

Quantizes each K-bar (OHLCV) into a few discrete tokens using hierarchical binary spherical quantization.

Stage 2

Transformer

Autoregressively predicts the next token given the previous ones — exactly like GPT predicting the next word.

How prediction works

Input: past 400 K-bars (OHLCV)
↓
Tokenizer → [t1, t2, ..., t400]
↓
Transformer predicts probability distribution over next token
↓
Sample one token from the distribution
↓
Append to sequence, repeat 30 times
↓
Decode tokens → future OHLCV prices (one path)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Repeat 30 times with different sampling seeds
→ 30 alternative futures

Why 30 different paths?

At each step, Kronos doesn't output a single number. It outputs a probability distribution:

Next K-bar token could be:
token_A (35%) ← small drop
token_B (30%) ← small gain
token_C (20%) ← flat
token_D (10%) ← large drop
...

Each sample uses a different random seed → picks a different token → produces a different path. Run it 30 times and you get 30 alternative futures, from which we compute:

prob_up = (paths ending higher) / 30

Sampling controls

ParameterMeaningDefault
TTemperature. T=0 always picks the most likely token (deterministic). T=1 samples according to the true distribution. T>1 is more random.1.0
top_pNucleus sampling. Only sample from the top X% most likely tokens — prevents weird edge-case outputs.0.9
samplesHow many independent paths to generate. More = more stable probabilities, but slower.30

What makes Kronos special

Not a time-series model, a language model

LSTM / ARIMA give you a single predicted number. Kronos generates complete paths, letting us compute any distribution-level metric.

Zero-shot on unseen tickers

Trained on 45+ exchanges, it has learned the "grammar" of K-lines — head-and-shoulders, double bottoms, volume divergence — so it works on any ticker without retraining.

Natively probabilistic

Other models give "80% up" and you have to trust that number. Kronos gives you 30 possible futures and you compute probabilities yourself — fully transparent.

Important caveats

The 30 paths are NOT real futures. They are what the model imagines, based only on patterns it saw in history.

  • • It doesn't know earnings, news, Fed decisions, geopolitics
  • • It's blind to black swans
  • • It works better in stable regimes, worse during regime change
  • • Re-running without a seed produces different numbers
  • • This is not financial advice.It's a research tool, not an oracle.

Cloud vs. Local: two ways to run

Kronos Filter has two execution paths. Both save to the same Supabase database, so your history and backtest accuracy accumulate regardless of which you use.

Web (HF Spaces)

Quick check from anywhere

  • ◆ Zero setup — just click Predict
  • ◆ Shared HF free CPU
  • ◆ Best for 1–3 tickers × ≤15 samples
  • ◆ Heavy requests (>5 min) will time out
  • ◆ Cold start ~30s after idle
Local CLI

Heavy analysis on your machine

  • ◆ Runs on your CPU (or GPU if configured)
  • ◆ No limits on size — scan 50+ tickers
  • ◆ Model loaded in RAM between runs
  • ◆ Same code, same model, same results
  • ◆ Run: python main.py --tickers ...

Need faster cloud? Subscribe to HF Pro ($9/month) — unlocks ZeroGPU A10G (~10x faster). The code is already instrumented for it; just toggle the hardware setting.

Why combine with other sources?

Kronos is one perspective. Combined with fundamental analysis (what the business does) and technical momentum(how the price is actually moving right now), you get a richer picture. That's why Kronos Filter feeds signals into a separate insights-hub system that cross-references all three.

References