Sub topic 1
What a Stock Market Index Is and Why You Would Track One
Prerequisites
This chapter assumes you know what a share is, can read a percentage return, and have heard of index funds and ETFs. The code uses Python 3.
What an Index Does
A stock market index is a list of companies with a rule for how much each one counts. It produces a single number that rises or falls with the group's combined value. Providers such as S&P Dow Jones Indices and MSCI publish indices so investors can measure a market and buy a fund that copies it.
Tracking an index means holding roughly the same companies in roughly the same proportions. A passive fund does this without paying analysts to pick stocks, which usually keeps costs low.
How Market-Cap Weighting Decides What You Own
Most major indices weight each company by its market capitalization, which is share price times shares outstanding. A company worth 900 billion counts three times as much as one worth 300 billion. Large companies therefore dominate the index.
Free-Float Adjustment: Counting Only Tradable Shares
Providers usually count only the shares that public investors can buy. Shares held by governments, founders, or other companies are excluded. A company with a free-float fraction of 0.5 has half its market cap counted.
companies = {
"AlphaCorp": (900, 1.00),
"BetaBank": (400, 0.80),
"GammaEnergy": (300, 0.50),
"DeltaRetail": (200, 1.00),
}
float_caps = {name: cap * ff for name, (cap, ff) in companies.items()}
total = sum(float_caps.values())
weights = {name: fc / total for name, fc in float_caps.items()}
for name, w in sorted(weights.items(), key=lambda kv: -kv[1]):
print(f"{name}: {w:.1%}")Developed and Emerging Markets: How Providers Classify Countries
Each provider decides which countries are developed and which are emerging. The criteria include economic size, market accessibility, and investor protections. A country can move between categories after a periodic review. Emerging markets usually carry more political and currency risk.
The S&P 500: About 500 Large US Companies
The S&P 500 covers about 500 of the largest US-listed companies. A committee selects the members, and the index is weighted by float-adjusted market cap. It holds no companies outside the US.
Exercise
A company has a market cap of 600 billion and a free-float fraction of 0.25. What is its float-adjusted cap?
Show answer
150 billion, because 600 × 0.25 = 150.