Back to Community
Alpha and Beta in Finance

In this short video, Max Margenot gives an overview of alpha and beta in finance. Max gives an intuitive description of market beta and the calculation of alpha and how they interact with finance and in algorithms on Quantopian.

Learn more by subscribing to our Quantopian Channel to access all of our videos.

As always, if there are any topics you would like us to focus on for future videos, please comment below or send us a quick note at [email protected].

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

6 responses

Excellent, thanks Phoebe and Max!

I find these very helpful and informative as well. Keep'em coming! :)

I was playing around with a sort of convoluted way of doing a momentum strategy. Filters stock universe by stocks with the least amount of volatility in their alpha, and then goes long the stocks with the strongest alpha and shorts the ones with the weakest alpha. The hypothesis is that stocks that have exhibited the most consistent alpha may continue to exhibit consistent alpha.

The strategy produces a tiny bit of alpha, but not enough to overcome slippage.

I'm wondering if this line of thought is a dead end or if it is simply too naive as is. Currently uses the most naive version of alpha (does not factor in fama-french, etc. factors).

@Phoebe Foy is there some simple way within a Quantopian CustomFactor to calculate alpha that factors in smb, mom, sectors, etc.?

Clone Algorithm
15
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5c1eaf058810ac4a99abd1a9
There was a runtime error.

High of 63, ending at 38 vs 30. See notes in code, various experiments.
The dramatic increase screening out certain stocks at the bottom end of alphaStd on this line suggests there are some long and/or short dragging things down a lot, maybe filterable in some other way, and therein lies our challenge.
m &= alphaStd.percentile_between( 5, 80, mask=m) It filters more than I expected.
Anyway, hope someone finds something here of interest.

Clone Algorithm
6
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 5c206a5c74323049c07e9a86
There was a runtime error.

Since Alpha is unknown, it is found by using Beta to strip away returns attributed to the market and can be based on a lot of things such as common factor risk, quantopian model risk, etc. Does this imply also that because we can quantify and isolate different market returns via Beta, we are also isolating the risk associated with those returns as well?

@Viridian Hawk @Blue Seahawk Can one of you explain how the &= operator is used in the algorithm code? Are you using it to do a set calculation to make m a big screen?

In &=, the & can be thought of as 'and'. Adding to the mask.. m &= something ... says to further restrict the mask progressively as pipeline is processed.
So the mask (m here) collection of stocks becomes progressively smaller and smaller for each operation on them.
I have the impression that route is important to avoid allowing operations to be accidentally chewing on larger sets than intended, which can then make for nans in the inputs to factors or gaps in zscore, rank, percentile_between, top, etc. So I always use mask=m with those, even if it isn't strictly necessary at the moment, because in future edits it could play a role.
Also then, any m &= something ... line one is using can be commented out in a comparison test to see what effect that has.