Stock Market

Stock market
Finance
Compare company stock prices, trading activity, and annual market capitalization, with optional ESG analysis.
Author

An American flag hangs across the columned facade of the New York Stock Exchange.
The New York Stock Exchange, New York City (2012). Photo: Mike Peel (www.mikepeel.net) / Wikimedia Commons · CC BY-SA 4.0.

Stock market explorer

Compare adjusted stock-price histories. Open the optional ESG snapshot to explore company ESG measures.

Loading the explorer…

Explore how stock prices, trading activity, and company size change over time. Your project can focus entirely on stock-market data. ESG analysis is optional. You can compare companies, study a sector, or examine changes in prices and market capitalization without using any ESG scores.

Core data

On-page tables preview a sample of rows. Download the files to analyze the complete datasets. The daily stock history and annual market-cap observations have different units of observation, so they are provided as separate CSV files. Each file includes its historical and current observations together.

Daily stock history

The combined public stock history contains 626,711 stock-series days across 632 trading series representing 631 companies, from December 12, 1980 through October 5, 2026, the last completed trading day before the October 6 refresh. Earlier coverage is limited to eight technology companies: Apple, Amazon, Alphabet/Google, Meta, Microsoft, Netflix, Nvidia, and Tesla. Most company histories begin in January 2023. Check each ticker’s dates before choosing a comparison period.

Earlier technology-company prices were re-collected from Yahoo to use the current adjusted-price convention. 605 companies have refreshed histories through October 5. For 26 keys that the public provider could not return, the file retains the latest available historical teaching records, ending in October or December 2024. Use Price_Source and Price_Snapshot to identify those historical rows.

Energy Transfer (ET) has a partially returned current history: the combined file preserves 501 trading dates from the 2023–2024 teaching records and seven nonmissing current observations between July 29 and October 5, 2026. Its December 31, 2024–July 28, 2026 gap remains blank, and the later interval is sparse. No prices are interpolated.

The stock history uses gzip compression to keep the download small. read_csv() downloads and decompresses this .csv.gz file automatically.

stock_markets <- readr::read_csv(
  "https://bcdanl.github.io/data/stock_history.csv.gz"
)

Annual market-cap observations

Market capitalization measures a company’s stock-market value: its share price multiplied by its outstanding shares. It helps distinguish a high-priced share from a large company.

This file has one row for each company and calendar year from 2022 through 2026. Market_Cap is Yahoo Finance’s latest available dated market-cap observation within that year. The observation dates differ across companies and years, so these values are not all December 31 measurements. 2026 is a partial year. Missing values remain blank and are explained by Missing_Reason.

The CSV includes 3,155 company-year rows for 631 companies. Market cap is available for 530 companies in 2022 and 610 companies in each year from 2023 through 2026. All returned market-cap values are in U.S. dollars. No values are estimated from current share counts or filled into missing years.

market_caps <- readr::read_csv(
  "https://bcdanl.github.io/data/stock_market_cap_annual.csv"
)

Company information and optional ESG snapshot

This file provides company names, sectors, industries, and the original environmental, social, and governance (ESG) scores. You can use the company information without analyzing ESG. The proprietary file remains the original snapshot; its ESG scores and Market_Cap are not newly measured 2026 values. Use the annual market-cap file for comparisons over time.

company_info <- readr::read_csv(
  "https://bcdanl.github.io/data/stock_esg_list.csv"
)

Important variables

Stock history

  • Date: The trading date. Each row represents one trading series on one date.
  • Year, Month, Day: Calendar components of Date, useful for grouping observations.
  • Ticker: The trading-series identifier used in the teaching data. Ticker plus Date uniquely identifies a row.
  • Provider_Ticker: The provider’s current trading symbol. For example, the original SQ identifier now uses XYZ.
  • ESG_Ticker: The company identifier used to join the annual market-cap and company-information tables. The name is retained from the earlier dataset; using this identifier does not require ESG analysis.
  • Open: The day’s opening price, adjusted using Yahoo’s adjusted-close factor.
  • High: The day’s highest price, on the same adjusted basis.
  • Low: The day’s lowest price, on the same adjusted basis.
  • Close: The day’s closing price, adjusted for dividends and stock splits using the refresh-date convention.
  • Volume: The reported number of shares traded that day.
  • Dividends: Dividend payments recorded on that date; zero means no recorded dividend event.
  • Stock_Splits: The split ratio recorded on that date; zero means no recorded split event.
  • Price_Source: The source of the price observation, including historical fallback records.
  • Price_Snapshot: The price-data collection date or historical snapshot label. Compare returns using a consistent price snapshot.

Annual market-cap observations

  • Ticker: The company identifier. Join it to the stock history’s ESG_Ticker.
  • Provider_Ticker: The symbol used to retrieve the public observation.
  • Year: The calendar year containing the market-cap observation. Ticker plus Year uniquely identifies a row.
  • Date: The actual date attached to the selected market-cap observation.
  • Market_Cap: The provider-reported value of the company’s outstanding shares, in the currency recorded in Currency.
  • Currency: The currency of Market_Cap. Compare monetary amounts in the same currency.
  • Observation_Type: Whether the selected value came from the provider’s annual, quarterly, or trailing series.
  • Source_Period: The provider’s period label, such as 12M, 3M, or TTM. Market cap is a value at a date, not a sum over that period.
  • Year_Status: Whether the calendar year is complete or partial. The latest observation in a completed year can still precede December 31.
  • Missing_Reason: Why no market-cap observation is available for that company and year.
  • Snapshot_Date: The date the public data were collected.
  • Source, Source_URL: The provider name and the source link for the observation.

Company information

  • Ticker: The company identifier used for joins.
  • Company_Name: The company name in the original snapshot.
  • Sector: A broad business category, such as Technology or Healthcare.
  • Industry: A more specific business category within a sector.
  • Country: The country recorded for the company in the original snapshot.
  • IPO_Year: The recorded year of the company’s initial public offering.
  • Market_Cap: The original snapshot’s market-cap value. Its observation date is not recorded, so use market_caps$Market_Cap for annual comparisons.

ESG measures

The ESG risk scores in the original snapshot measure a company’s exposure to ESG risks after accounting for how those risks are managed. Higher ESG risk scores indicate greater risk. See Sustainalytics’ explanation of ESG Risk Ratings.

  1. total_esg: The company’s overall Environmental, Social, and Governance (ESG) risk score. It summarizes the ESG risk that remains unmanaged. A higher score indicates greater overall ESG risk.
  2. environmental: The environmental risk score, covering issues such as energy efficiency, waste management, and carbon emissions. A higher score indicates greater environmental risk.
  3. social: The social risk score, covering issues such as employee relations, diversity, community impact, and human rights. A higher score indicates greater social risk.
  4. governance: The governance risk score, covering issues such as board structure, executive pay, and shareholder rights. A higher score indicates greater governance risk.
  5. controversy: The severity level (0–5) of ESG-related public controversies involving the company. A higher value indicates more severe controversies, which may damage its reputation and create business risks.

Joining the data

For company information or optional ESG analysis, match the stock history’s ESG_Ticker to company_info$Ticker. For annual market cap, match ESG_Ticker to market_caps$Ticker and match Year in both tables. Check that the annual table has only one row per company and year before joining.

Joining annual market cap to daily prices repeats the annual value on each trading day. Use the annual table itself when calculating average company size or counting companies, so companies with more trading days do not receive extra weight. The annual observation may occur after some daily prices in that year; it describes company size in that year rather than information known on every trading day.

The older technology files include GOOG, while the original company cohort uses GOOGL. These are different Alphabet share classes, so their price series remain separate. Both have ESG_Ticker = "GOOGL". Count Alphabet once in company-level summaries.

Company operations can change through renames, mergers, and divestitures. If you choose the ESG extension, interpret the original scores as a historical snapshot, especially when comparing them with newer prices.

Possible story directions

  • Which selected companies had the largest percentage changes in adjusted closing prices over the same period?
  • How does daily trading volume vary across companies, months, or years?
  • How did company market capitalization change between the available annual observations?
  • Do companies with larger market caps show different price-change patterns from smaller companies?
  • How do stock-price patterns differ across sectors or industries?
  • Optional ESG extension: Are the original ESG scores associated with stock-price changes, trading volume, or company size? How do the environmental, social, and governance measures vary across sectors?

A useful first pass

Choose a manageable set of companies and a shared date range. Check missing values and price snapshots, then summarize prices, percentage changes, or trading volume by company and year. Add annual market cap if it supports your question. Make clear charts and verify row counts before and after joins. Include ESG only if your group chooses that extension.

Return to Group Project Topics

Back to top