Learn R Programming

farr (version 0.2.39)

get_trading_dates: Produce a table mapping dates on CRSP to "trading days"

Description

Produce a table mapping dates on CRSP to "trading days". Returned table has two columns: date, a trading date on CRSP; td, a sequence of integers ordered by date.

Usage

get_trading_dates(conn)

Value

tbl_df

Arguments

conn

connection to a PostgreSQL database

Examples

Run this code
if (FALSE) {
library(DBI)
library(dplyr, warn.conflicts = FALSE)
pg <- dbConnect(RPostgres::Postgres())
get_trading_dates(pg) %>%
  filter(between(date, as.Date("2022-03-18"), as.Date("2022-03-31")))
}

Run the code above in your browser using DataLab