PO_DATASET

๐Ÿฆ‰ AthenaAI is an AI-powered ensemble machine-learning trading bot for PocketOption, built on BinaryOptionsToolsV2 โ†’ Get it on GitLab
๐Ÿ’ฌ Need help? Join the Chipa Discord ยท โšก Go no-code with ChipaEditor

Path to a CSV file of historical candles for pre-training the model ensemble before live trading.

Typefile path
DefaultEURUSD_M1.csv
RequiredNo
Maps toBotConfig.dataset_path
Read inmain.py (build_config())

What it does

build_config() reads it with env("PO_DATASET", "EURUSD_M1.csv"). Note the effective default: although BotConfig.dataset_path defaults to "" in src/config.py, when launched through main.py the default is EURUSD_M1.csv. To disable pre-training entirely, set the variable to an empty string (PO_DATASET=) โ€” an empty path makes the if self.cfg.dataset_path: check in start() skip pre-training.

Pre-training only runs if no saved brain was loaded. In AITradingBot.start() (src/bot.py): if the brain at PO_BRAIN_PATH loads successfully, dataset training is skipped with โœ… Loaded saved brain โ€” skipping dataset training!. Otherwise the bot reloads past trades from the SQLite journal, then calls _load_dataset(cfg.dataset_path). Any exception (including a missing file) is caught and logged as Failed to load dataset: โ€ฆ โ€” the bot continues untrained rather than exiting.

_load_dataset() behavior:

  • Format auto-detection: HistData semicolon format without headers (YYYYMMDD HHMMSS;open;high;low;close[;volume]), or standard header CSV (comma or semicolon delimited) with flexible column names (time/timestamp/date/Date, open/Open, โ€ฆ, volume from tick_volume/volume/Volume/real_volume). Timestamps may be YYYY-MM-DD HH:MM:SS or numeric epoch. Unparseable rows are silently skipped.
  • Fewer than 50 parsed candles โ†’ warning, pre-training skipped. More than 500,000 โ†’ only the most recent 500,000 are used.
  • Labels look default_expiry / timeframe candles ahead (see PO_DEFAULT_EXPIRY); draws are skipped. Fewer than 20 valid samples โ†’ skipped.
  • 70% of samples train the online and batch models; the remaining 30% run a walk-forward test whose honest win rate is logged against the 92%-payout breakeven.
  • On success the brain is saved to PO_BRAIN_PATH, so subsequent runs skip this step.

Pre-training on a large CSV can take several minutes; progress is logged every 5,000 samples.

Valid values

A path (relative to the working directory, or absolute) to a readable CSV in one of the supported formats, ideally matching PO_ASSET and PO_TIMEFRAME โ€” the bot cannot verify that. Empty string disables pre-training.

Examples

export PO_DATASET='data/EURUSD_M1.csv'
$env:PO_DATASET = 'data\EURUSD_M1.csv'
# .env
PO_DATASET=EURUSD_M1.csv

Interactions

See also

๐Ÿ’ฌ Unsure how this interacts with the rest of the configuration? Ask in the Chipa Discord โ€” or prototype strategies no-code with ChipaEditor.