Hi, There are some posters mentioning abt beta weight the whole portfolio to hedge. What does that suupose to mean? Also some saying that beta is really inaccurate. What should be the alternative?

As I know the beta is the measure of volatility. A beta of 1 means that if the market goes up by 1, then the stock also goes up by one. A beta of (-1) means that if market goes down by 1, the stock goes up by 1. So balancing the beta of the portfolio with low, medium, high and negative beta in theory can give a portfolio that make good on almost every time. Higher beta are the small-caps Lower beta the blue chips Negative beta I think are inverse ETFs, and maybe others

You can use the slope(..) function to calculate the beta. Beta is additive, so you can just weigh them.

You're using historic beta (e.g. last N days) as an estimate to predict future beta. Hence the inaccuracy.