Baselight

S&P 500 Companies Price Dynamics

Price Dynamics for S&P500 companies, S&P 500 Index, and UST10Y rates

@kaggle.alexanderkuznetsovow_s_and_p_500_companies_price_dynamics

Loading...
Loading...

About this Dataset

S&P 500 Companies Price Dynamics

This data set includes the S&P500 price dynamics data generated using an Open Source project yfinance (https://pypi.org/project/yfinance/). The dates interval starts from 2018 up to the beginning date of the current month at the daily granularity.

Questions you might be interested in answering:

  1. Calculate monthly returns for each stock
  2. What are the most profitable sectors and industries each year?
  3. What sectors and specific stocks have outperformed the S&P 500 index in each year?
  4. Calculate the yearly Sharpe ratio: [Return - Risk-Free Rate] / StDev([Return - Risk-Free Rate]). For the Risk-Free rate you might want to use UST 10Y rates
  5. What stocks and sectors have the best risk-adjusted returns (shape ratio) in each year?
  6. What might be the reasons for observed trends? What trends should we expect for 2023?
  7. What trading strategy would you choose regarding the S&P 500 stocks?

Tables

Yearly Returns Stocks 2018–2023

@kaggle.alexanderkuznetsovow_s_and_p_500_companies_price_dynamics.yearly_returns_stocks_2018_2023
  • 121.2 KB
  • 3006 rows
  • 10 columns
Loading...

CREATE TABLE yearly_returns_stocks_2018_2023 (
  "company" VARCHAR,
  "year" BIGINT,
  "yearly_return" DOUBLE,
  "risk_free_r" DOUBLE,
  "excess_return" DOUBLE,
  "stdev_return" DOUBLE,
  "sector" VARCHAR,
  "industry" VARCHAR,
  "stdev_excess_return" DOUBLE,
  "sharpe_ratio" DOUBLE
);

Yearly Returns Index 2018–2023

@kaggle.alexanderkuznetsovow_s_and_p_500_companies_price_dynamics.yearly_returns_index_2018_2023
  • 7.57 KB
  • 6 rows
  • 10 columns
Loading...

CREATE TABLE yearly_returns_index_2018_2023 (
  "company" VARCHAR,
  "year" BIGINT,
  "yearly_return" DOUBLE,
  "risk_free_r" DOUBLE,
  "excess_return" DOUBLE,
  "stdev_return" DOUBLE,
  "sector" VARCHAR,
  "industry" VARCHAR,
  "stdev_excess_return" DOUBLE,
  "sharpe_ratio" DOUBLE
);

Clean Sp500 Index 2018–2023

@kaggle.alexanderkuznetsovow_s_and_p_500_companies_price_dynamics.clean_sp500_index_2018_2023
  • 12.64 KB
  • 65 rows
  • 14 columns
Loading...

CREATE TABLE clean_sp500_index_2018_2023 (
  "company" VARCHAR,
  "open" DOUBLE,
  "high" DOUBLE,
  "low" DOUBLE,
  "close" DOUBLE,
  "volume" BIGINT,
  "dividends" DOUBLE,
  "stock_splits" DOUBLE,
  "year" BIGINT,
  "month" BIGINT,
  "day" BIGINT,
  "mo_return" DOUBLE,
  "gics_sector" VARCHAR,
  "gics_sub_industry" VARCHAR
);

Ust 10–2018–2023

@kaggle.alexanderkuznetsovow_s_and_p_500_companies_price_dynamics.ust_10_2018_2023
  • 9.65 KB
  • 65 rows
  • 11 columns
Loading...

CREATE TABLE ust_10_2018_2023 (
  "company" VARCHAR,
  "open" DOUBLE,
  "high" DOUBLE,
  "low" DOUBLE,
  "close" DOUBLE,
  "volume" BIGINT,
  "dividends" DOUBLE,
  "stock_splits" DOUBLE,
  "year" BIGINT,
  "month" BIGINT,
  "day" BIGINT
);

Clean Sp500 Stock 2018–2023

@kaggle.alexanderkuznetsovow_s_and_p_500_companies_price_dynamics.clean_sp500_stock_2018_2023
  • 2.02 MB
  • 32282 rows
  • 19 columns
Loading...

CREATE TABLE clean_sp500_stock_2018_2023 (
  "company" VARCHAR,
  "open" DOUBLE,
  "high" DOUBLE,
  "low" DOUBLE,
  "close" DOUBLE,
  "volume" DOUBLE,
  "dividends" DOUBLE,
  "stock_splits" DOUBLE,
  "year" BIGINT,
  "month" BIGINT,
  "day" BIGINT,
  "security" VARCHAR,
  "gics_sector" VARCHAR,
  "gics_sub_industry" VARCHAR,
  "founded" VARCHAR,
  "mo_return" DOUBLE,
  "perform_vs_sp" DOUBLE,
  "perform_flag" BIGINT,
  "time_higher_sp" DOUBLE
);

Share link

Anyone who has the link will be able to view this.