i have been doing work with historical data in an attempt to mimic automated alpha research in the past, see: Historical ticker components
lately i have been looking at market capitalisation. eodhd offers an api endpoint (Historical Market Capitalization API | Free & paid plans) but it is not clear how this is calculated.
i have pulled fundamental and eod price data for aapl, and computed market cap as shares * eod adjusted close.
here is market cap as returned by the api and market cap as computed from historical prices and historical outstanding shares
and here is the difference between the two as a ration of the market cap returned from the api
this diff plot shows a clear diff between data sources but a more important drift in value over the years.
the reason to compute the market cap separately from the api is so we have access to older market cap data, as the above shows, the api only has market cap for appl from 2019 onward.
i would like to know if eodhd is computing the market cap data with a different function, it does not seem likely, or if you are computing it with different data, more likely.
hi @Alex_B
the ticker is aapl, the api requests for fundamentals give me the outstanding shares, the eod endpoint has the adjusted closed. the formula is as simple as “last” market cap times the last adjusted close.
Market cap (if you mean the Highlights::MarketCapitalization field) multiplied by adjusted close doesn’t give market cap. Please be more specific, with exact dates and prices, and it’s better if you provide a csv file of your calculations for that period. Via email please.