Principle:Shiyu coder Kronos Single Series Forecasting
| Field | Value |
|---|---|
| principle_name | Single_Series_Forecasting |
| repo | Shiyu_coder_Kronos |
| domains | Time_Series, Financial_Forecasting |
| last_updated | 2026-02-09 14:00 GMT |
| implemented_by | Implementation:Shiyu_coder_Kronos_KronosPredictor_Predict |
Summary
Generating probabilistic candlestick forecasts for a single financial time series by normalizing input, encoding to tokens, autoregressively generating future tokens, and decoding back to price values.
Concept
Single-series forecasting in Kronos follows a complete encode-generate-decode pipeline applied to one financial time series at a time. The pipeline transforms raw OHLCV (Open, High, Low, Close, Volume) candlestick data through several stages to produce forecasted price values at future timestamps.
The key insight is that by operating in a discrete token space, the model can leverage the same autoregressive generation techniques that have proven successful in language modeling, adapted for financial time series with appropriate normalization and denormalization steps.
Theory
The forecasting pipeline consists of five stages:
Stage 1: Instance Normalization
Each input series is independently normalized using its own mean and standard deviation:
x_normalized = (x - mean(x)) / (std(x) + epsilon)
x_clipped = clip(x_normalized, -clip, clip)
This ensures the model operates on standardized inputs regardless of the absolute price scale, making it applicable across different financial instruments (stocks at $10 vs $10,000).
Stage 2: Tokenization
The normalized continuous values are passed through the KronosTokenizer encoder to produce discrete token indices (s1 coarse + s2 fine).
Stage 3: Autoregressive Generation
The Kronos Transformer generates future tokens one step at a time:
- Predict s1 (coarse) token via temperature-controlled sampling with top-k/top-p filtering.
- Predict s2 (fine) token conditioned on the sampled s1 token.
- Append new tokens to the context and repeat.
Stage 4: Detokenization
The full token sequence (historical + generated) is decoded back to continuous normalized values through the tokenizer's decoder.
Stage 5: Denormalization
The predicted normalized values are scaled back to the original price space:
predictions = preds_normalized * (std(x) + epsilon) + mean(x)
Multi-Sample Averaging
To reduce variance from stochastic sampling, the generation can be run multiple times (sample_count), and the results are averaged. This produces more stable predictions at the cost of increased computation.
Source
- Repository: Kronos on GitHub
Domains
- Time_Series: Sequential data forecasting with temporal dependencies.
- Financial_Forecasting: Predicting OHLCV candlestick data for financial instruments.
Related Principles
- Principle:Shiyu_coder_Kronos_Predictor_Initialization - Setting up the predictor that runs this pipeline.
- Principle:Shiyu_coder_Kronos_Autoregressive_Token_Generation - The core generation loop used in Stage 3.
- Principle:Shiyu_coder_Kronos_Batch_Forecasting - Extending this pipeline to multiple series in parallel.