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?