Experiment 005 · Market attribution
Why Was the Market Up?
The S&P 500 is not a mood or a headline. It is a weighted collection of companies. So when it moves, we should be able to take the move apart and see exactly which stocks pushed it up and which pulled it back.
two kinds of why
First, a small distinction
A news story tries to explain why people changed their minds. This experiment answers the narrower question underneath it: once prices moved, which companies mathematically created the market's gain?
Useful, but often debatable.
Measurable down to a small residual.
September 3, 2026
A 1.05% day, taken apart
Green bars pushed SPY upward and coral bars pulled it downward. A basis point is one hundredth of a percentage point. Hover or tap any bar for the stock's weight, return, and contribution.
Loading the frozen result…
The company ledger
The biggest pushes and pulls
A huge stock move can barely matter if the company is small in the index. A modest move in a giant company can matter a great deal.
Added to the day
Subtracted from the day
so what happened?
Findings and Next Steps
Microsoft and Nvidia did the most work
Together they supplied nearly 30 basis points, or more than a quarter of the reconstructed 1.06% basket gain.
This was not only a mega-cap day
340 of 503 securities advanced. The five largest positive contributors explain about half of the basket gain, but hundreds of smaller gains supplied the rest.
Broadcom pulled the other way
Its 2.74% decline removed about 7.2 basis points. All decliners together removed 24.6 basis points from an otherwise stronger positive day.
Where I would take this next
- Repeat the ledger on a sharp down day and compare how concentrated the damage was.
- Group contributions by sector to see whether the day was broad or driven by one part of the economy.
- Build a daily archive using point-in-time holdings so index membership changes are handled exactly.
from a headline to a ledger
How I counted the move
The S&P 500 gives larger publicly tradable companies more weight. I used State Street's SPY holdings dated September 3 and the closing price change of every security from September 2 to September 3.
- 01
Start with the same basket
The file contains 503 securities because a few S&P 500 companies have two listed share classes. Together the measured securities cover 99.80% of SPY's closing weight.
- 02
Reconstruct opening weights
The published weights are from the end of the day. I reverse each stock's return to estimate what its weight was before trading began.
- 03
Multiply weight by return
A stock at 6% of the basket that rises 2% adds about 0.12 percentage points. That is 12 basis points of market movement.
- 04
Add every contribution
The 503 company contributions produce a reconstructed basket return of 1.058%, versus SPY's observed 1.047% price return.
the math behind “up”
The Math Zone
Let i be a security, t the chosen day, P its closing price, and w its weight at the start of the day.
How far did it move?
This is the ordinary close-to-close stock return.
How much did it count?
Because State Street reports closing weights, we divide out the day's return and renormalize to recover the opening basket.
What did it add?
Contribution combines size and movement. Multiply by 10,000 to express it in basis points.
Put the market back together
Add the pushes and pulls. Positive contributions totaled 130.4 basis points; negative ones removed 24.6, leaving 105.8.
What this does and does not explain
This is an arithmetic attribution, not proof that any headline caused a stock to move. It uses SPY as a transparent, investable approximation of the S&P 500 rather than proprietary point-in-time index files. Closing prices also hide everything that happened within the trading day.
The weighting and divisor framework follows S&P Dow Jones Indices' Index Mathematics Methodology ↗. Constituent names, shares, and weights come from State Street's SPY holdings dated September 3, 2026 ↗. Close-to-close prices come from Yahoo Finance. This experiment is for education and is not investment advice.
