famafrench.FamaFrench.queryCrsp¶
-
FamaFrench.
queryCrsp
(self, freq, dt_start, dt_end)[source]¶ Query CRSP Stock/Security files from wrds-cloud.
- Parameters
freq (str) –
Observation frequency. Possible choices are:
D
: dailyW
: weeklyM
: monthlyQ
: quarterly (3-months)A
: annual
dt_start (datetime.date) – Starting date for the dataset queried or locally retrieved.
dt_end (datetime.date) – Ending date for the dataset queried or locally retrieved.
- Returns
dfcrsp – Cleaned CRSP data queried from wrds-cloud w/ observations at frequency
freq
over sample period fromdt_start
todt_end
.- Return type
Note
List of queried CRSP variables:
permno : Unique permanent identifier assigned by CRSP at the security-level
permco : Unique permanent identifier assigned by CRSP at the company-level
date : Trading day
shrcd : 2-digit code describing the type of shares traded
exchcd : Code indicating the exchange on which security is listed
ret : Holding period return w dividends
retx : Holding period return w/out dividends
shrout : Number of publicly held shares (thousands)
prc : Closing price or negative bid/ask average for a trading day
Note
Depending on a user’s WRDS subscription, data variables will be queried from the most frequently updated CRSP datafiles. CRSP offers monthly, quarterly, and annually updated files for both daily and monthly observations. The default datafiles are updated annually. See wrds-cloud SAS Library Names below:
crspm
: dataset CRSP Monthly Updatecrspq
: dataset CRSP Quarterly Updatecrspa
: default dataset CRSP Annual Update