How do you measure portfolio risk

I'm interested in how to measure risk at the portfolio level. Would be interested in how people approach this. I want to understand what the portfolio risk is, excluding the wider macro risks (e.g. interest rates, market crash etc.).

Some examples of what I mean:

  • Sector / industry concentration: do you track weight by sector? Do you use P123’s classifications, or your own themes?
  • Country and currency exposure: do you look at where a company is listed, or where its assets and revenue actually are?
  • Correlation clusters: do you check whether names in different sectors or countries actually move together?
  • Risk contribution: do you look at each position’s share of portfolio volatility, not just its weight?
  • Factor exposure: size, value, momentum, beta, or sensitivity to things like commodities, rates or the dollar?

What tools / approaches do people use.

I use P123's subsectors and track those weights. I hedge my currency exposure with futures, and I look at where the company primarily trades, not where its domicile is. I look at every company's correlation to its subsector, and weight them accordingly, except in my short systems, where I look at the companies' correlation to the other shorts. I don't look at my positions' share of portfolio volatility, nor do I look at factor exposure except through my ranking system, which (obviously) rates companies on various factors. I'm not going to claim that any of what I do is better than what other people do along these lines, but it helps me sleep at night.

If you don't mind,

how is the subsector correlation calculated?
then how do you translate that into a weighting?
and what is the max weight per subsector you allow?

thanks

max(0,correl (5,104,#subsector))/fmedian("correl (5,104,#subsector)")

In Excel, I use the following formula: =IFERROR(MIN(1,AR$27/(SUMIFS(P$2:P$400,K$2:K$400,K2)/(AVERAGEIF(P$2:P$400,">0")))),1)^L2 where AR$27 is a number between 3 and 7, column P has the dollars I've invested in each stock, column K has the four-digit subsector code for each stock, and column L has the correlation whose formula I just gave you.

That's determined by AR$27 in the formula above, and it depends on universe size, among other things. Try a number that's 0.1% of your universe size: if you have 3,000 stocks in your universe, try 3, and if you have 6,000, try 6.

Very interesting, thankss for sharing..

To keep execution fully naitive to P123 rather than adjusting weights externally, I take a slightly different approach: I apply a dynamic subsector buy cap based on relative correlation..

SubSecWeight < (30 - 10 * Bound(Max(0, IsNA(Correl(5, 104, #subSector), 1)) / Max(FMedian("Correl(5, 104, #subSector)"), 0.001), 0, 1.5))

In plain English: it applies a sliding subsector cap between 15% and 30%. The more a stock behaves like a generic subsector proxy relative to the market median, the tighter the cap becomes; the more idiosyncratic it is, the higher the cap goes (up to 30%).

Hi! I've built a free risk model for the P123 community, feel free to check it out if you're interested!

Hi Carlos,

... any reference I could consult about your 'Free Portfolio Risk Model' the inside of it?

... is it similar to the approach Barra or Axioma (now MSCI) uses for risk management (see BarraOne | MSCI)?

... how is the tool implemented with and around Portfolio123?

Thanks, Pierre

Hi Pierre,

You can find a description of the Risk Model on the website. Basically yes, I based myself on the Barra Risk Model with some custom adjustments and some custom factors!

Interesting thread. Here’s my two cents. Macro is hard to separate from portfolio risk, even if you set rates and crashes aside.

Macro / regime layer. I use a simple risk meter (see picture) to judge the overall environment. I keep it deliberately loose: a few broad inputs and coarse thresholds rather than anything finely tuned. Every crisis is different from the last one, so a model built to catch every past drawdown will mostly be fitting noise. Some signs do repeat across most stress episodes, though. My goal is to catch the majority of them reasonably well, not all of them perfectly. I’m willing to miss some events and accept some false alarms in exchange for something I expect to keep working out of sample.

Diversification by geography and size. Most of my risk control comes from not depending on one market:

  • USA, both large and small/micro caps
  • Europe, both large and small/micro caps
  • Canada, which I’ve found the most challenging: the universe is smaller and leans heavily toward resources and financials
  • APAC, which I’ve recently started exploring and launching my first personal model.

These markets don’t always move together, and large and small caps often behave differently within the same region. However in real crisis correlation could go up around 0.8 easily. That gives me more real diversification than spreading positions across sectors in a single market, although I also keep an eye on sector diversification within each strategy, so no single sector dominates.

Ranking system level. Within each strategy, the ranking system handles much of the factor-side risk. Many different parameters each do their own job, so the portfolio doesn’t end up depending on a single factor or style.

Hedging (work in progress). For my US strategies, I’m currently testing which hedge actually helps:

  • buying puts, along the lines Yuval has described
  • not hedging at all, and relying on the regime layer and diversification
  • a simple inverse instrument on the Russell 2000 or other ETF
  • other instruments as a diversification (gold, short bonds, biotech ETF...). In fact, I am and investor on that and in the following.
  • Special Situations (M&A, liquidations.., and selling risk = options in well now stocks from my part)

So far I’m still digging and haven’t reached a definitive conclusion in terms of hedging. Each option has a different cost profile and behaves differently in a fast crash versus a slow grind down.

I won’t claim this is better than what others do. It’s a framework that keeps me from being too exposed to any single market, factor, or scenario.

What a day yesterday was... pure AI bloodbath. It really brings Warren Buffett's quote to mind:

"Only when the tide goes out do you discover who's been swimming naked."

"It’s tough to make predictions, especially about the future"
-Yogi Berra

But it might be fair to say AI/Tech is in a crisis state now. One Hidden Markov Model (HMM) would say so anyway:

For those interested in the persistence of that state here is the transition matrix which is diagnonally dominant, meaning each state is likely to persist:

The positive predictive value for a single day is weak. This model says we have a 47% chance that XLK with be down today for example. Not much better than a coin flip,

But from Claude:

Disclaimer: I hold a small mount of XLK and I am not sure that I am going to move out of it. Some of this was just to learn about HMM models and maybe where to apply them in the future. Not necessarily here. But I do find this interesting.

Addendum for all 9 of the SPDR ETFs (1.91x would mean 1.91 times as likely):

Brier Skill Scores for WFA:

ETF BSS (binary) BSS (iso pcrisis)
XLF 17.5% 23.0%
XLY 2.5% 7.7%
XLU 4.5% 7.2%
XLE 4.6% 5.9%
XLK 2.9% 4.2%
XLV 1.4% 3.8%
XLP 0.1% 3.9%
XLI 1.0% 2.8%
XLB 0.8% 2.3%

I asked Claude for some general idea of how good this skill level (BSS) is:

Hmm…….Then again, I might use some version of this to reduce tail risk.

I'm quite confident we should use separate tools to address these two concerns.

The HMM transition matrix is an interesting way to frame regime persistence, though a 47% single-day downside call on XLK is basically noise—the diagonal dominance matters more for horizon than direction. Your BSS numbers tell a clearer story: 17.5% for XLF versus 0.1% for XLP suggests the model has real signal in some sectors and almost none in others, which argues for sector-specific calibration rather than one setup across all nine. On ScifoSpace's point about fast crash versus slow grind, I'd think the persistence property helps more with the grind, while tail hedging handles the gap risk the model can't see coming.

Hey Yuval, i have a question about your short systems because I've been trying to develop my own recently, and it's incredibly difficult finding a standalone short system that can even break even when backtested through the strong bull market years. (It tends to bleed 6% per year on backtests.) So I was wondering if your short system is purely just a hedge, or are you actually expecting it to deliver positive returns most years?

And are you shorting individual stocks or just etfs?

My short system is a hedge. I do not expect it to deliver positive returns most of the time. I'm shorting individual stocks along with an ETF.

I'm using it because I want to boost my returns with a modest amount of leverage but without the horrible drawdowns that leverage can entail. If I weren't using leverage, or if I weren't concerned about drawdowns but only about absolute returns, I wouldn't use shorts.

The weighting formula is clever: dividing by the subsector average and raising to the correlation exponent effectively penalizes names that move with their subsector. One thing I'd want to clarify is whether the 5,104 window is meant as a trading-day lookback and why the median normalization rather than a mean; medians reduce the pull of outliers, which makes sense for skewed correlation distributions. Also, since the exponent L scales the penalty, a modest change in correlation can swing weights sharply when it's near 1. Do you cap L itself, or let the 3–7 constant do all the work?

Do you also have an overall assessment of Market vs. Sector, and what inputs do you allocate to that HMM? I'm using Mkt Up, Mkt Down, and Mkt Neutral for my HMM with similar sectors, and I'm curious whether you found Normal, Recovery, and Crisis to be better for whatever reasons you used.

Hi,

I want to let you know I used the HMM for a couple of months with no signal and have stopped using it for now. I’m still looking at its performance and at ways to improve the model.

I used hmmlearn with 3 states. It finds the states using clustering (no supervision), so the names are somewhat arbitrary and chosen after the program runs. The states in this model differ in volatility, not just market direction.

“Recovery” is probably not the best name; “volatile with sideways returns” would be better. But notice in the transition matrix that the model never goes directly from normal to crisis, and never from crisis back to normal (transitions of 0.0% in the matrix). There’s always a volatile period before a drawdown, and another after a crisis before returning to “normal” smooth sailing.

That’s interesting by itself, but it also suggests this may work better as a volatility (risk) indicator than as a true directional signal, which is one reason I’m not using it now. I already use risk parity as a sleeve in my portfolio, which provides some risk control, and I find that HMM doesn’t add to that. Basically, I don’t need both. The HMM might work to control risk by itself, but the belt-and-suspenders approach of using both isn’t very helpful in my case.

I use sectors because SPY is too noisy to work. XLK can be in crisis while XLE is doing well, depending on the news headline. The sectors can give low-correlated signals that cancel each other out. XLV, XLP and XLU may also hold up relatively well in a “crisis” and mask the signal if they aren’t separated from the SPY signal.

I hope this helps. I also have real questions about the ability of any market-timing model to improve CAGR or even Sharpe ratios. It may reduce drawdowns, but part of that is just less market exposure: Momentum strategies may reduce drawdowns at the expense of CAGR - #16 by Jrinne

Thanks!

Hi

Two comments:

  1. Regarding market timing, I am looking into market timing alongside other strategies. My objective is to reduce drawdowns while not harming CAGR too much. I've accepted I cannot time the market or hedge and simultaneously improve performance. This I think is because the rebounds are very very strong.

  2. My post here is more around how to measure portfolio risk, e.g. how exposed one is to something. e.g. interest rates, commodity prices, sector risk, country risk. Then I think one can limit portfolio exposure to that. Again, that will likely negatively impact CAGR but reduce downside risk.

Still learning about risk management so apologies if I've got anything wrong. Happy to learn!

I am still exploring and learning. It does seem possible to reduce drawdowns while preserving much of the CAGR and maybe even improving the Sharpe ratio.

The main point of my post would actually be that risk parity could be doing that for me already and that I do not need HMM on top of that. I balance my risk using a sleeve of ETF risk parity alongside my stock models. I select the allocation as a dial for controlling my particular risk tolerance with a focus on acceptable drawdowns: my risk tolerance as well as my wife's. Other people should probably do something different.