Describe the bug
Historic market cap data is incorrect
To Reproduce
client = RESTClient(api_key=api_key)
date = ["2004-03-30", "2004-04-01", "2017-03-30", "2017-04-01", "2026-03-27"]
ticker = "AAPL"
for d in date:
details = client.get_ticker_details(ticker, date=d)
print(f"date: {d} market_cap: {int(details.market_cap)/1e9:.2f}B")
Output:
AAPL:
date: 2004-03-30 market_cap: 458.07B
date: 2004-04-01 market_cap: 444.78B
date: 2017-03-30 market_cap: 2361.37B
date: 2017-04-01 market_cap: 2356.94B
date: 2026-03-27 market_cap: 3652.67B
MSFT:
date: 2004-03-30 market_cap: 189.20B
date: 2004-04-01 market_cap: 188.30B
date: 2017-03-30 market_cap: 493.35B
date: 2017-04-01 market_cap: 494.48B
date: 2026-03-27 market_cap: 2649.24B
Expected behavior
AAPL is off by almost 2 magnitude on 2004-03-30 according to https://companiesmarketcap.com/apple/marketcap/
MSFT is off by ~80B on 2004-03-30 according to https://companiesmarketcap.com/microsoft/marketcap/
2017 data also off
Additional context
Additionally, is there other ways of querying for market cap and weighted_shares_outstanding of a ticker for a range of dates, other than to query get_ticker_details for each date separately?
Describe the bug
Historic market cap data is incorrect
To Reproduce
Output:
AAPL:
date: 2004-03-30 market_cap: 458.07B
date: 2004-04-01 market_cap: 444.78B
date: 2017-03-30 market_cap: 2361.37B
date: 2017-04-01 market_cap: 2356.94B
date: 2026-03-27 market_cap: 3652.67B
MSFT:
date: 2004-03-30 market_cap: 189.20B
date: 2004-04-01 market_cap: 188.30B
date: 2017-03-30 market_cap: 493.35B
date: 2017-04-01 market_cap: 494.48B
date: 2026-03-27 market_cap: 2649.24B
Expected behavior
AAPL is off by almost 2 magnitude on 2004-03-30 according to https://companiesmarketcap.com/apple/marketcap/
MSFT is off by ~80B on 2004-03-30 according to https://companiesmarketcap.com/microsoft/marketcap/
2017 data also off
Additional context
Additionally, is there other ways of querying for market cap and weighted_shares_outstanding of a ticker for a range of dates, other than to query get_ticker_details for each date separately?