stock_data: Stock data

stock_dataR Documentation

Stock data

Description

This data contains stock data for the companys in the S&P500. The response variable, growth, is the a stocks closing price, divded by it's closing price the previous day, minus 1 (i.e. daily percentage change). The main covariate is the lagged growth rate and here we consider 50 lags. However, instead of treating these 50 lags as 50 variables as in normal time series modelling, we treat them all as 1 variable and therefore each datapoint has 50 disaggregated rows of covariate data. The only other covariate is the company (symbol).

Usage

stock_data

Format

A data.frame with x observations and y variables:

ID

An ID column for each day of response data.

growth

Daily percentage change in the value of the stock market.

lagged_growth

The growth of the stock in the preceeding 1 to 50 days.

lag

Which lag this row corresponds to.

symbol

The stock ticker.

date

The date of response data.

Details

We collected data 2017 to 2013, but then only used data where the date of the response data was the 10th of the month. This reduces the data size and avoid having too many of the same covariate value occur multiple times as it corresponds to different lags.

See Also

The script to create this data set:

Examples

data(stock_data)

timcdlucas/agouti documentation built on Feb. 8, 2024, 6:12 p.m.