Free lesson · Risk
Start with gains, losses and an ordered sample
Open interactive lessonPractice calculationsExplore labs
Start with the idea
- Choose a sign convention before measuring risk.
- Here a loss is the negative of profit.
Symbols, units & horizon
- Π: profit over one stated trade in dollars
- L: loss over the same trade in dollars
- L̄: average loss of the three example trades in dollars
- −: negate the profit to use the loss convention
When and why to use this
Use consistent signs before calculating loss quantiles, expected shortfall or scenario losses. The next lesson introduces VaR.
- Profit +5 becomes loss −5. Profit −10 becomes loss +10.
- Negative loss means a gain under this convention.
- Sort observations before discussing a percentile.
- The largest observed loss is a sample maximum.
- A sample maximum is not the largest possible future loss.
Start with gains, losses and an ordered sample
- Start with profits [5,0,−10] dollars.
- Negate each profit to get losses [−5,0,10] dollars.
- Add the losses: 5 dollars. Divide by three trades: 5/3 dollars per trade.
Mean loss≈$1.67 per trade. Largest observed loss=$10. These statistics describe different features of the same sample.
Use the rule
- Name the inputs and units.
- Work the small example by hand.
- Check the result before continuing to the next lesson.
Before moving on
Explain the core rule in one sentence, reproduce the worked calculation and solve both practice variations.
Research sources, review dates and limitations
Capstone checkpoint 5 / Bound the exposure
Synthetic exercise · self-assessed. Open the capstone sizing walkthrough. Explain how its volatility estimate, risk target and exposure cap determine the desired position. Identify what an overnight gap could change before execution.
Save in your practice notes: A position proposal with units and one binding constraint. Open practice studio →
A sizing rule depends on estimated risk and executable prices. Preserve the cash-budget check at the next open.Check your reasoning
Python implementation
Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.
def loss_summary(profits):
if not profits: raise ValueError("At least one profit required")
losses=sorted(-p for p in profits)
return losses,sum(losses)/len(losses),max(losses)
print(loss_summary([5,0,-10]))Continue learning
Risk Management — all lessons- Start with gains, losses and an ordered sample
- Value at Risk and maximum drawdown: two views of the bad days
- Sharpe ratio: return per unit of risk
- Kelly criterion: the fraction that maximises growth
- Monte Carlo: your backtest is one draw from a distribution
- Expected shortfall and scenario risk
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations