{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "shiyu-coder-kronos--fine-tune-kronos-on-own-market-data",
 "repo": "shiyu-coder/Kronos",
 "repo_url": "https://github.com/shiyu-coder/Kronos",
 "repo_slug": "shiyu-coder-kronos",
 "title": "Fine-tune Kronos on your own market dataset",
 "page_title": "How to fine-tune Kronos on your own market dataset with Kronos",
 "summary": "Adapt the Kronos tokenizer and predictor to your own candlestick data using the Qlib-based finetuning pipeline.",
 "who": "A quant researcher with local Qlib market data and multiple GPUs who wants Kronos tuned to a specific market or universe.",
 "problem": "A general pre-trained model may not match the distribution of a specific market, so you need a repeatable way to adapt it.",
 "outcome": "Train, validation and test pickle files plus fine-tuned tokenizer and predictor checkpoints saved to the paths in your config.",
 "steps": [
  "Run `pip install pyqlib` and set up your Qlib daily data by following the official Qlib guide.",
  "Edit `finetune/config.py` to set `qlib_data_path`, `dataset_path`, `save_path`, `backtest_result_path`, `pretrained_tokenizer_path`, and `pretrained_predictor_path`, and set `use_comet = False` if you do not use Comet.ml.",
  "Run `python finetune/qlib_data_preprocess.py` to create train_data.pkl, val_data.pkl and test_data.pkl.",
  "Run `torchrun --standalone --nproc_per_node=NUM_GPUS finetune/train_tokenizer.py`, replacing NUM_GPUS with your GPU count.",
  "Run `torchrun --standalone --nproc_per_node=NUM_GPUS finetune/train_predictor.py`, then evaluate the saved checkpoint with the backtesting step."
 ],
 "agent_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.",
 "agents": [
  "any"
 ],
 "difficulty": "Advanced",
 "time": "4 hours",
 "basis": "readme",
 "caveat": "The README describes this pipeline as a simplified demonstration, not a production-ready quantitative trading system, and says a robust strategy needs more techniques such as portfolio optimization and risk factor neutralization.",
 "category": "Data and analytics",
 "tags": [
  "Data and analytics"
 ],
 "lang": "python",
 "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"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/shiyu-coder-kronos/fine-tune-kronos-on-own-market-data/",
 "md": "https://dedupedai.com/use-cases/shiyu-coder-kronos/fine-tune-kronos-on-own-market-data/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/shiyu-coder-kronos--fine-tune-kronos-on-own-market-data.json",
 "api_version": "v1"
}
