Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
To Alpha, or not to Alpha

Q Alpha

@Guy: I understand for illustration purpose the assumption of ± 1% alpha factor.. are there general "scale" for alpha?
For instance, is 0.01 a threshold level compared to, say 0.05 or 0.10 being good, and 0.50+ to be exceptional?

@Karl, the question is almost irrelevant having no real predictability at that level. What would be the alpha on a particular stock in 40 years? I certainly can not answer that. Well, yes I can: I do not know. It might even be nonexistent to outright negative pushing a stock to extinction.
Evidently, it should be the highest possible alpha, even higher than what was presented. This would apply to a portfolio of strategies as well; as I illustrated in the Alpha Vertex thread: https://www.quantopian.com/posts/alpha-vertex-precog-dataset

The maximum alpha on the above chart was 0.10 making it a maximum 20% CAGR. Close to Mr. Buffett's long term CAGR. The range is from 20% down to 1% CAGR in steps of 1%. In real life, these lines would be jagged, but the end points would still hold. There is no lost in generalities by having smoother lines.

Traders don't seem to consider such a chart, but they should. Even in trading the same phenomenon occurs. Traders could compensate, even accentuate this kind of development. Notice that the chart does not say continuous rebalancing to equal weights. On the contrary, it says let your high fliers shine, let them take in all the weight they can.

However, I hardly see any presented code on Q even trying to account for it. They will trade stocks like AMZN, AAPL,..., make a few bucks out of them, but have no provision for keeping them in their portfolios even though it was easy to do so. What I often see in strategies is throwing those few best performers away as if they had no use or need of them. Sure, trading strategies can not do everything, but... throwing away the best makes it that much harder to outshine with the rest.

That chart is something Mr. Buffett understood a long time ago. It is a side effect of having a portfolio of stocks each growing at their respective CAGR rates. The highest of the group will take the lion's share of the returns. We should therefore facilitate its growth and not curtail it.

17 responses

It sounds like what you're describing is momentum. I agree I agree that it's typically not smart to rebalance from your winners to your losers... but sometimes it is. Sometimes that kind of rebalancing is advantageous. Case in point, when a mean reversion force kicks in. If it were simply a matter of allocating your portfolio in proportion to recent returns, then you can very quickly replicate that strategy with pipeline and see for yourself that this premise isolated fails to beat the market average. Returns, alpha, and beta are never consistent through time or easily predictable. Past performance is not a reliable indicator of future yada yada yada...

Warren Buffet's strategy is also a bit more nuanced. He buys companies at extreme discounts that he's checked out and that are in industries he understands really well. So basically he knows it's going to mean-revert. As you say Karl, he knows the real value is higher than the price.

Obviously in a stationary portfolio the best performing assets will grow in relative weight. So it's not clear to me how this applies to algorithmic trading in general, except in specific cases, like for example with momentum strategies where it makes sense. Each case is different and worth investigating. But as per the example, the positions are larger because they have outperformed so far, but not necessarily because they'll continue to do so.

Are you guys referring to alpha as a shorthand for returns, or as it is used on Quantopian -- idiosyncratic returns?

I use alpha as defined by Jensen in the late 60's. That is, as the premium return above market averages. Often referred to as some added portfolio management skills.

A portfolio's expected return can have for expression: E[F(t)] = F(0)∙(1 + r_m)^t which represents some initial capital compounded over time.

In the stock market, r_m is given away, almost free. Buy low-cost index funds, and the job is done. No gurus, no academic papers needed, no programming of any kind, no AI required whatsoever. Simply keep on adding to your retirement fund as you go along, and beyond. It is what could be called an active trader industry killer.

If you look at the Capital Market Line definition found on Wikipedia you have: “This abnormal extra return over the market's return at a given level of risk is what is called the alpha.” This is expressed as: E[F(t)] = F(0)∙(1 + r_m + α)^t. Simply using what has been defined over half a century ago.

Jensen, in his seminal paper, wanted to show portfolio managers' skills as the reason for higher performance. The proposition was simple: if on average there were any management skills, they would show. And then, the following proposition would hold:

F(0)∙(1 + r_m + α)^t / F(0)∙(1 + r_m)^t > 1

However, what he found was a negative alpha of -1.7%. In fact, stating that the average portfolio manager was detrimental to his portfolio's health. You can imagine the uproar at the time. So, to appease the pundits, he later attributed the -1.7% negative alpha to commissions and fees. Nonetheless, it still said the same thing: average alpha contribution, technically zero, not even enough to cover commissions. This is as expected by Modern Portfolio Theory and efficient markets which do put expected alpha at zero. But, markets might not be that efficient!

The capital market line still holds. It is tangent to the efficient portfolio frontier at r_m and has a beta of one. The following chart might illustrate this better:

Capital Market Line

You have the usual CML (upward dark blue) with its risk-free intercept (r_f) and its tangential efficient frontier contact point at r_m. What is above the CML is considered as alpha, as a higher return than what was available from the CML. That you mitigate your return by having some of the assets at the risk-free rate, or leverage the portfolio to reach higher returns than r_m, Modern Portfolio Theory still does not see any alpha generation as long as you stay on that line.

To achieve more, we will have to do more. Alpha is just not given away, it has to be taken, extracted from what is there. It does not need to be a delicate process. It can be as rough as we want or the result of something we did that just turned out that way. Meaning, we could get some alpha and not really know why. But, I expect we would still take it anyway.

We can also get negative alpha, and this is simply underperforming the averages (r_m), the CML or even the efficient frontier. For sure, if you get negative alpha, meaning operating below the CML line, your better choice was, in fact, the index fund thingy. No hassle, no work and higher returns.

Now, if you go for zero-beta hedging by having half of your portfolio long and the other half short, you should get the red line with the Quantopian alpha definition which is, in reality, the return intercept that is very close to the risk-free rate (r_f). If Quantopian wants to define that as alpha, it is their choice. I for one am not changing definition. In the Quantopian alpha, I only see a subdued return that is very close to the risk-free rate.

That the regression line be: r = α + βx, or CML = r_f + β(r_m – r_f), it is the same line.

In clustered hedge trading, what I should expect to get is the differential drift since the hedged portfolio would have for equation: r_h = r_f + β(r_m – r_f) – β(r_m – r_f) + Σϵ, with Σϵ being the sum of residuals tending to zero. There can be a profit only if I make this binary directional bet in the right direction making it a low volatility bet with low returns, but still taking up my time. This is exemplified by the red line on the chart. I can not call that alpha generation.

To have stocks in a cluster, they need to be highly correlated, hence the differential drift is small. But this would still require making a directional bet. All that was done was reduce volatility to such an extent that you are forcing your portfolio to get by below its efficient frontier. You sacrifice return for stability. It is a choice.

Understood the Jensen's Alpha in E[F(t)] = F(0)∙(1 + r_m + α)^t

Suppose that +α can be captured by Q, would the Zero-Beta line not assume the new normal at E[rm] from the Rf intercept?

@Karl, I would say no. This would be like extracting some alpha out of thin air.

The problem is in the two definitions of alpha. Quantopian uses the intercept of a regression line on the return axis while Jensen's alpha is what is above the average market return, an expression of portfolio management skills. The intercept will not change because you change its name.

Maybe I should have expressed this using:
E[r_q] = r_f + β(r_m – r_f) – β(r_m – r_f) + Σϵ = r_f + Σϵ where r_q is the Quantopian expected return.

Take it like this: if you go long r_f and short the equivalent of r_f in some manner, how much do you think you are going to get? I think you would get about the same as: β(r_m – r_f) – β(r_m – r_f).

What has not been shown to my satisfaction in the zero-beta simulations I have seen is: E[r_q] > E[r_m] when all expenses are included: commissions (including minimums), slippage, margin and leveraging fees. This does not even touch the problem of shorts availability when your program wants them.

Hi Guy, this topic has been on the back burner while preoccupied with the intervening risk model and Optimize API.. yet your instructive diagram has never left too far off my mind.

Perhaps the question could be asked better:
If there is an equation for Quantopian's alpha to achieve a Positive Alpha above the CML, what would that equation look like?

@Karl, based on the chart above, I would venture: α_q = r_f, and that's it.

I'm not clear, Guy as to the "portfolio" and "Quantopian Alpha" that you put forward, whether you are referring to:

1) An algorithm's dynamic portfolio that is optimised per Beta-to-SPY by method such as Optimize API or Markowitz's Efficient Frontier in your illustration above, or
2) The Quantopian fund's portfolio comprising a collection of algorithms selected for various attributes to fulfil investment criteria to match their clients'?

@Karl, the red line in the above chart would be the outcome of a zero-beta portfolio. And since volatility is being minimized, you would get close to r_f. In fact, on a zero-beta scenario, you should get something like: E[R(p)] = (1 – β)∙r_f , which is less than the market's expected return E[R(m)].

This is not a Markowitz portfolio on an efficient frontier, but just a compromise that muddles through the Markowitz bullet. In a multi-strategy scenario, it would help dampen a portfolio's volatility, beta, and drawdowns at a cost.

Nonetheless, there are scenarios where this could be desirable.

oic pardon me to have taken the "Portfolio Efficient Frontier" literally as inferred to be Markowitz.. the bullet is indeed uncanny.

I am still lost on what "portfolio" and "Quantopian Alpha" refer to in your diagram - I suppose you intended the terms to be as generic as the equations to be applied generally, not specifically to particular instance, no?

@Karl, yes, the graphic is pretty generic. It starts with the SML (securities market line) that sets a linear relationship in risk-return space. It should be a log curve to show that the incremental return decreases as the risk increases. But, a straight line for a model is acceptable.

You want to generate some alpha, then your interest is in the green lines where you can find some Jensen-alpha. The Quantopian-alpha is simply the risk-free rate. They can call it whatever they want, but it is still equivalent to the intercept of the SML which is the risk-free rate.

You look at a chart like that, and say so what!

I certainly can understand that. It took hundreds of academic papers to be able to draw it. It had to respect all of Modern Portfolio Theory. If you want to build something more, then you have to add it yourself.

The point of interest being: is there alpha or not? Can you generate the green lines?

I say yes.

Academic literature say no, and with cause. Even the CAPM did not provide any space for it: E[R(p)] = r_f + β∙(E[R(m)] – r_f). This equation says: you need a beta greater than 1 to exceed E[R(m)], you need to take more risk. But doing so will push you in leveraging territory. And if you go for a beta less than one. Then, you will underperform, albeit with lesser market risks.

In fact, academics say the most you could expect is: E[R(m)]. It is also your best hope, the “optimum” portfolio. It is therefore understandable why the investment industry does so much work to reach exactly that: E[R(m)]. But, most do not succeed.

Jensen in the late 60's found that the alpha for the average portfolio manager was negative (–1.7%). Meaning that the simple fact of having an outside active portfolio manager was enough to generate less than the expected market averages. That has not changed that much. See for instance: https://www.marketwatch.com/story/dont-be-fooled-stock-picking-is-still-a-losers-game-2018-01-17

As an exercise. Draw a vertical line anywhere on the chart. Your interest should be for the top line (green). Anything below it generates less profits for the same level of risk. You can mitigate risk with an hedged portfolio, but then you have to pay the price for the stability (red line).

Traders ignore these things. They are interested in short-time horizons. It is as if they do not realize that continuously trading short-term will eventually make a long-term portfolio. And then, their outcome, all their work, will have resulted in the above chart anyway.

It is by planning your trading strategy to last, forcing it to produce some Jensen-alpha that you will have a chance to escape the gravitational pull of the optimum portfolio E[R(m)]. If you do not plan for it, it simply will not happen, that you be a trader of any persuasion, using whatever methodology you want. In the end, you will have: E[R(p)] ≤ E[R(m)] which is the same as saying: you could have done better.

Test image: Chart 12 Years

![](<insert link to image>)  # Not yet working for for Google Drive  

Appreciate your thoughtful response, Guy.

I was trying to link an image into the discussion. It is a chart of a (work-in-progress) backtest over 12 years.

To date, this 12-year backtest is the longest look-back view of a trading strategy working out of the alpha engine from an Alphalens-ed idea in mid-2017, using Optimize API that is the Quantopian portfolio optimisation methodology (as distinct from, say the Markowitz, for discussion purpose).

In essence, it says 2 things:

  1. The trading strategy produces an alpha, and one that outperforms the index (that assumes SPY as the benchmark) - it fulfils your "Jensen-alpha to escape the gravitational pull".

  2. The dynamic portfolio that produces this alpha is attributable to the Quantopian Optimize API that inter-alia constrains Beta-to-SPY to near zero ie. solely attributable evidentially, as distinct from the prior trading a "naive beta" method that imposes no constraints.

On basis of above, I think we can agree on the first point ie. 1) An algorithm's dynamic portfolio that is optimised per Beta-to-SPY by method such as Optimize API, and that this portfolio produces an alpha that outperforms the benchmark.

The second point is more of an ideal construct or a mission statement, given no evidence that I can find in public domain:
2) The Quantopian fund's portfolio comprising a collection of algorithms selected for various attributes to fulfil investment criteria to match their clients'

I'd say we can agree that Quantopian should only invest an allocation into a profitable portfolio by a winning algorithm that, in fulfilling the Quantopian Fund's spread of risk-vs-reward outcome, is one among many in a basket of uncorrelated, cross-sectional, multivariate optimised portfolios with common+uncommon data signals.

In that ace-gold scenario that the Quantopian Fund has a basket of winners with alphas all beating the market, my question is why you'd think the α_q = r_f?

Surely.. if one algorithm aces with one alpha, amongst many alphas to aggregate into the Quantopian Fund then the aggregate must be α_q > r_f ?

@Karl, yes, to your last question. Nothing stops you from generating your own Jensen-alpha in your trading strategy. This won't change what Q's alpha is. It will remain: α_q = r_f . You could view α_q as the red line on the chart. It increases slightly with time.

However, your expected portfolio return has changed due to you bringing some Jensen-alpha to the mix. This will be: E[R(p)] = α_q + α which will explain your portfolio performance.

Nice job, by the way.

Here is an easy way to see if there is any Jensen-alpha in your strategy. Look up the cumulative returns on logarithmic scale chart in the tear sheet. If there is any, your equity curve will be on top, and the spread will be increasing.

I see what you are saying, Guy and que sera the evidence is yet out there going forward.

I get the feeling there is the suggestion that E[R(p)] = α_q + α1 + α2 + α3 + αi in the growing collective.

@Karl, yes. You could do that too.

Thank you, Guy be that as it may, I'll ponder if I'm clearer than I was from when this thread began.