Managing Extreme Weights in Betting Against Beta Portfolios
Summary
The document concerns an implementation of the Betting Against Beta strategy that ranks stocks by estimated market beta, shorts higher-beta names, and takes long positions in lower-beta names. The author describes adjusting exposures toward a beta target and finds that a near-zero estimated beta can imply an extremely large multiplier, producing implausible portfolio returns and drawdowns. The beta estimate is obtained by regressing stock returns on market returns.
The response suggests using weights inversely related to asset volatility as a straightforward alternative to scaling solely by beta. It also proposes estimating the selected stocks’ covariance matrix and applying a Markowitz portfolio method, with parameters re-estimated in rolling windows. These are brief suggestions rather than a worked portfolio construction or a test of the resulting strategy. The document does not specify leverage caps, constraints, transaction costs, or how to address unstable beta estimates, so the proposed weighting approaches need further design and evaluation.
Key ideas
- Scaling exposure by the inverse of a near-zero beta can create extreme portfolio weights.
- The described strategy ranks stocks by estimated market beta and takes opposing long and short exposures.
- Inverse-volatility weights are offered as a simpler alternative to beta-only scaling.
- A covariance estimate and Markowitz optimization can provide a more involved weighting method.
- Rolling estimates are suggested so portfolio parameters can adapt over time.
Tags
Full text
# implementation of BAB strategy
# implementation of BAB strategy
I am implementing the Betting Against Beta strategy (Frazzini and Pedersen, 2014). I have some question
What I do: - get historical data through yfinance - calculate beta of each stock - get 5 stocks with the largest betas and 5 stock with the lowest stocks (nothing magical with the number 5; it's just my choise) - short the first group, and long the latter. Holding period is 1 month. - deleverage the first ones (high-beta stocks), and leverage the low-beta stocks to 1.
Where I struggle is that some stocks can have a beta of 0.0015, for example, ie. very low number. So when I leverage to 1, I have to multiply it by a very large number, i.e., 1/0.0015. With this my returns and maximum drawdown get very large, absurdly large :) I don't know what I'm doing wrong. I'm new to this but am eager to learn.
P.S. I understand that yfinance is not a perfect solution, and can have many data issues. Let's not discuss it now please. My problem is totally another issue.
Edit. This is how I estimate betas:
```
def calculate_stock_beta(stock_data, market_data):
try:
stock_data['Return'] = stock_data['Adj Close'].pct_change()
market_data['Return'] = market_data['Adj Close'].pct_change()
merged_data = pd.merge(stock_data[['Return']], market_data[['Return']], left_index=True, right_index=True, suffixes=('_stock', '_market')).dropna()
if merged_data.empty:
return None
beta, alpha, r_value, p_value, std_err = linregress(merged_data['Return_market'], merged_data['Return_stock'])
return beta
except Exception as e:
print(f"Error calculating beta: {e}")
return None
```
## Answer by yusufff (score 2)
https://quant.stackexchange.com/a/79955
A very low beta indicates that the asset's return is not correlated with the market and hence its volatility. I think there a re various ways to solve the weighting issue in this case. The most straightforward one is to give the weigths inversely proportional to the asset's vol. If you want to be more sophisticated, you can estimate the covariance matrix of the selected universe and apply a markowitz approach to create an optimal portfolio. My further advice for you is to estimate all the parameters in a rolling window. You can use RollingOLS class from statsmodels to estimate betas and a simple rolling std or cov for covariance-volatility. Good luckShown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.