betashell

What betashell calculates

This page is for people who took high-school math but never studied investment theory. By the end you will know why betashell looks at CAGR rather than the average return, how it decides how much of each asset to hold, and how to read the numbers it gives you.

The returns and volatilities on this page are made up to explain the ideas. They are not forecasts for any market and not investment advice. The numbers betashell actually uses are estimated from historical data and a set of stated assumptions, for the assets you enter.

Chapter 1What question it answers

You tell betashell three things:

It answers one thing: what share of your net worth each asset should be so that your wealth grows fastest over the long run without falling further than you can stand. These shares are called the “target weights”.

It does not say whether the market will rise or fall tomorrow, or when to buy. It calculates weights, not timing.

The table on the Result tab puts the “Current weight” next to the “Target weight”; both are shares of net worth. The ▲ ▼ = next to a target weight say whether the target is above, below or equal to the current weight. They are about weights only and are not instructions to buy or sell. Only after you decide to work from these targets and press “Adopt these targets” does the page show how far each holding is from its target; whether to adjust is entirely up to you.

Each question on the Analysis tab re-solves the same portfolio with one condition changed, so you can see which assumptions the answer is sensitive to. The ideas they use are spread across the chapters below, and the terms on that tab link straight to the matching section.

Chapter 2Up 50%, down 50%: volatility eats growth

Say you have 100 dollars. The first year it rises 50%, the second year it falls 50%. The average return over the two years is (50% − 50%) ÷ 2 = 0%, which sounds like breaking even. In fact:

100×1.5×0.5=75100 \times 1.5 \times 0.5 = 75

You are 25 dollars down. That is −13.4% a year (because 0.75≈0.866\sqrt{0.75} \approx 0.866: each year multiplies your money by 0.866).

The problem is that wealth compounds by multiplying year after year, not by adding. Over the long run, what decides how much you end up with is “how many times over your money grows per year on average”, the compound annual growth rate (CAGR). It has a handy approximation:

CAGR≈average return−12 volatility2\text{CAGR} \approx \text{average return} - \frac{1}{2}\,\text{volatility}^2

Expected average return

The “average return” in the formula adds up each year’s return and averages them, like the (50% − 50%) ÷ 2 = 0% in the example above. It looks only at how many percent each year went up or down and ignores that wealth compounds by multiplying, so it overstates the growth you actually get over the long run. The formulas below write it as μ\mu.

The “Expected average return” on the Result tab is the average return of these weights: under betashell’s estimates, roughly how much they return in an average year.

Annual volatility

“Volatility” is how widely returns swing up and down (the standard deviation, in statistics). Measured over a year it is called annual volatility, and every volatility on this page is annual. The formulas write it as σ\sigma. The example above has an average return of 0% and a volatility of 50%; the approximation gives 0%−12×(50%)2=−12.5%0\% - \frac{1}{2} \times (50\%)^2 = -12.5\%, close to the actual −13.4%. The smaller the volatility, the better the approximation.

Volatility drag

This formula is where the whole tool starts. It says that volatility itself eats growth, and the amount it eats is proportional to the square of the volatility. The term that gets eaten, 12 volatility2\frac{1}{2}\,\text{volatility}^2, is called “volatility drag”. Of two choices with the same average return, the less volatile one ends up with more over the long run.

Expected CAGR

The “Expected CAGR” on the Result tab is roughly how much these weights grow per year over the long run; the formulas write it as gg. In these symbols, the approximation at the start of the chapter reads:

g≈μ−12 σ2g \approx \mu - \frac{1}{2}\,\sigma^2

betashell works it out in two steps:

  1. Estimate each asset’s expected average return (chapter 7) and its annual volatility and correlations with the others (chapter 8).
  2. Apply the multi-asset version of the formula (chapter 6): the expected average return of the whole set of weights, minus its volatility drag.

It is a number the model calculates, not a forecast; the estimated returns themselves have large errors (chapter 7).

Mathematically, this “how many times over per year on average” is the average after taking logs: logs turn multiplication into addition, so the log of long-run wealth is the sum of the logs of each year’s return. Maximising CAGR is the same as maximising expected log wealth.

Simulation: average return and CAGR

Try it with the simulator below. An asset has an expected average return of 8% and a volatility of 18% (the same as the stock index in chapter 3), and you put in 100,000 at age 20. Each year that passes draws that year’s return at random from the normal distribution in the chart. The more years you draw, the closer the average of the draws gets to 8%, yet the CAGR settles near the formula’s 8% − ½ × 18%² ≈ 6.4%, below the average return.

Chapter 3How much to hold: the Kelly criterion

Start with the simplest case: only two choices, a stock index and cash. Say the stock index has an average annual return of 8% and a volatility of 18%, and cash earns 2%. You put a fraction ww of your net worth into stocks and the rest in cash. ww can be more than 100%, which means borrowing to buy (leverage).

Apply the formula from chapter 2, and your CAGR is a quadratic function of ww:

g(w)=2%+w×(8%−2%)−12w2×(18%)2g(w) = 2\% + w \times (8\% - 2\%) - \frac{1}{2} w^2 \times (18\%)^2

The coefficient of w2w^2 is negative, so this is a parabola opening downwards, and its vertex is the fraction that grows fastest. Using the vertex formula −b2a-\frac{b}{2a} from school:

w∗=8%−2%(18%)2≈185%w^* = \frac{8\% - 2\%}{(18\%)^2} \approx 185\%

Writing the cash rate as rr, the peak in general is w∗=(μ−r)/σ2w^* = (\mu - r) / \sigma^2.

This is the Kelly criterion: under these assumptions, the fastest long-run growth comes from borrowing until stocks are about 185% of your net worth, for a CAGR of about 7.6%. Compare a few points:

Share in stocksCAGRVolatility
0% (all cash)2.0%0.0%
46% (1/4 Kelly, a quarter of the vertex)4.4%8.3%
100% (all stocks)6.4%18.0%
185% (the Kelly vertex)7.6%33.3%
370% (2× Kelly)2.0%66.7%

The Kelly criterion comes from Kelly (1956), “A New Interpretation of Information Rate”, Bell System Technical Journal 35(4): 917–926, which was about how much to stake on each of a series of bets. Its form for stocks whose share can be adjusted at any time, w∗=(μ−r)/σ2w^* = (\mu - r) / \sigma^2, is in Merton (1969), “Lifetime Portfolio Selection under Uncertainty: The Continuous-Time Case”, Review of Economics and Statistics 51(3): 247–257.

Simulation: which share ends with the most

The table above is the long-run growth rate from the formula. Race the five shares with the simulator below: each puts 100,000 into the same market at age 20 and holds for 30 years. Every day brings the same rise or fall for all of them; only the share in stocks differs. Run it a few times and look at:

Fractional Kelly

The parabola is flat near its vertex: betting a little less than the vertex costs only a little growth. Write the share as ff times the vertex, w=fw∗w = f w^*, and substitute it into g(w)g(w):

g−r=(μ−r)22σ2×(2f−f2)=(μ−r)22σ2×[1−(1−f)2]\begin{aligned} g - r &= \frac{(\mu - r)^2}{2\sigma^2} \times (2f - f^2) \\ &= \frac{(\mu - r)^2}{2\sigma^2} \times \left[ 1 - (1 - f)^2 \right] \end{aligned}

f=1f = 1 is the Kelly vertex. So betting ff times the Kelly share, called ff Kelly (half Kelly, for example), earns 1−(1−f)21 - (1 - f)^2 of the growth Kelly earns above all cash, at ff times Kelly’s volatility:

With more than one asset the idea is the same; chapter 6 covers it. First, a question: why doesn’t betashell simply tell you to borrow up to 185%?

Chapter 4How deep a fall you can live with

Growing fastest in the long run does not mean you can live through the ride. Growth only looks at the end point, not at how far you fall on the way. If your wealth halves from its peak at some point, many people sell at the bottom, and the long-run growth never arrives.

If returns keep swinging in roughly the same way every year (in mathematical terms, geometric Brownian motion), you can work out the probability of “falling DD or more from the peak within the next TT years”. Four numbers decide it:

The last one is the easiest to miss: measured from the peak, a fall of any depth happens sooner or later if you wait long enough. So a probability only means something with a number of years attached.

There is no simple formula for this probability. betashell cuts “how far below the peak” into 200 steps and moves forward a small slice of time at a time, working out the chance of not yet having fallen DD (mathematically, it solves a diffusion equation).

Back to the example from chapter 3, the probability of falling to half the peak:

Share in stocksWithin 10 yearsWithin 30 yearsWithin 60 years
50%0.04%0.41%1.01%
100%15.1%46.5%73.2%
185% (the Kelly vertex)82.5%99.6%100.0%

At the vertex, halving within 30 years is close to certain; even at 100% the chance within 30 years is close to one half. It grows fastest, but few people can sit through that.

Simulation: do you sell halfway?

Try it with the simulator below. As in chapter 2, everything is in the stock index (average return 8%, volatility 18%), and you put in 100,000 at age 20 and hold until 100.

Selling only at half is a generous assumption; real investors often give up sooner. Krämer (2022), “The History and Psychology of Panic-Selling”, Lazard Asset Management:

Drawdown tolerance and the volatility limit

betashell uses this probability in reverse. The three questions in simple mode ask for DD, TT and the probability pp; together they are your “drawdown tolerance”:

The higher the volatility, the higher the chance of falling DD. So betashell finds the volatility at which the chance is exactly pp: that is the most volatility the portfolio may have, the “volatility limit”.

For example, if the portfolio’s CAGR is 6% and you accept “at most a 10% chance of falling by half within 30 years”, the volatility limit is 13.4%. Other combinations (all over 30 years):

Fall you can live withChance 5%Chance 10%Chance 20%
20%6.2%6.6%7.2%
30%8.2%8.8%9.6%
40%10.2%11.0%12.1%
50%12.4%13.4%14.8%
60%14.8%16.1%17.9%
70%17.6%19.3%21.7%

The volatility limit is binding

So the problem betashell solves is: make the gg of chapter 3 as large as possible while volatility stays within this limit. There are two cases:

  1. If the Kelly vertex is already within the limit, the answer is the vertex (conditions such as trading costs and locked positions move it a little).
  2. If not, the answer stops at the edge of the limit, the fastest-growing point within what you can live with.

The Result tab shows two numbers side by side:

When they are equal, it is the second case, which the Analysis tab calls “the volatility limit is binding”: to get more growth you would have to accept deeper or more frequent falls.

The drawdown limit is a probability, not a guarantee

This probability rests on two assumptions:

Real markets gap, have liquidity limits, and now and then have days more extreme than the assumption allows. So what you set is “the probability of falling more than a given amount from a peak within so many years”, not “it will never fall more than this”. It is a probability under the model, not a guarantee, and the actual fall can be larger.

Chapter 5Borrowing and leverage

Chapter 3 put the Kelly vertex at 185%, assuming you could borrow at the same 2% that cash earns. In reality borrowing costs more, and borrowing is not the only kind of leverage.

Break-even rate

Say the borrowing rate is bb. With net worth 1, stocks ww (w>1w > 1) and w−1w - 1 borrowed:

g(w)=wμ−(w−1) b−12w2σ2g(w) = w\mu - (w - 1)\,b - \frac{1}{2} w^2 \sigma^2

Setting the derivative with respect to ww to 0 gives w∗=(μ−b)/σ2w^* = (\mu - b) / \sigma^2. For borrowing to be worth it, w∗w^* must be more than 1, that is

b<μ−σ2b \lt \mu - \sigma^2

With the numbers from chapter 3, the borrowing rate has to be below 4.8% for borrowing to buy stocks to be worth it; this rate is called the “break-even rate”. The Analysis tab’s “Is this loan worth taking?” calculates exactly this, but for your whole portfolio, and with the volatility limit of chapter 4 and the estimation error of chapter 7 taken into account. It answers “how high the rate would have to go before the model stops using this loan”.

The volatility limit often bites before the rate does. In chapter 4’s example the limit is 13.4%; with stocks at 18% volatility you can hold at most 74%: even all stocks is over the limit, so the model does not borrow however low the rate.

Net worth, total assets and funding

Once you borrow, two numbers need keeping apart:

The “funding” bar next to the pie shows how much of the total assets is your own and how much is borrowed. A loan is a source of funding, not an asset, so it is not in the pie.

Futures

Futures are another kind of leverage. Buying one stock index futures contract gives you exposure to the index’s moves without paying the full amount, only margin kept in your account. Its expected return is the index return minus an implied financing rate (roughly the risk-free rate of its currency), so it amounts to “borrowing at the risk-free rate to buy the index”, usually cheaper than a personal loan. The price:

So loans, futures and not borrowing are compared in one formula: which leverage is cheapest and how much to use is decided by growth and the volatility limit.

Exposure

Futures tie up no capital, so they are not in the pie either. When there are futures, the Result tab also lists “exposure”: the futures’ notional amounts are added to the class they belong to, as shares of net worth. Total exposure above 100% is the leverage from loans and futures; cash held as margin does not count as exposure.

Chapter 6Two assets beat one

Chapter 3 had only one asset that swings. Start with two: the returns of asset X and asset Y over a year are two random variables XX and YY, with average returns μ1\mu_1 and μ2\mu_2, volatilities σ1\sigma_1 and σ2\sigma_2, and correlation ρ\rho. Put a share w1w_1 in X, w2w_2 in Y and the rest in cash at rate rr. As in Chapter 3, CAGR is the average return minus half the variance:

g=r+w1(μ1−r)+w2(μ2−r)−12Var⁡(w1X+w2Y)\begin{aligned} g &= r + w_1 (\mu_1 - r) + w_2 (\mu_2 - r) \\ &\quad - \frac{1}{2} \operatorname{Var}(w_1 X + w_2 Y) \end{aligned}

Cash does not swing, so the portfolio’s variance comes only from the X and Y parts. By the school formula

Var⁡(w1X+w2Y)=w12Var⁡(X)+w22Var⁡(Y)+2w1w2Cov⁡(X,Y)\begin{aligned} \operatorname{Var}(w_1 X + w_2 Y) &= w_1^2 \operatorname{Var}(X) + w_2^2 \operatorname{Var}(Y) \\ &\quad + 2 w_1 w_2 \operatorname{Cov}(X, Y) \end{aligned}

Here Var⁡(X)=σ12\operatorname{Var}(X) = \sigma_1^2 and Var⁡(Y)=σ22\operatorname{Var}(Y) = \sigma_2^2, and the covariance is the correlation times the two volatilities, Cov⁡(X,Y)=ρσ1σ2\operatorname{Cov}(X, Y) = \rho \sigma_1 \sigma_2, so

Var⁡(w1X+w2Y)=w12σ12+w22σ22+2w1w2ρσ1σ2\operatorname{Var}(w_1 X + w_2 Y) = w_1^2 \sigma_1^2 + w_2^2 \sigma_2^2 + 2 w_1 w_2 \rho \sigma_1 \sigma_2

Take two assets at half each, both with 18% volatility: w1=w2=12w_1 = w_2 = \frac{1}{2} and σ1=σ2=σ\sigma_1 = \sigma_2 = \sigma. The weights have to stay at half each, which takes regular rebalancing; the simulation below comes back to it. Substituting:

σportfolio2=14σ2+14σ2+2⋅12⋅12⋅ρσ2=12σ2+12ρσ2=1+ρ2σ2\begin{aligned} \sigma_{\text{portfolio}}^2 &= \tfrac{1}{4} \sigma^2 + \tfrac{1}{4} \sigma^2 + 2 \cdot \tfrac{1}{2} \cdot \tfrac{1}{2} \cdot \rho \sigma^2 \\ &= \tfrac{1}{2} \sigma^2 + \tfrac{1}{2} \rho \sigma^2 = \frac{1 + \rho}{2} \sigma^2 \end{aligned}

Taking the square root, the portfolio’s volatility depends only on the correlation ρ\rho:

σportfolio=σ1+ρ2=18%×1+ρ2\sigma_{\text{portfolio}} = \sigma \sqrt{\frac{1 + \rho}{2}} = 18\% \times \sqrt{\frac{1 + \rho}{2}}

Correlation ρ\rhoPortfolio volatilityGrowth eaten by volatility 12σ2\frac{1}{2}\sigma^2
1 (always move together)18.0%1.62%
0.515.6%1.21%
0 (unrelated)12.7%0.81%
−0.3 (often opposite)10.6%0.57%

As long as two assets do not always move together, holding both swings less than either alone, and less growth is eaten by volatility. The average return has not changed at all, yet CAGR is higher. This is one of the few places in investing where you get more return without taking more risk. It is already in the formula: as long as each asset’s expected return and volatility are known, maximising this formula diversifies by itself, with no rule needed. In practice expected returns are estimated with error, so betashell adds one small term, the “spreading prior”, which pulls the weights a little towards equal; Chapter 10 covers it.

Simulation: all in one, or half each

Run it with the simulator below. Assets X and Y both average 8% with 18% volatility. At 20 you put in 100,000 for 30 years. There are two choices you can make in advance:

The chart draws three lines: all in X, all in Y and half in each. After a run the top line is often all in X or all in Y, but which one does better is only known afterwards, so the comparison that matters is a coin-toss pick against half in each. Move the correlation, run it a few times, and look at:

Why the top line is often all in one asset, yet half in each wins more often:

Many assets

With many assets the weights become a set w1,w2,…w_1, w_2, \dots, and variances and covariances are written σij\sigma_{ij}, the covariance of asset ii with asset jj (σii\sigma_{ii} is asset ii’s own variance; with two assets σ12=ρσ1σ2\sigma_{12} = \rho \sigma_1 \sigma_2):

g=r+∑iwi(μi−r)−12∑i∑jwiwjσijg = r + \sum_i w_i (\mu_i - r) - \frac{1}{2} \sum_i \sum_j w_i w_j \sigma_{ij}

With only two assets, expanding the two sums gives the formula above. This is the formula betashell maximises.

The best weights are where the partial derivative for every wiw_i is 0:

∂g∂wi=(μi−r)−∑jσijwj=0\frac{\partial g}{\partial w_i} = (\mu_i - r) - \sum_j \sigma_{ij} w_j = 0

In words: the return from holding a little more of each asset exactly equals the extra risk it adds to the whole portfolio. The next chapter uses this formula in reverse.

Alpha needed to include

Weights cannot be negative (betashell does not short). If even a tiny amount of an asset brings less return than the risk it adds, that is (μi−r)<∑jσijwj(\mu_i - r) \lt \sum_j \sigma_{ij} w_j, its best weight is 0 and it is set to zero. For it to be included, you would have to believe it is better than the model estimates:

Chapter 7Where expected returns come from

All the examples so far assumed “the stock index returns 8% a year on average”. In practice this number is the hardest to estimate in the whole calculation.

The most direct approach is the historical average. But the standard error of an average return is σ/T\sigma / \sqrt{T} (TT is the number of years of data). The source is Merton (1980), “On Estimating the Expected Return on the Market: An Exploratory Investigation”, Journal of Financial Economics 8(4): 323–361, which also shows that how precisely an average return is estimated depends only on how many years the data covers; cutting the same years into monthly or daily data does not make it more precise. For a stock with 26% volatility and 12 years of data, the standard error is about 7.5%; a 95% confidence interval from the normal distribution is the historical average plus or minus 14.7%. A stock that averaged 15% might really have an expected return of 0%, or of 30%.

Worse, optimisation magnifies this error: it seeks out the highest expected returns, and many assets with “especially high historical averages” were simply lucky. Put historical averages straight into the formula of chapter 6 and you usually get a heavy bet on whatever rose most in the past.

Return model: equilibrium returns

betashell takes another approach: what all the world’s investors hold, added together, is the market itself. Turn the last formula of chapter 6 around: if the market’s weights wmktw_{\text{mkt}} are the best weights, what should each asset’s expected return be?

μi−r=λ∑jσij wmkt,j=βi×(SRmkt×σmkt)\begin{aligned} \mu_i - r &= \lambda \sum_j \sigma_{ij} \, w_{\text{mkt},j} \\ &= \beta_i \times (SR_{\text{mkt}} \times \sigma_{\text{mkt}}) \end{aligned}

This is the Black-Litterman model’s equilibrium return, from Black and Litterman (1992), “Global Portfolio Optimization”, Financial Analysts Journal 48(5): 28–43, and the approach used when the Data tab’s “Return model” says “Equilibrium returns”. βi\beta_i is how much this asset moves with the market (when the market rises 1%, it rises βi\beta_i% on average), and the bracket is the whole market’s risk premium; the λ\lambda in the formula is explained in a note further down this section. The “market” betashell uses is the world’s financial assets at the end of 2025:

ClassMarket value (US$ trillion)Share
Global listed equities157.848%
Global bonds160.748%
Investment gold13.54%

Sources:

The Sharpe ratio is excess return divided by volatility (how much return per unit of risk), written SRSR. The whole market’s Sharpe ratio is the market Sharpe ratio, written SRmktSR_{\text{mkt}}; it is not the Sharpe ratio of your own portfolio. betashell assumes SRmktSR_{\text{mkt}} is 0.3. For example, if this market portfolio’s volatility is 10%, the market’s risk premium is 0.3×10%=3%0.3 \times 10\% = 3\%; an asset with β=1.2\beta = 1.2 then has an expected return of the risk-free rate plus 1.2×3%=3.6%1.2 \times 3\% = 3.6\%.

Note: what is the λ\lambda in the first line, and why is it gone from the second?

The formula has a λ\lambda that the partial derivative in chapter 6 does not, because chapter 6’s formula is the answer of a full-Kelly investor, and most people are more cautious than full Kelly: we assume the market is λ\lambda times as cautious as full Kelly (λ\lambda is called “risk aversion”), betting only 1/λ1/\lambda of the Kelly share on the same returns.

Getting from the first line to the second takes two steps. First, ∑jσijwmkt,j\sum_j \sigma_{ij} w_{\text{mkt},j} is the covariance of asset ii with the whole market; βi\beta_i is defined as that covariance divided by the market’s variance, so it equals βiσmkt2\beta_i \sigma_{\text{mkt}}^2:

μi−r=λβiσmkt2\mu_i - r = \lambda \beta_i \sigma_{\text{mkt}}^2

Second, find λ\lambda from the market itself: multiply the first line by wmkt,iw_{\text{mkt},i} and add up over ii. The left side becomes the whole market’s excess return and the right side λ\lambda times the market’s variance. Dividing by σmkt\sigma_{\text{mkt}} gives the market Sharpe ratio:

μmkt−r=λσmkt2SRmkt=μmkt−rσmkt=λσmktλ=SRmktσmkt\begin{aligned} \mu_{\text{mkt}} - r &= \lambda \sigma_{\text{mkt}}^2 \\ SR_{\text{mkt}} &= \frac{\mu_{\text{mkt}} - r}{\sigma_{\text{mkt}}} = \lambda \sigma_{\text{mkt}} \\ \lambda &= \frac{SR_{\text{mkt}}}{\sigma_{\text{mkt}}} \end{aligned}

Substituting back into the first step, λ\lambda cancels out:

μi−r=SRmktσmktβiσmkt2=βi×(SRmkt×σmkt)\begin{aligned} \mu_i - r &= \frac{SR_{\text{mkt}}}{\sigma_{\text{mkt}}} \beta_i \sigma_{\text{mkt}}^2 \\ &= \beta_i \times (SR_{\text{mkt}} \times \sigma_{\text{mkt}}) \end{aligned}

The advantage: volatility, correlations and β\beta are estimated from historical data, and these estimate far more accurately than average returns (next chapter); the only number left to assume is the market Sharpe ratio. Any single stock’s expected return is decided only by how it moves with the market, not by how much it rose in the past. So betashell does not predict which stock will rise.

How the market Sharpe ratio is set

The market Sharpe ratio is the only assumption in the whole model about how high returns are; everything else is estimated from historical prices. betashell uses 0.3, for two reasons:

It is not worked out from historical average returns, for the reason at the start of this chapter: historical averages have too much error.

When the market Sharpe ratio is set higher or lower:

Expected return, beta and the market proxy

On the Data tab you can open an expected return to see what it is made of: the risk-free rate, the market risk premium above, and adjustments such as dividend tax and exchange rates (chapter 9).

The same tab has two betas, and the numbers differ:

Chapter 8Where risk comes from

Volatility and correlations are estimated from historical prices: the monthly returns of each asset (or of a “statistics proxy” that moves like it, such as an index with a longer history standing in for a newly listed ETF), from 2004 by default.

Historical estimates of volatility

Why are these more reliable than average returns?

Under a normal distribution, the standard error of a volatility estimate is about σ/2n\sigma / \sqrt{2n} (nn is the number of months). With 18% volatility and 12 years (144 months) of data, the standard error is only 1.1%, far smaller than the error in the average return.

Monthly rather than daily returns are used for two reasons:

The correlation matrix

Correlations are harder: nn assets have n(n−1)2\frac{n(n-1)}{2} pairs, 45 pairs for 10 assets, and every pair has estimation error. Optimisation is especially sensitive to them: two assets that really move together look like hedges for each other if the sample correlation comes out a little low, and the model buys both. So betashell pulls every correlation some way towards the overall average, further when there is less data (shrinkage estimation, in statistics). The method is from Ledoit and Wolf (2004), “Honey, I Shrunk the Sample Covariance Matrix”, Journal of Portfolio Management 30(4): 110–119.

Risk currency

Currency changes risk too. Risk is measured in the currency you actually spend (simple mode’s “Which currency do you live in?”, the Data tab’s “Risk currency”): the same assets show a different volatility to someone living in Taiwan dollars than to someone living in US dollars, and so a different volatility limit. But CAGR has a neat property: after taking logs, switching currency only adds a constant unrelated to the weights, so without a volatility limit both people’s best weights are exactly the same.

The data may be wrong

Finally, all these estimates rest on price data. Quotes and price history come from third-party public market data sources and may be delayed, incomplete or incorrect. The Data tab lists the numbers used this time: each asset’s expected return, volatility and beta, the data period and count actually used, the current quotes and when they were fetched, and the correlation matrix.

Chapter 9Real-world frictions

Trading costs
Every trade costs commission and tax (selling Taiwanese shares also incurs securities transaction tax). betashell spreads the one-off cost over the holding period and subtracts it from growth: for an adjustment that changes little, the growth saved cannot pay for the cost, so the model leaves it alone. Target weights therefore do not ask you to trade often over differences after the decimal point. Your personal income tax, tax on foreign income and transfer costs are not in the model.
Dividend tax
Dividends are taxed, and how much depends on which country taxes you, your income tax bracket and where the holding is listed. For a Taiwan tax resident:
  • US-listed ETFs: the US withholds 30% of the dividends, so an ETF yielding 2% loses 0.6% a year.
  • Taiwan dividends: taxed with other income, they carry an 8.5% credit, so someone in the 12% bracket pays about 5.6% including the NHI supplementary premium, and someone in the 5% bracket gets money back.
  • Irish-domiciled UCITS ETFs (VWRA, CSPX and the like): nothing is withheld on what they pay you, but the US withholds 15% inside the fund when it receives US dividends. An accumulating fund pays nothing out and still loses that tax, so betashell also subtracts 15% × the fund's US stock share × the US market's dividend yield.
betashell subtracts dividend yield × tax rate from each holding's expected return, with the yield averaged over the last two years automatically. If you do not say, it assumes a Taiwan tax resident in the 12% bracket; change it under "Where do you pay tax?". Capital gains tax is not modelled.
Exchange rates
US dollar interest rates are higher than Taiwan dollar rates, so swapping Taiwan dollars into a US dollar deposit looks attractive. The exchange-rate assumption is chosen in the model settings:
  • The default is “interest rate parity”: the higher-rate currency is expected to fall by just enough to eat the rate difference, so betashell does not tell you to change currency for the rate difference.
  • You can change it to “exchange rates do not move”, or something in between.
The cost of changing currency itself is counted in trading costs.

Chapter 10Concentrate or diversify

Chapter 6 showed that diversifying earns more without taking more risk. So why does betashell still let one asset take a large share, and why not simply split everything evenly? Because two forces pull on the formula:

This chapter covers how much conviction staying concentrated takes, and how your own settings push the answer one way or the other. For why an asset is dropped altogether, see “Alpha needed to include” in chapter 6.

Spreading prior

The diversifying in Chapter 6 assumes the expected returns are right. When they are not, optimisation chases whichever assets were estimated highest, and the spreading prior fills that gap. Chapter 7 showed that expected returns are estimated with large errors. So betashell subtracts one more small term from the objective, κ∑iwi2\kappa \sum_i w_i^2 (κ=0.01\kappa = 0.01, called the “spreading prior”): an asset at 30% costs 0.01×30%2=0.01 \times 30\%^2 = 0.09% a year, more the more concentrated it is. It amounts to assuming each asset carries its own independent estimation error, which cancels out when spread and does not when concentrated. The effect is to pull the weights a little towards equal. Loans are exempt: a loan’s rate is fixed by its contract, so there is no estimate to be wrong about, and how much to borrow is left to your drawdown tolerance.

Implied alpha

Chapter 6’s alpha needed to include asks about an asset the model set to zero. The same question can be asked about what you hold:

Both numbers ask “how much more than the model would you have to believe?”; they differ only in which weight they aim for:

Which assetWeight it aims forWhere in the Analysis tab
Alpha needed to include (chapter 6)One the model set to zeroA little above 0Why these weights
Implied alphaOne you hold nowYour current weightDiversify or concentrate?

Locked positions and caps

Two kinds of limit:

These limits move the answer away from the theoretical best, but they are your own conditions and the model follows them. The Analysis tab’s “Why these weights” removes these settings one at a time to show how far each one moves the allocation.

When some positions are locked, the Analysis tab’s “Diversify or concentrate?” also works out how the target weights would change with everything unlocked.

AppendixGlossary

Term中文Meaning
target weight目標比例each asset’s share of net worth as betashell calculates it, chapter 1
CAGR年複合成長率how many times over your money grows per year on average, written gg, chapter 2
volatility波動度the standard deviation of annual returns, written σ\sigma, chapter 2
volatility drag波動拖累the growth eaten by volatility, about half the squared volatility, chapter 2
Kelly criterionKelly 準則the fraction that maximises long-run CAGR, chapter 3
fractional Kelly部分 Kellybetting part of the Kelly share, half Kelly for example, chapter 3
drawdown回撤how far it falls from the peak, chapter 4
volatility limit波動度上限the limit worked back from the drawdown, years and probability you accept, chapter 4
net worth, total assets淨值、總資產your own money; your own money plus borrowed money, chapter 5
break-even rate損益兩平利率above this borrowing rate a loan is not worth it, chapter 5
exposure曝險share of net worth including futures notional, chapter 5
covariance, correlation共變異數、相關係數how much two assets swing together, chapter 6
Black-Litterman equilibrium return均衡報酬the expected return worked back by assuming the market’s weights are the best weights, chapter 7
betaBetahow much this asset rises on average when the market rises 1%, chapter 7
Sharpe ratio夏普值excess return divided by volatility, written SRSR, chapter 7
market Sharpe ratio市場夏普值the whole market’s Sharpe ratio, written SRmktSR_{\text{mkt}}; sets every asset’s risk premium, chapter 7
risk aversion風險趨避係數how many times more cautious than Kelly, λ\lambda; holding all of the market is 1/λ1/\lambda Kelly, chapter 7
spreading prior分散係數a small term subtracted for estimation error, larger the more concentrated, chapter 10
alphaalphawhat you believe an asset earns each year beyond the model’s expected return, chapter 6
alpha needed to include納入所需 alphathe alpha an asset set to zero needs before the model holds it, chapter 6
implied alpha隱含 alphathe extra expected return needed to keep the current weight, chapter 10
statistics proxy統計代理a stand-in price series used to estimate volatility and correlations, chapter 8
uncovered interest parity利率平價the higher-rate currency is expected to fall by just the rate difference, chapter 9

Open the app