PART XIII · Chapter 106 · 596 / 660

Lesson 596. Expected value, variance and return distributions: fat tails and log returns

Chapter 106. Statistical Foundations of Backtesting: Fat Tails, Bayes, CLT & Bootstrap

At the top of a backtest results table it says "average daily return 0.08%, 19% annualized." These two numbers are sample estimates of the expected value of a return distribution. But they do not mean the account actually grew by 19% a year, and they do not mean the daily moves follow the bell-shaped normal distribution.

This lab looks at the very first step of testing: summarizing a column of returns in a few numbers. It computes, in order, when simple returns and log returns can be added and why the annualized arithmetic mean differs from the annual compound return. Then it computes how often the days that the normal assumption calls rare actually occur, and how much the largest few days drive the result. Tail-risk measures such as VaR, CVaR and maximum drawdown are covered in Lesson 592, so this lesson stays with the mean and the variance that come before them.

1. Two synthetic assets and the calculation conventions

The data are synthetic data made with a fixed seed. Daily simple returns were drawn for one asset from a normal distribution and for the other from a t distribution with fat tails (4 degrees of freedom). Both were set to a mean of 0.05% and a standard deviation of 2%. There are 2,520 periods (about 10 years if read as daily data). The asset was made deliberately volatile (about 31.7% a year), and the mean of 0.05% is an assumption set to show the calculation, not a property of real markets.

The comparison is simply holding the two assets without any rule. It is a hypothetical example for teaching, made to look at the properties of return distributions, not a trading rule.

The expected value is the average if the same conditions were repeated without end. The variance is the average of the squared distances of the outcomes from the expected value, and its square root is the standard deviation. All we have are 2,520 samples drawn from that distribution, so what we actually compute are the sample mean and the sample standard deviation. The expected value per trade in Lesson 660 is a sample mean in the same sense. Annualization uses 252 days, and the annual compound return is written separately, as a number different from the arithmetic mean.

2. Simple returns and log returns: what can be added

The simple return is the ending price ÷ the starting price − 1, and the log return is ln(ending price ÷ starting price). Here ln is the natural logarithm. For small moves the two values are almost the same, but for large moves they drift apart.

Assumptions: +50% on the first day and −50% on the second. The arithmetic mean of the simple returns is 0%, but the account is at 1.5 × 0.5 = 0.75 times, that is, −25%. Written as log returns, the sum of ln 1.5 = about 0.405 and ln 0.5 = about −0.693 is about −0.288, which equals ln 0.75. To chain periods together, add the log returns, or add 1 to each simple return and multiply (the compounding of Lesson 030), and you get the overall result.

Combining assets works the other way. Assumptions: you put half in each of two assets, one returned +10% and the other −10%. The account's simple return is 0.5 × 10% + 0.5 × (−10%) = 0%. Averaging the two log returns with equal weights gives about −0.50%, which differs from the actual 0%. The account's return is found by adding the simple returns by weight.

If the two get mixed up in backtest code, the error slips quietly into the numbers. Write the convention in the data box of the pre-registered plan (Lesson 581), together with the type of price: log returns or multiplication to combine periods, simple returns to combine assets.

3. The annualized arithmetic mean and the annual compound return are different numbers

The daily mean × 252 stretches one day's average to a year; it is not the speed at which the account actually grows in a year. That speed is the annual compound return, which equals the mean log return × 252 turned back with the exponential.

Metric (synthetic data, seed 20261116) Normal column t column
Daily mean 0.075% 0.036%
Annualized arithmetic mean 19.0% 9.0%
Annual compound return 15.2% 4.2%
Annual volatility 31.2% 31.2%

In both columns the annualized arithmetic mean is larger than the annual compound return. The difference is 3.8 percentage points in the normal column and 4.8 percentage points in the t column. The two columns have different means because the means realized on this path differed; the mean that was set was 0.05% for both.

What creates the difference is volatility. The mean log return is approximately the mean simple return − variance ÷ 2 (Lesson 436 section 4, Lesson 593). Computing this approximation from the daily mean and standard deviation of the normal column and annualizing gives 14.12%, and the annualized mean of the actual log returns is also 14.12%. Repeating this with 200 seeds, the median difference between the annualized arithmetic mean and the annual compound return was 4.57 percentage points in the normal column and 4.59 percentage points in the t column.

Two lines over 2,520 periods of synthetic t-distribution returns: the simple returns simply added up and the log returns added up. After 10 years the sum of simple returns is 89.9% and the log cumulative return is 41.1%, while the account actually grew by 50.8%. The gap between the two lines is the difference created by volatility.

The figure shows the t column's simple returns simply added up and its log returns added up. After 10 years, the sum of simple returns is 89.9% while the log cumulative return is 41.1%, and the account actually grew by 50.8%. The sum of simple returns is not the result of any account.

In testing, this difference causes problems in two places. One is a report that writes the daily mean × 252 as the annual return: the more volatile the asset, the more it reads above the actual growth. The other is mixing the Sharpe ratio (which uses the arithmetic mean) and the annual compound return in one table. Label the two numbers and write them in different boxes.

4. The "rare days" of the normal assumption and reality

If you assume a normal distribution, the probability of a day more than 4 standard deviations from the mean is about 0.0063%. The expected number in 2,520 days is 0.16 days, or about once in 63 years in terms of days. A day beyond 5 standard deviations comes about once in 6,900 years.

On this path, the normal column had no day beyond 4 standard deviations. The t column had 10 days, and 3 of them were beyond 5 standard deviations. The worst day was −11.4%, which was 5.8 times the sample standard deviation from the mean. Read with the normal assumption, a day that should come once in thousands of years came three times within 10 years.

Bar chart comparing the number of days that moved more than 4 standard deviations. The expected value under the normal assumption is 0.16 days; the medians of 200 seeds are 0 days for the normal column and 12 days for the t column, and the t column's 95th percentile is 18 days.

With 200 seeds, this path is not special. In the t column, days beyond 4 standard deviations had a median of 12 days (5th percentile 7 days, 95th percentile 18 days) and appeared at least once in every seed. The normal column had a median of 0 days, and only 14% of the 200 seeds had one or more. Days beyond 5 standard deviations had a median of 5 days in the t column and never appeared in the normal column.

For testing, these numbers mean the following. If you set a loss limit as "so many standard deviations" and read its probability from the normal distribution, you greatly underestimate the days that break the limit in fat-tailed data. For the 4-standard-deviation limit of this experiment, the underestimate is dozens of times. If a data check uses the criterion "beyond 4 standard deviations means an error," it deletes real observations as errors. The standard deviation itself also swings a lot with a few such days. That is also why kurtosis, which measures the thickness of the tails (3 for the normal distribution), was 6.32 on this path and 9.53 as the median of 200 seeds (Lesson 592 covers the instability of kurtosis).

5. The largest few days and "cleaning outliers"

In the t column, turning the best 10 days, that is, 0.4% of 2,520 days, into cash (return 0) lowers the annual compound return from 4.2% to −3.5%, by 7.7 percentage points. Setting the worst 10 days to 0 raises it to 14.2%, by 10.0 percentage points. As medians of 200 seeds, the changes were −9.1 percentage points and +11.0 percentage points in the t column and −6.2 percentage points and +6.8 percentage points in the normal column.

When the result leans this much on a few days, three questions decide the whole result. Did those days fall in the sample? Are the data for those days right? Could a trade actually have been filled at that price on those days (Lesson 586)? The fatter the tails, the larger this dependence.

Suppose that at the data-cleaning stage, values beyond 4 standard deviations were clipped to that boundary. In the t column, 10 days were clipped, the standard deviation became 1.7% smaller than the original, and the annual compound return rose by 0.50 percentage points. Across 200 seeds, the standard deviation fell by a median of 3.7%, and the change in the annual compound return scattered in both directions, from −2.74 percentage points at the 5th percentile to 3.71 percentage points at the 95th percentile. It is a treatment that always makes risk look smaller and changes the return in a direction you cannot know.

So before deleting large values, check them against the raw data. Fix only errors whose cause is confirmed, such as prices that do not reflect a split (Lesson 584), and keep the date and the reason of the fix along with the results before and after it. A large value whose cause you cannot find stays as an observation.

The record for this lesson is a return summary table. In one table, write whether returns are simple or log returns, and the annualized arithmetic mean and the annual compound return. Add the number of days beyond so many standard deviations with the number expected under the normal assumption, the results without the best and worst 10 days, and the list of observations that were cleaned.

Try it yourself

  1. Assumptions: the simple returns of three days are +20%, −10% and +5%. Compute the arithmetic mean of the simple returns, the return over the three days, and the sum of the log returns.
  2. From the table in section 3, read the annualized arithmetic mean and the annual compound return of the normal column and find the difference in percentage points. Which number belongs in a report as the annual return?
  3. If you assume a normal distribution, how many days beyond 3 standard deviations are expected in 2,520 days? Compare this with the medians of 200 seeds in the results table (normal column, t column).
  4. A colleague suggests clipping days beyond 4 standard deviations to the boundary, since they are probably data errors. Using the numbers of section 5, write how you would answer.

Answers

First, the arithmetic mean is (20 − 10 + 5) ÷ 3 = 5%. The overall return is 1.2 × 0.9 × 1.05 = 1.134, so 13.4%, which is less than the arithmetic mean of 5% compounded three times (about 15.8%). The sum of the log returns is ln 1.134 = about 0.1258, and adding the daily log returns one by one gives the same value.

Second, 19.0% − 15.2% = 3.8 percentage points. The speed at which the account grew in a year is the annual compound return of 15.2%, so write the annual compound return in the annual-return box. Write the annualized arithmetic mean separately, with a label, as an input to the Sharpe ratio.

Third, 2,520 × 0.27% = about 6.8 days. The median of 200 seeds is 7 days in the normal column, in line with the expectation, and 34 days in the t column, about five times as many. Even with the same volatility, the number of "rare days" differs greatly with the thickness of the tails.

Fourth, answer that before clipping, you check the values against the raw data and fix only errors whose cause is confirmed. In these synthetic data, clipping beyond 4 standard deviations shrank the standard deviation by a median of 3.7%, which makes risk look smaller, and the annual compound return changed in either direction, from −2.74 percentage points to 3.71 percentage points. In fat-tailed data, days beyond 4 standard deviations can be part of the distribution, not errors.

Data: synthetic data (fixed seed 20261116; a normal column and a t-distribution column with 4 degrees of freedom, daily simple returns set to a mean of 0.05% and a standard deviation of 2%; 2,520 periods). The multi-seed check uses 200 synthetic paths from seeds 20261117 to 20261316. Every number was read from the results tables computed from these data.

Related lessons