Source-linked AI summary
KiT: A Foundation Model for Financial Time-Series Forecasting using DiffusionTransformers
Boyu Zhang, Haorui Li
TL;DR
Financial candlestick forecasting is difficult because of low signal-to-noise ratios and heterogeneity, while existing approaches do not adequately address candlestick structure and distributional forecasts. KiT generates future paths with flow matching and, across multiple markets and resolutions, reports leading return and volatility forecasting results.
Problem
Candlestick forecasting faces extremely low signal-to-noise ratios and market and instrument heterogeneity, while downstream decisions consume distributional properties that point forecasts cannot express.
Source: §1 · p. 1Method
KiT uses conditional flow matching to generate a full future OHLCV path from history and is pretrained at multiple parameter scales on billions of bars across markets and timescales.
Source: §1 · p. 2Results
KiT significantly outperforms prior methods in return and volatility forecasting; mean return RankIC is 0.0571 and mean volatility RankIC is 0.6600.
Source: §4.2 · p. 8, §5 · p. 9Takeaways & Limitations
The paper’s theoretical backtests illustrate the economic relevance of generated path forecasts.
Source: §5 · p. 9Integrating higher-dimensional inputs and fine-tuning for downstream tasks remain future extensions.
Source: §5 · p. 9
Abstract
from arXiv · showhide
Financial candlestick forecasting is fundamental to quantitative investment, yet it remains exceptionally challenging due to extremely low signal-to-noise ratios and vast heterogeneity across markets and instruments. Existing approaches have largely attempted to introduce deep learning to capture hidden temporal features, but most adopt an auto-regressive formulation, which leads to error accumulation during inference. Meanwhile, general-purpose time-series foundation models are not tailored to the unique structure of k-line data and yield unsatisfactory performance on downstream candlestick forecasting tasks. To tackle these problems, we introduce KiT, a K-line Diffusion Transformer foundation model, and reformulate future prediction as conditional path generation via flow matching: given a historical context window, the model generates an ensemble of plausible future OHLCV trajectories. We pre-train KiT at multiple parameter scales on billions of candlestick bars spanning multiple markets and timescales. Across three markets and seven resolutions, KiT attains a mean return RankIC of 0.057 and a mean volatility RankIC of 0.66, leading at every timescale and outperforming both task-specific financial forecasters and general time-series foundation models. Code will be available at: https://github.com/Luciferbobo/KiT.
1 INTRODUCTION
KiT addresses candlestick forecasting’s low signal-to-noise ratio, cross-market and timescale heterogeneity, and need for distributional forecasts with a one-shot flow-matching model. It is pretrained across markets and scales and reports state-of-the-art forecasting performance.
1 INTRODUCTION
- Existing generative forecasters, including TimeGrad [Rasul et al. (2021)] and CSDI [Tashiro et al. (2021)], were evaluated on homogeneous, single-domain data, not as financial-market foundation models.Kronos discretizes bars, can generate geometrically impossible candles, and decodes autoregressively, accumulating errors as the inference sequence extends.Source: §1 · p. 2
- KiT generates an entire future horizon in one conditional flow-matching sample, avoiding temporal rollout and its associated error accumulation.Its five-dimensional, scale-free, exactly invertible log-ratio representation and tailored conditioning address heterogeneity across instruments and timescales.Source: §1 · p. 2
- KiT achieves state-of-the-art RankIC and IC, substantially outperforming task-specific financial forecasters and general-purpose time-series foundation models across markets and instruments.The paper also reports leading results across temporal scales and comprehensive evaluation metrics.Source: §1 · p. 2
- The KiT family is pretrained at 31M, 101M, and 284M parameters on billions of bars across U.S. equities, Chinese A-shares, and cryptocurrencies at seven granularities.The design uses an invertible candlestick representation and rich multi-source conditioning without an additional tokenizer.Source: §1 · p. 2
2 RELATED WORK
Prior forecasting methods and time-series foundation models address parts of financial forecasting but do not natively model candlestick geometry and full distributional paths. Diffusion and flow-matching models have advanced time-series generation, but the cited work identifies no prior diffusion foundation model for financial candlestick generation.
2 RELATED WORK
- General time-series forecasters target point predictions and do not natively handle candlestick ordering constraints or full distributional forecasts capturing tail risk and path dependence.Transformer variants address long-range attention, patching, multi-period structure, and cross-dimension modeling, while other approaches include linear and multi-scale designs.Source: §2 · p. 3
- Time-series foundation models support transfer, but Kronos tokenizes OHLCV and decodes autoregressively, losing continuous price geometry and accumulating horizon errors.Financial language models address NLP rather than numerical price paths, while MarS operates at the order level.Source: §2 · p. 3
- Prior diffusion and flow-matching models address forecasting and imputation, but the cited work reports no diffusion foundation model for financial candlestick generation.FTS-Diffusion uses daily aggregates, TSFlow is a flow-matching baseline, and TimeDiT lacks domain-specific candlestick structure.Source: §2 · p. 3
3 KIT
KiT frames candlestick forecasting as conditional path generation, encoding bars as log-ratio states and processing history and forecast tokens together. Its flow-matching setup trains a velocity predictor, while inference generates the future span from noise.
3 KIT
- KiT encodes OHLCV bars as five-dimensional log-ratio states and places history and forecast spans in one sequence, generating only the forecast span.The historical context is returned bit-identical.Source: §3 · p. 3, Figure 1 · p. 4
3.1 PRELIMINARIES
- Flow matching interpolates between data and noise, trains a network to predict the velocity, and generates samples by integrating the learned ODE from noise toward data.Inference uses an Euler solver.Source: §3.1 · p. 4
3.2 KIT SEQUENCE ENCODING
- Each candlestick becomes a five-dimensional log-ratio state that is invertible, scale-free, and structurally legal after clamping the shadow coordinates.The clamp ensures decoded highs are at least the open and close, while lows are no greater than either.Source: §3.2 · pp. 4–5
3.3 KIT ARCHITECTURE
- KiT combines clean context tokens with noisy future-target tokens, and conditions the two roles separately while adding per-bar calendar signals to token embeddings.Window-constant identity signals use a shared AdaLN trunk, evaluated with flow time for targets and t=0 for context.Source: §3.3 · p. 5
3.4 KIT BLOCK
- KiT uses bidirectional attention across the full sequence, with QK-Norm for training stability and a SwiGLU feed-forward network.Non-causal attention lets tokens use inter-bar dependencies within the noisy forecast horizon.Source: §3.4 · p. 6
3.5 TRAINING AND INFERENCE
- Training applies masked MSE only to future target positions, while inference combines identity and history classifier-free guidance and decodes multiple samples into OHLCV trajectory ensembles.The ensemble supports direct computation of distributional statistics.Source: §3.5 · p. 6
4 EXPERIMENTS
KiT is evaluated across three markets and seven resolutions using return and volatility forecasts, a long-only A-share backtest, and ablations of its design. The experiments report strong forecasting results and positive net backtest returns.
4.1 EXPERIMENTAL SETUP
- OHLCV bars cover three markets and seven timescales; the merged dataset contains 4,830 instruments and 3 billion bars, and all subsequent evaluations use KiT-L (284M parameters).Source: §4.1 · pp. 6–7
4.2 FORECASTING RESULTS
- 0.0571 mean RankIC and 0.0491 mean IC: KiT leads return forecasting at every resolution across three markets.Table 1 reports RankIC between predicted mean terminal return and realized close-to-close log-return sums; the test window is 1 January–10 April 2026.Source: Table 1 · p. 7, §4.2 · p. 8
- 0.6600 mean RankIC and 0.6797 mean IC: KiT leads volatility forecasting at every resolution.The results report gains over the strongest baselines of +0.132 RankIC over Sundial and +0.133 IC over GARCH; Figure 2 shows mean volatility IC.Source: Table 2 · p. 7, Figure 2 · p. 8, §4.2 · p. 8
4.3 BACKTEST
- After costs, the KiT book finishes above the equal-weight universe, median single-name buy-and-hold, CSI 300, and CSI 500.Test annualized net returns are +65.2% on 5-minute bars (Sharpe 1.70) and +64.4% on 2-hour bars (Sharpe 2.46). Figure 4 shows a one-year, return-based long-only backtest using two forecast timescales.Source: §4.3 · p. 9, Figure 4 · p. 9
4.4 ABLATION STUDY
- Increasing model size yields modest improvements in return forecasting and volatility prediction; the ablations also examine guidance, candlestick representation, and condition injection.The model-scale comparison trains KiT-S, KiT-M, and KiT-L on the same dataset; Appendix D discusses classifier-free guidance, and Appendix E covers representation and condition-injection ablations.Source: §4.4 · p. 9
5 CONCLUSION
KiT combines a flow-matching diffusion transformer with a five-dimensional OHLCV representation that preserves candlestick geometry. Its evaluations cover return and volatility forecasting across markets and timescales, while higher-dimensional inputs and downstream fine-tuning remain future extensions.
- KiT models candlestick paths with a flow-matching diffusion transformer and a five-dimensional OHLCV representation that preserves candlestick geometry.Source: §5 · p. 9
- Across multiple markets and timescales, KiT significantly outperforms prior methods in return and volatility forecasting.Source: §5 · p. 9
- Theoretical backtests illustrate the economic relevance of KiT’s generated path forecasts.Source: §5 · p. 9
- Future extensions include higher-dimensional data and fine-tuning for downstream tasks.The paper names Level-3 limit order book data and alpha factors as possible higher-dimensional inputs.Source: §5 · p. 9
A EXPERIMENT DETAILS
The experiment details describe the KiT model family and its resolution-specific window configuration. All family members use the same seven resolutions, while history and prediction lengths vary across timescales.
A.1 MODEL FAMILIES
- All models are trained on the same seven resolutions.Source: §A.1 · p. 16
- History and prediction window lengths vary by K-line timescale to balance computational cost against financial time-series dynamics.Source: §A.1 · p. 16
- Table 3 lists configurations for the KiT-S/M/L model family.Source: Table 3 · p. 16, §A.1 · p. 16
A.2 BASELINE IMPLEMENTATIONS
The appendix specifies how close-only baselines are trained or run and how their forecasts are scored. Settings distinguish sampled path ensembles from single point forecasts, with separate protocols for adapted generative, pretrained, and statistical models.
A.2 BASELINE IMPLEMENTATIONS
- Baseline scores use terminal close-to-close log return and sample standard deviation of one-bar log returns, averaged over K paths before cross-sectional IC or RankIC.Sundial, statistical baselines, and adapted generative models use K=16; Chronos and TimesFM interfaces supply one point path.Source: §A.2 · p. 16
- Kronos-base is evaluated with its official close channel and eight samples, while Kronos-base-FT uses the same architecture finetuned on the mixed-market training split.Sundial uses its public 128M-parameter checkpoint without additional training and generates 16 close paths.Source: §A.2 · p. 16
- Chronos and TimesFM are evaluated as point-forecast baselines, while historical return bootstrap resamples individual returns and GARCH uses fixed coefficients.The bootstrap does not preserve serial dependence; GARCH parameters are not fitted by likelihood maximization.Source: §A.2 · pp. 16–17
- TimeGrad, Diffusion-TS, and TSFlow are separately trained at each resolution on historical A-share windows, with 10,000 optimizer updates per resolution.Targets end by December 31, 2023, and validation targets fall in 2024; prediction horizons match Table 4.Source: §A.2 · p. 17
- The adapted TimeGrad uses a two-layer LSTM and 100 diffusion steps per autoregressive future bar, while Diffusion-TS uses conditional infilling with 200 sampling steps and refinement.TimeGrad and Diffusion-TS each generate 16 paths; refinement makes additional network calls beyond Diffusion-TS’s 200 sampling steps.Source: §A.2 · p. 17
- Adapted TSFlow uses its nonseasonal univariate S4 backbone and Ornstein–Uhlenbeck prior, generating 16 paths with Euler integration on 32 time-grid points.Its additional scale factor is computed only from observed context; 32 is the grid size, not the number of network evaluations.Source: §A.2 · p. 17
B PRETRAINING SCALE AND FORECAST QUALITY
Forecast quality improves mildly across the three KiT scales, with KiT-L reported as the main-paper checkpoint. Training and validation losses for all model sizes converge to similar levels by about 30,000 updates.
B PRETRAINING SCALE AND FORECAST QUALITY
- Validation losses converge to a similar level by about 30,000 updates; at 50,000 updates, training means are 1.183, 1.157, and 1.121 for small, medium, and large models.Equal-resolution validation means at 50,000 updates are 1.577, 1.575, and 1.568, respectively.Source: B PRETRAINING SCALE AND FORECAST QUALITY · p. 17, Figure 5 · p. 18
- Return RankIC is 0.0571 and volatility RankIC is 0.6600 for KiT-L, the main-paper checkpoint on the three-market, seven-resolution test panel.KiT-L also records return IC 0.0491 and volatility IC 0.6797.Source: B PRETRAINING SCALE AND FORECAST QUALITY · p. 18, Figure 6 · p. 18
- Each step up in model size raises return and volatility RankIC by about two percent relative, with the gains still unflattened on this corpus.The ordering is KiT-S, then KiT-M, then KiT-L for both RankIC measures.Source: B PRETRAINING SCALE AND FORECAST QUALITY · p. 18
C EXTENDED FORECAST RESULTS
Extended evaluations cover return IC, volatility IC, and price-series forecasting; the reported price-series comparison favors KiT over both the baseline and fine-tuned Kronos.
C.1 RETURN IC
- Return IC compares mean predicted and realized terminal close-to-close log-returns; Table 5 reports results by resolution, with higher values better.Source: §C.1 · p. 18, Table 5 · p. 19
C.2 VOLATILITY IC
- Volatility IC compares mean predicted path volatility with realized future volatility; Table 6 reports results by resolution, with higher values better.Source: §C.2 · p. 19, Table 6 · p. 19
C.3 PRICE-SERIES FORECASTING
- KiT outperforms both the baseline and fine-tuned Kronos on price-series forecasting averaged over seven resolutions and three markets.The evaluation uses the test window from January 1 to April 10, 2026.Source: C EXTENDED FORECAST RESULTS · p. 18, §C.3 · p. 19, Table 7 · p. 19
C.4 RETURN FORECASTING OVER TIME
Figures 7–9 track return RankIC and IC over time for A-shares, crypto, and US equities, aggregating results across products at each anchor date.
C.4 RETURN FORECASTING OVER TIME
- Each plotted point averages tests across all products in its market at that time anchor.For example, an A-share point averages 3,914 prediction results.Source: §C.4 · p. 19
- The plotted evaluation window runs from January 1 to April 10, 2026.Source: §C.4 · p. 19
- Figures 7–9 plot cross-sectional return RankIC and IC by anchor date for A-shares, crypto, and US equities; each line is a rolling mean.Source: §C.4 · p. 19, Figure 7 · p. 20, Figure 8 · p. 21
D CLASSIFIER-FREE GUIDANCE
Classifier-free guidance separately scales product identity and recent-history context during sampling. The sweep shows that stronger guidance moves forecasts toward its selected context while reducing ensemble spread.
D CLASSIFIER-FREE GUIDANCE
- Training randomly nulls conditions so one network predicts conditional and unconditional velocities; at sampling, their predictions are extrapolated, with w=1 conditional and w>1 amplifying conditioning.Source: D CLASSIFIER-FREE GUIDANCE · p. 23
- The sweep draws 64 paths for each of 100 products, varying one guidance weight over {1, 2, 3, 4} while holding the other at 1.Source: D CLASSIFIER-FREE GUIDANCE · p. 23, Table 8 · p. 23
- Raising identity guidance from 1 to 4 cuts the prior gap from 0.41 to 0.15, while the history gap stays near 0.5.Source: D CLASSIFIER-FREE GUIDANCE · p. 23
- Raising history guidance from 1 to 4 cuts the history gap from 0.52 to 0.19, while the prior gap stays near 0.4.Source: D CLASSIFIER-FREE GUIDANCE · p. 23
- Spread falls from 1.08 at w=1 to 0.69 under identity guidance and 0.72 under history guidance, so context fidelity comes with less ensemble diversity.Source: D CLASSIFIER-FREE GUIDANCE · p. 23
E MORE ABLATION STUDY
The ablations test the candlestick representation and two conditioning pathways; results support scale-free candle inputs and both identity and per-bar calendar signals.
E MORE ABLATION STUDY
- 0.0209 mean RankIC results from robustly normalized raw OHLCV, while close-only log-price scores 0.0183.The raw-level representation loses the scale-free relative candle form; close-only also drops intrabar range and volume.Source: E MORE ABLATION STUDY · p. 24, Table 9 · p. 24
- 0.0329 mean RankIC follows removal of identity signals, versus 0.0571 for the full model; market-and-sector-only conditioning reaches 0.0386.Source: E MORE ABLATION STUDY · p. 24, Table 10 · p. 24
- 0.0372 mean RankIC follows removal of per-bar calendar signals, which include clock, session, day, month, and event context.The ablations change one factor at a time while keeping the data protocol and training recipe fixed.Source: E MORE ABLATION STUDY · p. 24, Table 10 · p. 24
Related papers
This paper cites
- Score-Based Generative Modeling through Stochastic Differential Equations2020
- RoFormer: Enhanced Transformer with Rotary Position Embedding2021
- Classifier-Free Diffusion Guidance2022
- Flow Straight and Fast: Learning to Generate and Transfer Data with Rectified Flow2022
- XGBoost: A Scalable Tree Boosting System2016
- GLU Variants Improve Transformer2020