PO_MAX_STAKE

🦉 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

The maximum stake per trade, in dollars. No trade will ever exceed this amount regardless of confidence or win rate.

Typefloat ($)
Default100.0
RequiredNo
Maps toBotConfig.max_stake
Read inmain.py (build_config())

What it does

build_config() parses it with float(env("PO_MAX_STAKE", "100.0")) — a non-numeric value raises ValueError and crashes at startup.

It is consumed in MoneyManager.compute_stake() (src/trading/money_manager.py), which _trade_loop() in src/bot.py calls before every trade:

  1. When there is a positive Kelly edge, the stake is interpolated between the floor and this ceiling: stake = base_stake + fraction * (max_stake - base_stake), where fraction is half-Kelly (kelly * cfg.kelly_fraction, kelly_fraction = 0.50 by default).
  2. After confidence scaling, the result is hard-clamped: stake = max(base_stake, min(stake, max_stake)).

So PO_MAX_STAKE acts twice: it sets how much room the Kelly formula has to grow the stake as the bot’s win rate improves, and it is an absolute cap. Reaching the cap requires both a strong edge (high win rate) and high confidence.

Valid values

A positive number ≥ PO_BASE_STAKE, within PocketOption’s per-trade limits. If it is below the base stake, the clamp resolves every stake to base_stake and this ceiling is silently ignored.

Examples

export PO_MAX_STAKE=100
$env:PO_MAX_STAKE = '100'
# .env
PO_MAX_STAKE=100

Interactions

  • PO_BASE_STAKE is the floor of the same interpolation.
  • kelly-fraction (config-only, 0.50) controls how quickly stakes climb toward this ceiling.
  • Three max-stake losses in a row equals the default PO_MAX_DAILY_LOSS of $300 — keep the two consistent.

Risk note: binary options trading can lose money, and past performance does not guarantee future results. This ceiling is the most you can lose on one trade.

See also

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