Capital Reservation
Aegis uses a max-of-concurrency-groups model to estimate the worst-case margin required for a strategy configuration. This model determines how much exchange balance must be available before the bot will open a new position.
Model: Max-of-Concurrency-Groups
Section titled “Model: Max-of-Concurrency-Groups”Within a single strategy, legs are organized into concurrency groups — sets of legs that can be simultaneously active. The capital reservation is the maximum margin required across all concurrency groups, not the sum of all legs.
This is distinct from a naive sum-of-all-legs approach:
| Approach | Estimate |
|---|---|
| Sum of all legs | Assumes all legs are open simultaneously — overly conservative |
| Max-of-concurrency-groups | Uses the worst-case group that can be open at once — accurate |
Numeric Example
Section titled “Numeric Example”Setup: A full_short_protection Bastion strategy. Pool value = $1,000, capitalBufferPct = 0.1, leverage = 5×.
First, compute margin per leg using the effective capital (see capitalBufferPct):
effectiveCapitalUsd = $1,000 × (1 + 0.1) = $1,100marginPerLeg = $1,100 / 5 = $220| Leg | Margin per activation |
|---|---|
lower_short | $220 |
upper_short (reentry) | $220 |
Sum-of-all-legs estimate: $220 + $220 = $440
Max-of-concurrency-groups estimate: max($220, $220) = $220
In the full_short_protection preset, at most one of the two legs is active at a given time (successive events: exit, then reentry). The capital reservation model correctly identifies that the maximum concurrent requirement is $220, not $440.
Capital Buffer and Effective Capital
Section titled “Capital Buffer and Effective Capital”capitalBufferPct does not add a separate safety buffer on top of a calculated margin — it multiplies the pool value to produce the effective capital the bot sizes against:
effectiveCapitalUsd = poolValueUsd × (1 + capitalBufferPct)marginPerLeg = effectiveCapitalUsd / leveragerequired_balance ≥ worst_case_group_marginA higher capitalBufferPct means a larger position notional, a higher margin per leg, and therefore a higher required balance. The buffer is baked into the notional size, not added afterward.
See Risk Parameters — capitalBufferPct for the full reference and numeric examples.