Advanced config fields

๐Ÿฆ‰ 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

BotConfig (src/config.py) is a dataclass holding every tuneable knob of the bot. Most commonly-tuned fields can be set through environment variables (see the environment variable reference), but the fields below have no environment variable: build_config() in main.py never reads them, so they always take their dataclass defaults unless you change the code.

Fields

FieldTypeDefaultDescription
kelly_fractionfloat0.50Fraction of the Kelly-criterion stake used when sizing trades
max_concurrent_tradesint1Maximum simultaneously open (unresolved) trades
warmup_candlesint60Candles loaded/required before the first trade (floor of 60 enforced)
retrain_everyint10Resolved trades between incremental partial_fit() model updates
lookbackint200Max candles kept in the live buffer and per training sample
feature_windowint20Rolling window (candles) for feature-engine statistics
signal_confirmationsint1Consecutive agreeing candles required before trading (1 = instant)
skip_volatile_regimeboolFalseHard-skip trading while the regime is volatile
min_wait_between_tradesint60Minimum seconds between trade entries
trading_hourstuple(0,1,2,3,4,16,17,19,20,21,22,23)Whitelisted UTC hours; empty tuple = all hours
max_consec_lossesint3Consecutive losses that trigger a cooldown
cooldown_secondsint300Length (seconds) of the loss-streak cooldown
regime_windowint30Candles analyzed for regime detection
db_pathstr"trade_journal.db"SQLite trade-journal file path
poll_intervalfloat2.0Seconds between trade-loop decision cycles

How to change these

There are two ways, both requiring a code change:

  1. Edit the defaults in src/config.py:

    # src/config.py
    kelly_fraction: float = 0.25
    trading_hours: tuple = ()

    Every entry point that builds a BotConfig (including main.py) then picks up the new defaults.

  2. Construct BotConfig yourself instead of (or on top of) main.pyโ€™s build_config():

    import asyncio
    from src.config import BotConfig
    from src.bot import AITradingBot
    
    cfg = BotConfig(
        ssid="your-pocketoption-ssid",
        kelly_fraction=0.25,
        signal_confirmations=2,
        trading_hours=(),          # trade all UTC hours
    )
    asyncio.run(AITradingBot(cfg).start())

For fields that are settable via environment variables (ssid, asset, stakes, confidence bounds, dataset and brain paths, and more), see the environment variable reference.

See also


Level Up Your AthenaAI Setup