# MAM specification

## Manual trade flow
1. Operator selects strategy, symbol, **BUY/SELL**, entry/exit datetime, master LOT
2. Rates at times from `rate_ticks`
3. Master PnL calculated via `TradePnlService`
4. `MamAllocationService` splits LOT by follower equity (0.01 floor)
5. `Allocation` rows + `LedgerEntry` per follower
6. Positive bonus PnL → `convertBonusProfit`

## Strategy switch
- User requests switch → `pending_strategy_id` if positions open
- Applies on next trade after flat

## Master switch
- `mam_strategy_versions` with effective_from/to
- New trades bind to current version

## Recalc (admin)
- Master spread change → batch recalc allocations
- User views regenerated; audit log internal only
