LessonThis is a lesson restated in new words. Any figure in it is an example from the source, not this desk's record.

Alpha and beta come from a regression of your portfolio's returns on the market's returns. Beta is the slope. Alpha is the intercept. A steep slope with no intercept is leveraged market exposure. A flat slope is a return stream that is not the market's. Computing the pair on a live book means weighting every long and short correctly, then watching the estimates move. They are a description of a window, not a property the future has to keep.

Why it matters

The cloud of returns slopes up with the index. The right-hand picture is the opposite shape. It can still disappear later. Whatever generates the flat line has its own risk.

The example book is long 100 shares of AVGO, long 100 shares of Apple, and short fewer than 100 shares of Nvidia, a pairs-style mix. Paper accounts in the demo use port 7497. Live accounts use 7496, or whatever port the workstation was given. It wants the return file.

The idea in plain words

A 63-day trailing CAPM regression moves through time. The window is a choice. Around a stop in 2020, the trailing 63-day annualized alpha is poor: the narration puts it near negative 34 percent, and a moment later near negative 30 percent, with beta at 0.85. Further along, beta is 0.65 and the annualized alpha is near negative 50 percent. Across the whole series, beta spends its time roughly between 0.5 and 1, and annualized alpha swings between about negative 50 percent and positive 50 percent.

The path metrics move too. At the end of the particular series, maximum drawdowns print at 26 percent and 33 percent. Compound growth sits between 13 and 15 percent. Sharpe ratios run from about zero to barely 0.8, while Sortino ratios, which focus on downside variation, get up toward 1.2. Those ranges are the point of the slider. A single end-point number hides the fact that the same book looked different in 2020 than it did later.

The interpretation they want is about drivers. An average beta above 0.5 means that when the market falls one unit, this book tends to fall by a large fraction of that unit. In a crisis, assets that were merely correlated often move together more tightly, so the beta you measured in a calm 63-day window can rise when you most dislike it. An alpha that oscillates inside plus or minus 50 percent, and averages near zero, is not a significant residual edge in this example.

How to use it

Build the return series from positions, not from a watchlist that ignores shorts and share counts. Regress it on a market proxy. Read the slope first. Then read the intercept as a leftover relative to that one factor, and do not promote a noisy leftover into a permanent edge. Change the window on purpose. A 63-day alpha and a one-year alpha compress different histories. Compare drawdown, CAGR, Sharpe, and Sortino along the path so a single calm year does not become the identity of the book.

Update the file when the positions change. The script's job is to avoid a hand-maintained spreadsheet that forgets the short.

What usually goes wrong

Regressing the market on itself and celebrating a perfect fit. The lecture's earlier notebooks hit that mistake in other demos. Ignoring the sign of a position, so a short looks like a long. Treating a 63-day alpha of negative 30 or negative 50 percent as a stable skill estimate, or treating a spike toward positive 50 percent the same way. And assuming today's beta is the beta you will have in a crash, when the lecture says the number is likely to increase as correlations tighten.

Questions people ask

What does a beta of 0.85 mean in the 2020 window?

In that trailing 63-day regression, the book moved with the market but not one-for-one. A beta of 0.85 says a market move showed up as about 85 percent of that move in the portfolio, on average, inside the window. It is not a leverage figure above one, and it is not a forecast.

Why did alpha swing from roughly minus 50 percent to plus 50 percent?

Because the estimate is a short-window annualized intercept on a three-name book. The lecture's conclusion is that the swing is large and the average is not a demonstrated edge. Annualizing a noisy 63-day leftover makes the percentage look dramatic.

Do you need this specific broker to compute alpha and beta?

No. The script automates positions at that broker. Any return series with honest weights can be dropped into the same regression against SPY or another proxy. The definitions of slope and intercept do not depend on the software.