As an exercise, I wanted to re-construct the index weights for the Nasdaq-100 (^NDX) via linear regression. For these purposes I got the daily adjusted close of its 103 components from alphavantage.co (NFLX example link), and did a least-squares linear regression on the index adjusted close (for this I used one of two sources: alphavantage.co's QQQ which tracks the NDX, as well as Yahoo's NDX from here). I used data for 168 market days approximately Mar-Oct 2019.

I tried the regression on: the raw adjusted price, the daily returns, and the daily price differences; but every time I got the wrong answer, by comparing my results to the weights given here; in particular, BKNG comes up quite high in my results (1st or 2nd) in spite its actual weight not being large.

Should I be able to recover index weights via this method, i.e. is what I'm doing theoretically sound and I have a bug in my code? Could it be a data issue? Or if not, could you please direct me towards the correct method for doing that? Or explain why it's impossible?

  • $\begingroup$ Your method seems inherently inaccurate. You are estimating 103 coefficients with only 168 observations (1.6 obs per coeff). You could improve accuracy by using many times more observations, but even so I am not sure the accuracy will be sufficient for practical use. What is the uncertainty (standard deviation) of your coefficient estimates? $\endgroup$
    – Alex C
    Dec 12, 2019 at 19:06
  • $\begingroup$ Isn't the nasdaq just a market-cap weighted index so assuming the number of share in issue remains constant in the last 103 days you have the linear system $$P w \propto I \quad \implies w \propto P^{-1}I$$ where P is last 103 days of stock prices, I is the index price vector and w is weights? $\endgroup$
    – Attack68
    Dec 12, 2019 at 21:09
  • $\begingroup$ @Attack68 number of shares is definitely NOT constant, but you're right, if you know the components, the weights are proportional to market cap $\endgroup$
    – LazyCat
    Dec 13, 2019 at 1:44
  • $\begingroup$ Thanks a lot guys! I needed the confirmation to keep at it and I found my bug -- I was solving A = BX instead of AX = B -- now that's fixed and I get an average absolute deviation of 0.005% between true and estimated index prices. The big weights are mostly right, small ones are a bit off, with some negative, but that's what you get when there exist multiple accurate explanations. Thanks again! $\endgroup$
    – Gabi
    Dec 14, 2019 at 0:30

1 Answer 1


Firstly, you've also got survivorship bias. There have been multiple constituent changes even in the short period you've sampled.

The Nasdaq-100 Index is a modified market capitalization-weighted index. It is, therefore, based upon the shares oustanding each company, which is a variable not included within your calculations or derivable from price data.

Further, it has modification rules to prevent ultra-large cap companies from dominating the index.

Source: Nasdaq-100 index methodology and specification documents: https://indexes.nasdaqomx.com/docs/methodologynew_NDX.pdf http://www.nasdaqtrader.com/content/technicalSupport/specifications/dataproducts/GIW_WebService_Spec_current.pdf

The information you see is available from Nasdaq - at an institutional price point.

An alternative is to look at a daily weightings on a Nasdaq-100 ETF.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.