getPCRAData function

Download CRSP and SPGMI Data

Download CRSP and SPGMI Data

Downloads stocksCRSPweekly, stocksCRSPdaily

getPCRAData(dataset = "stocksCRSPweekly", cache = TRUE, refresh = FALSE)

Arguments

  • dataset: a valid dataset name (see details)
  • cache: logical variable controlling whether or not to cache the data so that when calling the function for the same dataset it will be loaded from cache rather than re-downloading from the github site
  • refresh: logical variable controlling whether or not to re-download a cached dataset

Returns

An object of class data.table .

Details

The following are valid names of datasets available:

  • "stocksCRSPdaily""Details same as for stocksCRSP except now daily"
  • "stocksCRSPweekly""Details same as for stocksCRSP except now weekly"

User must install R.cache package

Examples

stocksCRSPweekly <- getPCRAData(data = "stocksCRSPweekly") class(stocksCRSPweekly) names(stocksCRSPweekly) stocksCRSPdaily <- getPCRAData(data = "stocksCRSPdaily") class(stocksCRSPdaily) names(stocksCRSPdaily)
  • Maintainer: Doug Martin
  • License: GPL-2
  • Last published: 2023-08-30

Useful links