PO_MAX_CONF
🦉 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
The maximum acceptable model confidence, as a fraction between 0 and 1. Signals above this cap are rejected — counter-intuitively, because in this system extremely confident predictions have historically come from overfit batch models, not real edge.
| Type | float (fraction, 0–1) |
| Default | 0.85 |
| Required | No |
| Maps to | BotConfig.max_confidence |
| Read in | main.py (build_config()) |
What it does
build_config() parses it with float(env("PO_MAX_CONF", "0.85")) — a non-numeric value raises ValueError and crashes at startup.
In _trade_loop() (src/bot.py), immediately after the minimum-confidence gate:
if hasattr(self.cfg, 'max_confidence') and confidence > self.cfg.max_confidence:
... # log "⏸ Overconfident: 91.0% (cap=85.0%) — likely overfit noise"
self._signal_history.clear()
continue
The check is strict > — a confidence exactly equal to the cap passes. Like the minimum gate, rejection clears the signal-confirmation history, restarting any confirmation streak. The hasattr guard exists for backward compatibility with older pickled/constructed configs; with the current BotConfig the field always exists.
The field was added in v6 (src/config.py comment: “reject overconfident (overfit) signals”). Together with PO_MIN_CONF it defines the acceptance band logged at startup: Confidence: 63%–85%.
Valid values
A fraction in (0, 1], strictly greater than PO_MIN_CONF. Set it to 1.0 to effectively disable the overconfidence filter. Setting it at or below PO_MIN_CONF leaves no passable band, so the bot never trades.
Examples
export PO_MAX_CONF=0.85$env:PO_MAX_CONF = '0.85'# .env
PO_MAX_CONF=0.85Interactions
PO_MIN_CONFis the lower edge of the band.- The gate targets the batch models (GBM/RF) in the ensemble, which are periodically retrained on a sliding window in
_result_checker(); the cap protects against their overfit spikes between retrains. - Signals inside the band still face
PO_REQUIRE_ALIGNMENTand the remaining gates.
See also
💬 Unsure how this interacts with the rest of the configuration? Ask in the Chipa Discord — or prototype strategies no-code with ChipaEditor.