We need a risk model

Thank you, Robert. I’m still struggling to understand how, practically, to measure factor-based risk and what exactly it means. I did read the two PDFs, but I got lost halfway through the second. They didn’t clarify that question, because they didn’t provide an example of how it’s done in the equity space.

I’m fuzzy about the basics. For example, if each factor has a time series that one regresses against, is it a time series of the long-short portfolio formed according to that factor? I couldn’t find any discussion of a long-short portfolio in those two papers. Also neither paper addressed the question of persistence at all.

There was another explanation I read of risk-based factors in Alphanomics, a book by Charles Lee and Eric So which I reviewed on our blog. Unfortunately, I no longer have a copy of that book. I wrote,

Lee and So then take on the idea that abnormal returns (pricing anomalies) are a compensation for risk factors. This doesn’t fit with empirical observations. There is a great deal of evidence that “healthier and safer firms, as measured by various measures of risk or fundamentals, often earn higher subsequent returns. Firms with lower beta, lower volatility, lower distress risk, lower leverage, and superior measures of profitability and growth, all earn higher returns.” In other words, these companies all appear to be less risky than comparable companies.

If I were to design a factor-based risk model, maybe I’d put minus signs in front of some of the betas rather than putting plus signs in front of them all (in Barra p 6, equation 1-2). Maybe I’d leave the plus signs in front of size and growth and put minus signs in front of low volatility, quality, and value, since those factors all diminish risk (obviously, high-volatility stocks, low quality stocks, and overpriced stocks are riskier than their opposites). But I’m probably misunderstanding what’s going on.

To be clear, I would never argue against the idea that we should offer some sort of factor-based risk measurement on our site. Personally, I’m extremely interested in a way to measure 4- or 5-factor alpha, because 21-day volatility as measured by 4-factor alpha has been determined to be one of the best factors in the non-US developed market (see The “Factor Zoo”: Some Thoughts on “Is There a Replication Crisis in Finance?” - Portfolio123 Blog). So any tools developed along these lines would be terrific not just for you and for other Portfolio123 members but for me personally as well.

To conclude, I’m determined to eliminate my confusion about all this. I hope by this time next week, I’ll understand it all perfectly. Please don’t feel obliged to help me–I know some others who can do it too. But I did want to thank you for trying to help and to explain where I’m at right now.

This is very much a for what it’s worth comment. When reading the discussions on factor attribution I have always thought about how much it looks like Principal Component Analysis where the factors are the components and the coefficients the betas.

Looking at the PCA article confirms the memory jog as it has:

Quantitative finance[edit]

See also: Portfolio optimization

In quantitative finance, principal component analysis can be directly applied to the risk management of interest rate derivative portfolios.[54] Trading multiple swap instruments which are usually a function of 30–500 other market quotable swap instruments is sought to be reduced to usually 3 or 4 principal components, representing the path of interest rates on a macro basis. Converting risks to be represented as those to factor loadings (or multipliers) provides assessments and understanding beyond that available to simply collectively viewing risks to individual 30–500 buckets.

PCA has also been applied to equity portfolios in a similar fashion,[55] both to portfolio risk and to risk return. One application is to reduce portfolio risk, where allocation strategies are applied to the “principal portfolios” instead of the underlying stocks.[56] A second is to enhance portfolio return, using the principal components to select stocks with upside potential.



PCA is an interesting topic. If ahead of time you knew which ETFs you were going to hold --rather than shooting for a factor loading–PCA might be something to try, I think.

Anyway, stepping back from any judgements about its use here at P123 it is a great topic.Below are the principle components of XLE, XLU, XLK, XLP, XLB, XLY, XLI, XLV, XLF, VGLT, GLD.

So again, I am just saying this is a great topic without any comment on whether or how anyone might use this.

Authors try to name the components in the literature. So, PC1 would almost certainly be named “the market” (because they always call it the market in the literature) and just varies with the movement of the market. It accounts for the most variance. Notice the Bond fund (VGLT) is negatively correlated with the market and GLD has a low correlation.

What is PC2? So I am going to call it “risk off” I think. Others can try their hand with their own names of PC2 and the other components.

Notice the negative values and the extreme values for some of the principle comments. This gets extreme after PC2 but the negatives (perhaps to be shorted) are small for PC1 and PC2.

It would not be the worst portfolio in the world to use the first 2 principle components weighted by the amount of variance they explain. This would be a sound portfolio if historical volatility and correlations persist. Maybe just ignore the negative weights (i.e., don’t bother with the small shorts).

If you wanted to minimize your variance you would weight PC1 and PC2 to have equal variance in your portfolio.

PC1 and PC2, historically should be totally uncorrelated (i.e., orthogonal). So weighting to equalize variance contributed by each should minimize your overall variance.

There are ways to try to shoot for a certain amount of variance PERHAPS. I have not tried that with PCA. Actually with orthogonal vectors I think the math could be done on the back of an envelope—so, you should be able to shoot for a particular volatility in your portfolio using PCA. I use the word too much but it would, in fact, be trivial.

But Rich, I think we should keep in mind your broader initial point which is excellent I think. All of these methods are based on the same math and correlation matrices. This is reminiscent of what Korr123 is suggesting, I think, and it is no coincidence. Thank you for pointing that out.

And the amount of variance each component accounts for:


Edit: Portfolio Visualizer has been pretty thorough and has quite a few methods including some of what Robert and Rich are suggesting. You could probably get some ideas there.

Riccardo is actively working on this already? He could interact on the forum or reach out to Robert and/or Rich. I assume Riccardo has some understanding of this already (his degree alone would suggest he might have some understanding of this, as well as his expressed interest in working on this at P123) and we would not have to start from scratch that way.

In any case, Riccardo could become actively involved in interpreting for P123 what Robert, Rich and others (at different times) have already articulated well, with good depth, with references and which can be found to be already working at Portfolio Visualizer. He could work with anyone else at P123 involved with the project on the decisions about what to implement if those decisions have not been made already and you remain committed to the idea of a risk model at P123.


What if we developed a totally different type of risk model? I don’t claim to fully understand the process but it seems like we are looking for things like correlation and beta between basic factor models and our own custom portfolio. And then we figure out a way to lower the correlation of the two with custom weighting of holdings within our portfolio.

I struggle with this approach on a basic level. This is the technical analysis approach which says all we need to know is found in the price action. But is this the best approach?

Suppose you want to lower your risk to momentum stocks (either high or low). You can do this in many ways. The technical approach could be as simple as mixing 50/50 high momentum and low momentum stocks. The equity curve will likely not look like high momentum or low momentum because you mixed them. But that is exactly what you have inside. You are 100% exposed to the momentum factor. Of course, you could also run the correlation matrix on individual holdings as well.

The fundamental approach would be to rank stocks based on momentum and remove individual stocks with an extreme ranking either high or low.

It seems to me that we are adding in too many steps. First, Fama and French create simple factor portfolios to discover market-wide factor premiums. These portfolios spit out a time series equity curve. We compare our equity curve to the Fama French one and compute correlation and beta and so forth. Then we mix and match assets to lower our exposure to that factor premium. Why not measure that factor directly? Why create a some massive average and then compare ourselves to that average when we can measure the factor directly?

I don’t know that defining a stock as being ‘value’ or ‘growth’ or ‘momentum’ simply by comparing its price action to some broad composite is the best way to define it. If someone really wanted lower exposure to value, why not measure this directly using a value rank? This is one way it could work.

We create a portfolio in P123 in the Russell 1000 index. P123 spits out aggregate portfolio ranks based on value, growth, low volatility and so forth. If there is a score we don’t like, P123 can suggest some changes. It can filter out some of the highest factor ranks. It can suggest adding stocks with lower factor ranks. If we want to neutralize the factor premium, then our average factor ranks should be close to 50 out of 100.

I would be in favor of a more direct approach to limiting certain factor exposures if this is what is desired. But just because a value stock has low correlation to a broad portfolio of value stocks does not mean it you don’t have ‘value stock risk’. It just means it is trading differently than a broad portfolio of value stocks.


I am not sure what you suggest would be for me but I am not against it. Let’s do it!

A few things.

There might actually be some research on this.

The method allows a member to basically look inside an ETF for weighting a portfolio. Actually both Robert’s and Rich’s methods allow for that. Something that is clearly not missed over at Portfolio Visualizer. I will not muddy the debate by saying there are other methods that could be looked at over at PV. Some that I use personally and some that are simpler.

But for sure I like an algorithm that can easily include ETFs in the portfolio to add diversification that way.

TL;DR. Good idea but “apples to oranges” and “don’t let the perfect be the enemy of the good” might apply.

These are pretty accepted methods and we all have access to these methods-as well as other methods–at Portfolio Visualizer for those who have already looked at the research and have already made up their minds. While we debate this at P123.


Curtis, I encourage us to understand a risk model before we try to build a new version.

As a thought experiment to address to your idea, if you are 100% long and 100% short but the beta of your longs are 2 and the beta of your shorts are 1, what is your exposure to the market? What if, in a separate thought experiment, the universe of securities are equally distributed to have a beta of between 1 and 2 but your 100% long portfolio filters stocks to select ranks of beta = 50. How much do you expect your portfolio to rise or fall when the overall market rises 10% or falls 10%?

Now, consider something other overall market exposure and see what you come up with.

Consider what a P123 rank is. By itself it tells you nothing of your returns. P123 portfolios don’t rise and fall because of ranks - it does so because those ranks equate to price action. This platform excels on easy and fast quantitative fundamental research but lacks the tools to translate that into future returns and risk. We are left with simulation summaries, only.

Regardless, we are able to do what you want with the current tools, I think. Filter your portfolio holdings using Rating(“Your ranking model”) and filter the ranks you want to avoid. Could be a decent solution though I think Yuval has been saying for some time, your value formula, as one factor example, determines your excess return - and I’m suggesting the sensitively of those securities to market wide value factor is your value risk (i.e. factor loading).

I believe letting us determine that risk factor, for many reasons, is better at this stage than leasing one or having the same for all P123 customers.

@marco, it sounds like at least (edit) 2 of us would be willing to commit time to create an risk model MVP. Will P123 commit to a release?

I guess my issue is how you define factor loading. If we are doing thought experiments, suppose I select value stocks which are actual value stocks based on P/E or P/S or P/B. Suppose they trade with low correlation to the aggregate value premium. So my value stock is not a value stock? Or suppose that a glamor stock trades very similarly to the price action of a value factor. Should we say that the glamor stock has value risk even though it has no real value to the stock?

Why are we indirectly measuring value stocks by first converting them to a aggregate price series, then comparing value stocks against the aggregate and measuring that risk?

At the heart of this issue is beta. You asked what you get when you have higher beta? It all depends on what school of thought you belong to. We have custom weighting now and with some jiggery-pokery (technical term) you can play around with volatility weighting. But is beta a proxy for actual leverage where 2 Beta trailing translates into 2x the forward returns?

We used a risk model when I was on a project at ClariFi. It seemed like we were simply mixing and matching trailing price returns until we get something that looks dissimilar to some value index and other factor indexes and then we claim unique alpha. All it ever did was water down our best ideas and lower returns into some over-diversified hodge-podge.

It just feels too abstract where we make indirect observations of something to infer its risk when we can directly observe something from the beginning. If I want to know my value risk, I look at the value ranks of the holdings. Whether or not it trades the same as thousands of other value stocks is not what I am interested in. If value stocks become out of favor, chances are mine will too. But if I am holding a glamor stock that is trading with high correlation to a value index, and value goes out of favor, I don’t assume that my glamor stock will go out of favor.

I am not against building a risk model for those who want it. But if there are limited resources for building new tools here, I think we need be sure that there is a market for it and it will be useful for a wide swath of users and profitable for P123 to program. That’s all. I don’t like or use risk models but others might and see value in it.


I will let you and Robert debate how you do shorts of stocks as I cannot short much in my SEP-IRA anyway…

But you do manage risk correct?

I forget the details but like 5% gold, some bonds etc. at one time? Sounded conservative and reasonable at the time whatever the details where.

Just an open-ended question with no debate. How do you manage risk? And what is the theory behind how and why you do it if it has nothing to do with correlations which you seem not to like so much today?

Serious question that I will probably learn from. And you might generalize if you can. Since P123 does not need a risk model how should one manage risk at P123?


I manage risk by creating a suite of models which are fundamentally dissimilar. Not just in holdings but in underlying strategy. Correlations will come and go. But if I am deriving returns from a different source, my risk is diversified even if the trailing price returns look similar for a while.

I don’t mean for this to be a debate by any means. By all means use risk models and many people find it useful. I am just of a different school of thought. If 50% of P123 users want a risk model and will pay for it, then by all means it should be made. I am not one to stand in the way even if I am not a user.


Thank you. I might not use a P123 risk model either. So I will step back a little too.

But I have complete respect for what Robert and Rich are saying mathematically.

If, as Marco and Yuval have said, Riccardo is working on a risk model I cannot argue with soundness of their math. What they say should be considered if P123 decides to do some risk models, I think.

But yeah. I use something different and I do not really want to talk about it. So I get your side too. I am not tied to one model risk model if P123 does want to move forward on this.

The math should be right and someone with a finance degree should recognize it I think. Maybe just me on the last.


Yes. Even though it sounds more and more like it’s something only institutions can use to deploy large capital. Let us know if you are an institution and want this built in P123.

PortfolioVisualizer (PV) is a great guide to zero in what tools we need and clear out the noise. Maybe we can buy/license the algos (or enlist some of the students that use P123).

From what I can tell, we need the following PV tools

Risk Factor Allocation
Rolling Optimization

Several things are still fuzzy. The way forward I think would be a separate thread(s) to discuss implementation details, dissecting PV tools, and come up with MVP features.

This thread can remain for debates, theory, etc.

Marco, I have started a new thread with one addition recommendation from PV, FWIW-Jim

1 Like

“…Even though it sounds more and more like it’s something only institutions can deploy using large capital.”

I can’t figure how large amounts of capital is the driving characteristic requiring a risk model. My thinking is your remark can apply to anything on P123, simulations, screens, ranking, etc. so why are you delineating factor risk management as an institutional need when factor alpha research and deployment isn’t?

I’m trying to understand the large degree of hesitation here. My suspicion now is that no one wants to see evidence that their excess returns are well known risk factors. Please prove me wrong.

How do I create a working group or whatever is needed to keep this thread for things you described? I’ll try to show you an MVP risk model and work collaboratively. And yes, I believe you are correct with what P123 can lift from PV. FWIW, I think P123 can rather cheaply do way more than PV can by virtual of it’s current tech stack.

Our P123 models for example are easy to follow by anyone. Some have very low turnover, some not, but not excessive. They are made up of no more than 30 stocks, so even w/o fractional shares they can be followed with small amounts. And no shorting, so ok for retirement accounts

Doesn’t risk management by loading risk factors involves exposures to hundreds of stocks, long and short. Or how else do you do it?

On this thread I’m coming to the realization that perhaps we just create the infrastructure (API, components) and just do minimal tweaks the the UI

As far as where to start doing practical specs I’ll start a thread called Risk Model MVP and put a link to a shared google folder where the latest agreed upon spec will reside. It will be open for edits, comments, etc.

Sound ok?

Yes, it sounds OK. Thank you!

“Doesn’t risk management by loading risk factors involves exposures to hundreds of stocks, long and short. Or how else do you do it?”

It doesn’t. I will show you a very detailed walk through on how it’s done via an excel file and explanatory pages.

I think I may have not explained how risk factors work, and jumped ahead saying we need one, thinking users knew the fundamentals. They are betas. This was Hemmerling’s criticism; he believes what a risk model says is beta, should not be of concern. My initial request on this thread was that even a user like Hemmerling could very well want to create a ranking system that studies the alpha movements of stocks, only. What is beta and alpha can be left to a user.

Re changes to the user interface, I don’t think you need to do anything other than very minimal UX work as my original proposal doesn’t require it.

I suspect it will all become more clear once you see how these risk factors are calculated and used.

Thank you again.

What I have so far is in this folder. Ask us to become an editor here or via email. I have already added contributors to these threads

I identified key enhancements, and added some specs for Risk Parity.

Let me know if any terminology I use is incorrect.

Thank You


1 Like


I do think this project should go ahead even if I won’t use it. By concern though is not about betas. It is more that I don’t believe trailing correlations between my portfolio return and some other market wide aggregate shows risk. Or explains returns. There are AI tools which can mimic portfolio returns using totally unrelated assets with different risk profiles. You could possibly blend bonds together to get a highly correlated return to some microcap index. But neither one carries the risk of the other.

If I was to develop a risk assessment model it would look at disaster scenarios along with the probability of the scenarios actually happening. Things like sky-rocketing inflation, recession or stagflation. Market crashes. Nuclear war. As many of these real-world risks as possible. The amount of risk management would need to be weighted by the likelihood of such an event. And the likelihood of events is always changing. As well as the severity. The risk that one of my portfolios might trade similar to some factor index isn’t really a big enough scare for me to change my underlying strategy. If I knew that the factor based index was likely to blow up with other factor indexes doing really well….then maybe.

The factor based risk model falls short of analyzing true risk for me. It might tell me if my portfolio return had some similarity to some aggregate value portfolio. But what is the risk? Is the risk simply that my portfolio might trade somewhat similar going forward to value stocks? Without actually knowing the factor characteristics of the individual stocks, I cannot say. Correlations come and go. As well, is it bad to have a model tilted heavily towards value? I don’t know the future. Maybe that is the best possible thing I could do. I am of the school that I should create the best possible value model, the best possible momentum model, the best sentiment model and so forth. And mix them. Each model will be super correlated to a certain factor and that’s by design.

I think that if I was a buy and hold investor with the goal of super diversification then maybe I could see the case. But in the matter of what I do, I am more worried that my model will fail because there is a flaw in my logic or that I am looking at correlations and not causations. My models will usually fail not because the stock is trading more like value or growth. It is because the strategy was designed poorly and the supposed alpha was data-mined in the first place making it fail in the real world.

But I reiterate that I do believe this tool should be made. It is just not something which I can find a use for. Using the Effective Number of Minimum-Torsion Bets might be closer to something I would use. Maybe. Risk Budgeting and Diversification Based on Optimized Uncorrelated Factors by Attilio Meucci, Alberto Santangelo, Romain Deguest :: SSRN

We’re not talking about “trailing correlations” but about trailing alpha and beta, which are related to but not equivalent to correlations. As someone who pays a great deal of attention to market beta, I feel a need to come to its defense. Beta quantifies “market risk”–the portion of risk that’s related to the market. That’s an essential concept, in my opinion, when managing a portfolio. How much of the risk that your portfolio takes on is market risk? To put it another way, how likely is your portfolio to crash when the market crashes? In my experience, market beta is one of the most persistent of all portfolio measures. It’s very hard to find a portfolio with a high market beta that will later have a low market beta, or vice versa. Moreover, it’s easy to design a portfolio with high or low market beta by using share turnover as a major factor. Another great advantage of market beta is that it has an inverse correlation with market alpha, and market alpha is a more reliable tool for measuring a portfolio’s success than almost any other tool out there.

Whether combining market beta with other betas will be valuable or worthless is an open question for me, and one I’m looking forward to exploring. The easiest solution, in my opinion, might be to introduce multiple linear regression, which is a logical next step from LinRegXY. One could then create various aggregate series and explore regressions to them.

Maybe we should use a different term than “risk” for a lot of this. I am never going to be comfortable with calling a low-volatility or a value beta a “risk factor.” And I agree with you that having a ranking system with size and value factors in it makes a linear regression to a long-short portfolio based on size or value seem somewhat redundant. But in general, I feel pretty upbeat about the possibilities of linear regression of returns.

Thanks Yuval and Rich,

I just want to add that Rich’s comments (principle component analysis or PCA above) tie in well to what Yuval is saying, I believe.

Historically at least (things could change going forward for sure), PC2 or what I called “risk off” above should have close to zero “market beta.” An interesting thing as Yuval correctly points out I believe.

I will probably be looking at PCA a little closer this weekend: trying to learn a little more about how this fits into portfolio construction.

I am not sure that weighting PC1 and PC2 according to the “variance they explain” is not a good (and very simple) idea for keeping your returns high while reducing your exposure to “market beta.”

A market-neutral portfolio could be constructed and that would be just an extension of this wouldn’t it? None of this is new or unused or even not-previously-discussed In the forum.

A lot of people In the forum hedge and use short positions. A lot of professionals hedge or use short positions using the concept of beta, Black-Scholes formulas for options etc. Not a single new or radical thing here!

I think we just keep ALMOST rediscovering what is done in finance all the time here in the forum. And at the end of the day decide to be “unredeemable luddites” as de Prado has called us (maybe a joke by him, I can hope).

For sure using PCA to weight your portfolio is a little more well-reasoned that just adding bonds in a 60/40 or 85/15 ratio. At least with the ETFs included in the above example, PCA takes into account the weights of XLP, XLU, GLD etc in creating the “risk-off” portion of the portfolio.

To reiterate PC2 is completely uncorrelated or “orthogonal” if you want to pretend (like me) that you really understand this. Actually, if unlike my wife and daughter you can visualize Cartesian coordinates-my daughter is great at statistics but some people simply cannot visualize it—“orthogonal” is not so complex. Sadly, I have trouble visualizing more than 100 dimensions :worried: Actually meant to say we all struggle with this as part of our human nature.

The PCA analysis above does not overweight bonds too much (less than 60/40 for sure) although one could reasonably ask whether bonds belong in a portfolio at all.

I would argue that the question of whether bonds belong in a portfolio goes away if you leverage the bonds up to the same expected returns (expected value) as equities. Then the question just becomes how much and whether you want to try to time that.

Anyway, nice (both of you)!

BTW, I get that I am still not up to speed with Korr123 on this and my points are probably “orthogonal” to what he is trying to express. In that regard this may have nothing to do with what he is trying to accomplish and is not a direct comment on any of that. That having been said, Rich’s and Yuval’s points can be useful, I think.