How sure are you of a Sharpe ratio?
A back-test reports one Sharpe ratio, but it is estimated from noisy returns. A Bayesian estimate treats the daily mean μ and variance σ² as unknown. It starts from a weak prior and updates it with the data. The normal-inverse-gamma pair makes the update a formula with four numbers. Then you sample the posterior: draw a precision, then a mean, and turn each pair into an annual Sharpe ratio μ/σ·√252. The draws give an interval and the probability that the Sharpe ratio is above zero.
The second half is about many stocks. The best-looking average returns are partly luck, so you shrink them toward the grand mean with the hierarchical rule of the last topics. The test is honest. Estimate on the first half of the years, then check how well each method predicts the average returns of the second half. You will also write your own Metropolis sampler. It is the tool for posteriors that have no formula, and here you test it on a posterior whose answer is known.
- Conjugate update: four numbers (mₙ,kₙ,aₙ,bₙ) describe the whole posterior of the mean and variance.
- Honest error bars: a year of data gives a Sharpe interval so wide that it includes zero.
- Shrinkage test: estimate on the first half, score on the second. Pooling beats raw averages here.
Lab · what's graded
- The Sharpe ratio10 pts
- The posterior update15 pts
- Sharpe draws15 pts
- A credible interval10 pts
- Shrinking means15 pts
- A Metropolis sampler20 pts
- The shrinkage study15 pts