Create

Sign in to ReadmeX

or

How we handle your data: Privacy Policy

ReadmeX

Your AI reading companion

What would you like to catch up on?

Pick a briefing, or ask your own question.

Your community and people briefings stay personal to you.

Kronos

Kronos: A foundation model for the language of financial markets.

What problem it solves

Financial candlestick sequences are continuous, multidimensional, and high-noise, making them difficult to represent with general-purpose time-series models. Kronos addresses this by quantizing OHLCV data into hierarchical discrete tokens and pre-training an autoregressive Transformer for quantitative forecasting tasks.

Key features

  • Financial candlestick tokenization — The tokenizer converts continuous OHLCV candlestick data into hierarchical discrete tokens for autoregressive modeling.

    Source: README

  • Pre-trained model family — Kronos provides pre-trained models with different capacities, including Kronos-mini, Kronos-small, and Kronos-base, which are available through the Hugging Face Hub.

    Source: README

  • Unified forecasting pipeline — The `KronosPredictor` class handles preprocessing, normalization, prediction, and inverse normalization from raw K-line data to forecasts.

    Source: README

  • Batch and probabilistic forecasting — Users can forecast multiple time series in parallel and control sampling parameters such as temperature, nucleus sampling probability, and sample count.

    Source: README

  • Fine-tuning and evaluation pipeline — The repository includes an A-share example covering data preparation, tokenizer and predictor fine-tuning, and backtesting, along with dedicated training and evaluation scripts.

    Source: README, finetune, examples

Quick start

Copied verbatim from the project's README.

pip install -r requirements.txt
from model import Kronos, KronosTokenizer, KronosPredictor

# Load from Hugging Face Hub
tokenizer = KronosTokenizer.from_pretrained("NeoQuasar/Kronos-Tokenizer-base")
model = Kronos.from_pretrained("NeoQuasar/Kronos-small")
# Generate predictions
pred_df = predictor.predict(
    df=x_df,
    x_timestamp=x_timestamp,
    y_timestamp=y_timestamp,
    pred_len=pred_len,
    T=1.0,          # Temperature for sampling
    top_p=0.9,      # Nucleus sampling probability
    sample_count=1  # Number of forecast paths to generate and average
)

print("Forecasted Data Head:")
print(pred_df.head())

Who it may suit

Inference: May suit quantitative finance researchers and developers building K-line forecasting workflows or adapting a pre-trained model to domain-specific market data.

Topics to discuss

  • Which financial markets and candlestick frequencies should be prioritized for additional evaluation?

  • What applications and domain-specific tasks are best suited to hierarchical K-line tokenization?

  • How should the fine-tuning and backtesting example be extended for research beyond the A-share demonstration?


Written by ReadmeX AI from the project's README, source and public GitHub data; it may contain mistakes.

Read the original README https://github.com/shiyu-coder/Kronos#readme

ReadmeX opened this community for a trending project; it is not run by the project. Maintainers can claim it from the community page.

github.comhttps://github.com/shiyu-coder/Kronos

Comments

…