Calculating Alpha and Beta (Revised)

The use of the stock measurements called Alpha and Beta are very popular in the industry as indicators of a stock’s volatility, risk, or relative strength. This tip will show you how you can calculate Alpha and Beta in the NeuroShell Trader.

First disclaimer: the subject of Alpha and Beta measurements is a broad one, and we are the first to admit we are not experts on the subject. Therefore, we will not try to tell you how to “interpret” these measurements. We will leave that to various technical analysis books, for which we have no favorite. If any of our users want to write a suggestion on the topic, we will post it in the “Tips from Trader Users” section of this website. You can also post your suggestions about Alpha and Beta on the User Forum.

Second disclaimer: there appear to be a number of variables involved in the various flavors of calculations we have seen. For example, what period over which to compute the regression involved, what bar size to use, what period over which to compute the change, and even what index to use in the calculations. We aren’t experts in these issues either, but the whole purpose of the NeuroShell Trader, Professional, and DayTrader Pro is to help you decide some of these things. You may discover systems using Alpha and Beta the “experts” have never even dreamed of, so don’t worry about getting the concept exactly right (assuming there is some “right” way). In our example below we used SPY as a proxy for the S&P 100 Index only because SPY is readily available from all feeds. Moreover, we are not claiming that our example is the “right” way or even a “good” way; it is just an example to get you started.

Third disclaimer: some authors use total returns including dividends in the calculations of price changes. We didn’t bother with that in our example. It is harder to get such data and calculate the total returns. However, for high tech stocks at least, dividends won’t be a factor. For other stocks, they may not be much of a factor in today’s volatile markets, anyway.

The basis of Alpha and Beta calculations is a regression line (straight line) drawn through a scatter plot where the percent change in stock price is plotted on the Y axis and the percent change in the index is plotted on the X axis. The slope of this regression line is the Beta and the Y-intercept of the same line is the Alpha. Fortunately, there are already indicators in the Trader which do the regression and then compute the slope and Y-intercept. They are in the regression category and are called:

Linear XY Regression: Coefficient of Regression (Slope)
Linear XY Regression: Y Intercept

All you have to do is set Y to the percent change in stock price, and X to the percent change in index price. In our example, we used monthly bars with a regression period (window size) of 60 (5 years), since that seems to be how some fund managers compute these things. However, we see no reason why you can’t use smaller bars.

You can let the optimizer decide on window size.

If you want the optimizer to find the period over which change is computed, you might want to map both periods of change (one for the stock, the other for the index) to be the same. (See the tip called “Mapping variables in custom indicators”). Otherwise, just set the range of both periods tightly. On the other hand, maybe the optimizer will find better Alphas and Betas when the window sizes are allowed to be different – who knows!

Experiment with other indexes besides S&P 100. We’re even thinking you can use other “standard” stocks (leaders in the field) instead of an index! The ability to change these things is why we love the Trader!

We suggest that you might want to use Alpha and Beta in trading strategy rules, where you buy if Beta >x, etc. You might want to feed them into neural nets, Cluster Indicators, Fuzzy Pattern Recognizer, or any of our neural net add-ons.

Click here to download our example.

Was this article helpful?

Related Articles