--data

🦉 AthenaAI is an AI-powered ensemble machine-learning trading bot for PocketOption, built on BinaryOptionsToolsV2Get it on GitLab
💬 Need help? Join the Chipa Discord · ⚡ Go no-code with ChipaEditor

Path to the input candle CSV the trainer builds the brain from.

Typestring (file path)
DefaultEURUSD_M1.csv
Maps toTrainerConfig.dataset_path
Read intrain.pysrc/training/trainer.py (Trainer.run()) → src/training/dataset.py (load_candles())

What it does

Trainer.run() passes dataset_path to load_candles() in src/training/dataset.py, which opens the file with utf-8-sig encoding (so Excel-style BOMs are tolerated) and auto-detects one of two formats:

  1. HistData semicolon format (no header row) — detected when the first line contains ; and none of the header words time, open, high, date. Fields: datetime;open;high;low;close[;volume], datetime as YYYYMMDD HHMMSS or bare YYYYMMDD.
  2. Headered CSV — comma- or semicolon-delimited, parsed with csv.DictReader. Timestamp column: time, timestamp, date, or Date, formatted either YYYY-MM-DD HH:MM:SS or a Unix epoch number. OHLC columns: open/Open etc. Volume (optional): tick_volume, volume, Volume, or real_volume.

Malformed rows are skipped silently, so a partially dirty file still trains. The log prints the detected format or column names.

After loading, Trainer.run() aborts with SystemExit if fewer than 50 candles were parsed (Dataset too small (N candles).), then trims to the most recent --max-candles.

Choosing a value

  • The file’s candle period must match --timeframe (default 60 s, i.e. M1 data).
  • You need at least 50 candles to run at all and 200 valid samples after feature generation, but realistically tens of thousands: a month of M1 data (~30k candles) is a reasonable minimum, a year or more is better.
  • If far fewer candles are parsed than the file has rows, the timestamp format is likely unrecognized — rows are dropped silently.
  • Use one dataset per asset and train a separate brain for each (see --out).

Examples

python train.py --data EURUSD_M1.csv
python train.py --data data/GBPUSD_M1.csv --out brains/gbpusd.pkl
python train.py --data .\data\GBPUSD_M1.csv --out brains\gbpusd.pkl

Interactions

  • --timeframe must describe this file’s actual candle period.
  • --max-candles trims this file to its most recent N rows.
  • The bot’s live dataset bootstrap uses PO_DATASET, which accepts the same formats.

See also

💬 Unsure how this interacts with the rest of the configuration? Ask in the Chipa Discord — or prototype strategies no-code with ChipaEditor.