What do you want to do?
3 use cases
-
Forecast future candlesticks from one price history
Load a pre-trained Kronos model and get a forecast of future OHLCV candles from your own historical data.
- Kronos
- Data and analytics
- Intermediate
View prompt
Using the Kronos repo, load NeoQuasar/Kronos-small with its tokenizer, forecast the next 120 candles for <CSV path with open, high, low, close columns and timestamps>, and return the pred_df table. Verify that the forecast index matches the y_timestamp values you passed in and that the lookback is no more than 512 rows.
-
Forecast many assets in one batch run
Use predict_batch to forecast several equal-length price series at once and keep results in input order.
- Kronos
- Data and analytics
- Intermediate
View prompt
In the Kronos repo, prepare equal-length candlestick DataFrames for <list of instrument CSV paths>, call predict_batch with pred_len=<number of steps>, and write one forecast CSV per instrument. Verify that the number of returned DataFrames equals the number of input series and that each series has the same lookback length.
-
Fine-tune Kronos on your own market dataset
Adapt the Kronos tokenizer and predictor to your own candlestick data using the Qlib-based finetuning pipeline.
- Kronos
- Data and analytics
- Advanced
View prompt
In the Kronos repo, edit finetune/config.py for my local Qlib data at <qlib data path>, run the preprocessing script, then run both torchrun training scripts with <number of GPUs> GPUs. Verify that train_data.pkl, val_data.pkl and test_data.pkl exist in dataset_path before starting training.
How to use Kronos
- Check you have what it needs: Python 3.10 or newer; pip, and access to install requirements.txt; Internet access to load models from the Hugging Face Hub.
- Open shiyu-coder/Kronos on GitHub and read the README and license.
- Run
pip install -r requirements.txtin the cloned Kronos folder, using Python 3.10 or newer. - Load the tokenizer and model with
KronosTokenizer.from_pretrained("NeoQuasar/Kronos-Tokenizer-base")andKronos.from_pretrained("NeoQuasar/Kronos-small"). - Create the predictor with
KronosPredictor(model, tokenizer, max_context=512). - Split your data into a lookback window of 400 rows as
x_df,x_timestamp, and a 120-stepy_timestamprange, keeping the lookback at or below 512.
These steps come from our top use case, Forecast future candlesticks from one price history, which also has a copy-paste agent prompt.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeAbout this repo
- Who it is forQuant analysts and developers who have historical OHLCV candlestick data and want model-based forecasts or a model they can adapt to their own market data.
- Why it is hot
- LanguagePython
- Sourcegithub.com/shiyu-coder/Kronos · Back to Hot repos
Requirements
- Python 3.10 or newer
- pip, and access to install requirements.txt
- Internet access to load models from the Hugging Face Hub
- Historical candlestick data in a pandas DataFrame with open, high, low, close columns
- For fine-tuning only: a local Qlib data directory, a GPU setup that works with torchrun, and optionally a Comet.ml account
Maintain Kronos? Add the Featured on Deduped badge
Paste this into your README:
[](https://dedupedai.com/use-cases/shiyu-coder-kronos/?ref=badge)
Questions about Kronos
What is Kronos?
Kronos is an open-source Python foundation model that forecasts financial K-line (candlestick) sequences built from OHLCV data. It is an open-source project on GitHub: https://github.com/shiyu-coder/Kronos.
Who is Kronos for?
Quant analysts and developers who have historical OHLCV candlestick data and want model-based forecasts or a model they can adapt to their own market data.
What can I do with Kronos?
3 use cases so far, for example: Forecast future candlesticks from one price history; Forecast many assets in one batch run; Fine-tune Kronos on your own market dataset. Each has steps and a copy-paste agent prompt.
What do I need to run Kronos?
Python 3.10 or newer; pip, and access to install requirements.txt; Internet access to load models from the Hugging Face Hub; Historical candlestick data in a pandas DataFrame with open, high, low, close columns.
What are alternatives to Kronos?
Other hot AI repos in Data and analytics: DBT Charts, Brandpose, Idx, Open Lakehouse Compute Fabric, Zepp Bridge.
Is Kronos safe to run?
Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.