{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "shiyu-coder-kronos--forecast-candlesticks-with-kronos-predictor",
 "repo": "shiyu-coder/Kronos",
 "repo_url": "https://github.com/shiyu-coder/Kronos",
 "repo_slug": "shiyu-coder-kronos",
 "title": "Forecast future candlesticks from one price history",
 "page_title": "How to forecast future candlesticks from one price history with Kronos",
 "summary": "Load a pre-trained Kronos model and get a forecast of future OHLCV candles from your own historical data.",
 "who": "A quant analyst or developer with a CSV of 5-minute or daily candles who needs a quick model-based forecast for one instrument.",
 "problem": "Turning raw candlestick history into a usable forecast normally means writing your own preprocessing, normalization, and inverse scaling around a model.",
 "outcome": "A pandas DataFrame of forecasted open, high, low, close, volume and amount values, indexed by the future timestamps you supplied.",
 "steps": [
  "Run `pip install -r requirements.txt` in the cloned Kronos folder, using Python 3.10 or newer.",
  "Load the tokenizer and model with `KronosTokenizer.from_pretrained(\"NeoQuasar/Kronos-Tokenizer-base\")` and `Kronos.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-step `y_timestamp` range, keeping the lookback at or below 512.",
  "Call `predict` with `pred_len=120`, `T=1.0`, `top_p=0.9`, and `sample_count=1`, then print `pred_df.head()`."
 ],
 "agent_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.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "45 minutes",
 "basis": "readme",
 "caveat": "The README gives a demo forecast for BTC/USDT and a live demo page, but it does not report accuracy or backtest results for the default models.",
 "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": [
  {
   "tag": "reverse-engineering",
   "notice": "Forecasts from a sampled model are probabilistic and should be checked against your own out-of-sample data before anyone relies on them for trading decisions."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/shiyu-coder-kronos/forecast-candlesticks-with-kronos-predictor/",
 "md": "https://dedupedai.com/use-cases/shiyu-coder-kronos/forecast-candlesticks-with-kronos-predictor/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--forecast-candlesticks-with-kronos-predictor.json",
 "api_version": "v1"
}
