Kronos<T>
Models & Types · AiDotNet.Finance.Forecasting.Foundation
Kronos — Foundation Model for the Language of Financial Markets.
Inheritance: NeuralNetworkBase<T> → FinancialModelBase<T> → ForecastingModelBase<T> → TimeSeriesFoundationModelBase<T> → Kronos<T>
For Beginners
Kronos is a foundation model built specifically for financial markets. It was trained on over 12 billion candlestick records from 45 exchanges worldwide, so it natively understands the language of stock charts (open, high, low, close, volume). Think of it as a model that has “read” every trading chart in history and can predict what comes next based on patterns it has learned.
How It Works
Kronos is a decoder-only foundation model pre-trained on 12B+ K-line (candlestick) records across 45 global exchanges. It natively understands OHLCV (Open, High, Low, Close, Volume) candlestick patterns for financial market forecasting.
Reference: “Kronos: A Foundation Model for the Language of Financial Markets”, 2025.
https://arxiv.org/abs/2508.02739
Example
// Create a Kronos foundation model for financial market forecasting
// Pre-trained on 12B+ candlestick records across 45 global exchanges
var architecture = new NeuralNetworkArchitecture<double>(
inputType: InputType.OneDimensional,
taskType: NeuralNetworkTaskType.Regression,
inputHeight: 512, inputWidth: 5, inputDepth: 1, outputSize: 24);
// Training mode with OHLCV-native decoder-only architecture
var model = new Kronos<double>(architecture);
// ONNX inference mode with pre-trained model
var onnxModel = new Kronos<double>(architecture, "kronos.onnx");
Constructors
| Constructor | Summary |
|---|---|
Kronos(NeuralNetworkArchitecture<T> architecture, KronosOptions<T> options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction) |
Creates a Kronos model in native mode for training or fine-tuning. |
Kronos(NeuralNetworkArchitecture<T> architecture, string onnxModelPath, KronosOptions<T> options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer, ILossFunction<T> lossFunction) |
Creates a Kronos model using a pretrained ONNX model. |
Properties
| Property | Summary |
|---|---|
FoundationModelSize ModelSize { get; } |
|
bool IsChannelIndependent { get; } |
|
bool SupportsTraining { get; } |
|
bool UseNativeMode { get; } |
|
int MaxContextLength { get; } |
|
int MaxPredictionHorizon { get; } |
|
int NumFeatures { get; } |
|
int PatchSize { get; } |
|
int PredictionHorizon { get; } |
|
int SequenceLength { get; } |
|
int Stride { get; } |
Methods
| Method | Summary |
|---|---|
Dictionary<string, T> Evaluate(Tensor<T> predictions, Tensor<T> actuals) |
|
Dictionary<string, T> GetFinancialMetrics() |
|
Dictionary<string, Tensor<T>> GetNamedLayerActivations(Tensor<T> input) |
Captures per-layer activations of the native forward. |
ModelMetadata<T> GetModelMetadata() |
|
Tensor<T> ApplyInstanceNormalization(Tensor<T> input) |
|
Tensor<T> AutoregressiveForecast(Tensor<T> input, int steps) |