A bankroll is not “whatever is in the account.” It is the number of buy-ins you can lose without going broke or moving down in a panic. The math is simple. Following it is the skill.
A 100bb cash stack is one buy-in. Standard cash guidance is 20–40+ buy-ins for the stake you play. Thin winrates and high variance (PLO, tournaments) need more. Sit & gos and MTTs often want 50–100+ bullets.
Risk of ruin is the chance you bust the roll before you grow it, given your winrate and standard deviation. Under 5% is comfortable. Over 20% you are gambling with the roll, even if you are a winner.
Max drawdown is the peak-to-trough drop you should expect. A 20-buy-in “roll” that cannot survive a 12-buy-in downswing is not a roll. Move down a stake before you are desperate.
PokerGym is play-money. Use the bankroll tool with a fake roll and a real winrate assumption. The point is the stop-loss and the move-down rule — not a deposit bonus. When you sit real-money games later, the habit is already there.