Stonqs
All guides

Reading the figures · Guide 9 of 10

Read your portfolio's risk

6 min read

The Risk screen answers two questions about one window of your past: how much the portfolio moved from day to day (volatility), and how deep its worst fall from a peak was (maximum drawdown). It takes five minutes to read, and it describes what happened, not what will.

Your account can hold more than it did at its highest point and still be in a drawdown of 10 %. That is not a rounding error: the Risk screen measures falls on the return, not on the balance, so a deposit made during a fall does not fill the hole. Everything on the screen is a description of one past window, in your base currency, on prices from the sources you chose.

Before you start

You need a portfolio with prices (sources chosen) and, ideally, its deposits in the ledger (filling the gaps after an import). A deposit missing from the ledger distorts the daily returns (see the end). With no transactions at all it says there is no risk to compute, and shows no zeros.

Open Risk and pick a period

Open Risk in the sidebar. The account picker applies, so the figures are for the accounts you selected. Two controls sit at the top: the period (1M, 3M, YTD, 1Y, 3Y, 5Y, All, plus any period of your own; it starts on All) and Window, which offers 21, 63, 126 or 252 days (it starts on 63 and reads Window: 63 days).

The period sets every headline figure. Window only changes the rolling-volatility chart. Pick a period of at least a year if you can: the app’s reference says outright that these figures are unstable over short windows, and that a one-month Sharpe is noise.

Days here are weekdays. The code drops Saturdays and Sundays and carries a weekend deposit to the next weekday.

Read the figures at the top

Only the first few figures show at first. The control reading more figures unfolds the rest, and Show less folds them back. Nothing is dropped.

Label What it says Basis
Volatility (annualized) How much the value moves, up or down Standard deviation of daily returns, times the square root of 252
Sharpe Return above a risk-free rate, per unit of volatility Annualised return minus 2 %, divided by volatility
Maximum drawdown The deepest fall from a peak in the period Chained returns, with the date of the trough and its length in days
Current drawdown How far below the last peak the period ends Same index; “at its peak” when it ends on one
Longest drawdown The longest time between a peak and getting back to it Calendar days; “still open” counts to the period’s end
Semi-deviation The share of the movement that came from falling days Falling days only, divided over every day
Winning days Days that closed higher Count out of all days in the period
Return (annualized) The period’s time-weighted return as a yearly rate Geometric, per 252 days
Best day, Worst day The two single-day extremes, with dates Flow-adjusted daily return

Volatility is a width, not a loss. The reference puts it plainly: a portfolio with 15 % volatility is not expected to fall 15 %. The numbers are computed from the formulas in the measurements.

Check the drawdown against a deposit

Look at Maximum drawdown and Current drawdown together. The first is the worst fall in the period; the second is where you stand now, which is zero only if the period ends at a new high. Then open the Drawdown from the peak chart, which stays at or below zero, and the Deepest drawdowns table underneath.

The table lists falls deepest first, not latest first. Its columns are Period, Depth, Fall (days from peak to trough), Recovery (days from trough back to the peak, or not recovered) and Total. The longest episode is rarely the deepest: a shallow hole that never fills can cost years.

A small example with made-up numbers, in one currency, over three weekdays. The balance starts at 1,000, rises to 1,100, falls to 990, and then you deposit 1,000, ending at 1,980.

Day Balance Deposit Daily return Return index Drawdown
1 1,100 0 +10.00 % 1.1000 0
2 990 0 -10.00 % 0.9900 -10.00 %
3 1,980 1,000 -0.50 % 0.9850 -10.45 %

By balance, day 3 is a new high (1,980 against 1,100) and there is no fall at all. By return, the portfolio is 10.45 % below its peak, because the deposit bought no recovery. That is the point of the screen.

Look at the volatility and the distribution

Rolling volatility repeats the volatility over a sliding window, so you can see calm and rough stretches inside the period. Distribution of daily returns buckets the days by size; the number of buckets follows the width of the panel and says nothing about the portfolio. Read Semi-deviation against volatility. The reference describes the comparison: a semi-deviation close to the volatility means the portfolio falls about as hard as it moves, and one far below means it rose more often than it dropped.

The measurements

Daily return on a weekday t is the balance divided by yesterday’s balance plus that day’s deposits, minus one: r = V_t / (V_{t-1} + F_t) - 1. A day with a zero base is skipped. From the n returns the code computes:

  • Volatility = sample standard deviation (n - 1 in the denominator) of r, times sqrt(252). A daily deviation of 1 % becomes 15.87 % a year.
  • Annualised return = (product of (1 + r)) ^ (252 / n) - 1.
  • Sharpe = (annualised return - 0.02) / volatility, absent when volatility is zero.
  • Semi-deviation = sqrt(sum of r squared over days with r < 0 / (n - 1)) times sqrt(252). It is measured from zero, not from the mean, and divided by every day, like volatility. Divided by the losing days alone, a portfolio that rarely falls would look riskier.
  • Drawdown = return index divided by its running peak, minus one. A recovery is the first day the index is back at the peak.

None of this is a forecast. Market data comes from free third-party sources without warranty, and your broker’s statements are what counts.

If something goes wrong

The screen says there is no risk to compute. The profile has no transactions, or none in the chosen accounts. Import or add some first.

The drawdown looks too deep, or volatility too high. Look at the worst day and the best day: a missing price or a deposit not in the ledger shows up as one outsized day. Fix the price source or add the deposit, and the figures move.

Sources