Software I developed for observing financial markets and why I developed them (part 2) - Stock market internals

Software I developed for observing financial markets and why I developed them (part 2) - Stock market internals
Photo by Ilya Pavlov / Unsplash

This is a continuation of the previous post where I talked about the software I developed for observing stock indices.

Stock indices alone are not representative of a country's stock market as only the big companies with large market capitalization are represented. The vast majority of smaller individual stocks are not.

To give a more accurate picture of the entire stock market, I created this website which shows the stock market internals of the world's major economies.

Stock market internal statistics
Stock market internal statistics 1Percentage of stocks above key moving averages 2Number of securities hitting 52-week high of closing price 3Number of securities hitting 52-week low of closing price
Snapshot of stock market internal statistics (https://market-observer.addvaluedonoevil.com/stock-market-internal-statistics/)

The percentage of stocks listed in the country's stock exchanges above key moving averages(21day, 50day, 200day) are shown in the table. When a stock market is bullish, at least 50% of stocks listed on the exchange will be trading above the key moving averages. I use the 21day moving average to represent the short-term time frame, 50day moving average for the intermediate time frame and 200day moving average for the long-term time frame.

When a stock market is in a strong bull market, more than 50% of stocks will trade above all the key moving averages.  The opposite is true in a bear market. When a stock market is in a strong bear market, more than 50% of stocks will trade below all the key moving averages.

Another metric I use to measure the bullishness of a stock market is the number of 52-week highs versus the number of 52-week lows. Stocks that hit 52-week highs are among the strongest momentum stocks to the upside while stocks that hit 52-week lows are among the strongest momentum stocks to the downside. In a strong bull market, the number of 52-week highs vastly exceeds the number of 52-week lows. Conversely, in a strong bear market, the number of 52-week lows vastly exceeds the number of 52-week highs.

The stock markets of the two largest economies in the world today (27Apr2022) have gone bearish. Here is an example of what the numbers for bear markets will look like.

Stock market internals for U.S and China 26Apr2022 (https://market-observer.addvaluedonoevil.com/stock-market-internal-statistics/)

As of yesterday 26Apr2022, China is in an extreme bear market. Seldom do I see worse numbers. Only a puny 4.62% of Chinese stocks are above the 50-day moving average. 1943 Chinese stocks have hit a 52-week low versus only 7 52-week highs.

Value investors like to hunt in bear markets because that is the time when they can find the most stocks that meet their valuation criteria. Momentum investors like to hunt in bull markets because that is the time when they can find the most stocks that meet their momentum criteria.

Both methods seem to contradict each other but both methods make money. Each of us has to try out different methods and see which one fits us best. As a momentum investor, my personal preference is bull markets, even though I do not disagree when value investors say the best time to buy is in a bear market.

I use these internal stock market metrics to identify bull/bear markets and then react accordingly.


FTX is the crypto exchange that I use the most. This referral code (not mine) offers 10% discount when others are 5% only. If you are keen, please read my FTX review

I use Tiger Broker app regularly because of its user-friendliness. If you are keen to try out, please read my review about Tiger Brokers and sign up if you like Tiger.