~/conor-linkston

← All workProject 02 / 04

R · tidyverse · tidyquant · quadprog · SQL 2025 v2 in progress

FTSE 100 Risk & Portfolio Analysis

My first proper project, built in R to get ahead of a tidyverse module. Ten years of FTSE 100 data (2015–2025), twelve large caps, and two simple long-only portfolios measured against the index. I picked the period on purpose: it covers QE-era low rates, the COVID shock, and the 2022–24 rate hikes, because diversification that only works in calm markets isn't worth much.

Min variance
5.45%
ann. return · 9.99% vol
Equal weight
1.95%
ann. return · 11.75% vol
FTSE 100
1.95%
ann. return · 12.22% vol
Sharpe (rf = 0)
0.53
vs 0.16 index · 0.16 EW

Roadmap

  1. Stage 1Data pull and log returnsDone
  2. Stage 2Risk and correlation analysisDone
  3. Stage 3Equal-weight and minimum-variance portfoliosDone
  4. Stage 4Charts and write-upDone
  5. Stage 5SQLite database: schema and loadingIn progress
Growth of £1, January 2015 to December 2024monthly log returns, compounded
  • Minimum variance
  • Equal weight
  • FTSE 100 index
View as table
monthmin varequal wtFTSE
Where minimum variance put the moneylong-only weights

    What it found

    Minimum variance had lower volatility and shallower drawdowns than the index across every regime. It leaned into defensive, steady names like Unilever, LSEG and National Grid and dropped BP, BAT and Vodafone entirely.

    The more interesting result was the correlation structure. Stocks that looked diversified in calm markets moved together when COVID hit, which is exactly when diversification is supposed to help. The benefit disappeared when it was needed most.

    What I'd flag now, a year on

    The minimum variance weights were fitted on the full ten years and then scored on the same ten years. That's in-sample, so the chart above flatters it. Fixing exactly this problem is what the portfolio engine above is built around.

    The index is the ^FTSE price series, so it leaves out the dividends that the adjusted stock prices include. That makes the gap to the index look bigger than it really is.