Questions tagged [wrds]
41 questions
5
votes
2 answers
MySQL cumulative product group by
I've been working with the WRDS/CRSP dataset (a stock price database maintained by UPenn for academic research). I've been downloading the data in Python and inserting it into my local MySQL database.
The data looks like this and has primary key on…

swmfg
- 1,279
- 1
- 10
- 18
4
votes
1 answer
How to generate a Python output file with color formatting?
How can I instruct python to generate an output file which keeps the color formatting specified in the main script?
I am working on the WRDS Cloud and I am using a shell file to execute a python script. The Cloud returns an output file which I can…

NC520
- 346
- 3
- 13
4
votes
1 answer
SAS Array Declaration
I was reading the SAS code for calculating NBBO, and I came across the following code:
array nexb nexb:; array nexo nexo:; array sexb sexb:; array sexo sexo:;
I was wondering what does the statement array nexb nexb:; do here?

Jinhua Wang
- 1,679
- 1
- 17
- 44
2
votes
2 answers
How do I get local data into a read-only database using dplyr?
WRDS is a leading provider of research data to academics and other researchers in business and related fields.
WRDS provides a PostgreSQL database, but this is a read-only database.
For some tasks, the inability to write data to the database is very…

Ian Gow
- 3,098
- 1
- 25
- 31
2
votes
1 answer
Accessing WRDS from Python: no connection
I want to access WRDS through Python.
I am using Pycharm.
according to this link : https://wrds-www.wharton.upenn.edu/pages/support/programming-wrds/programming-python/python-from-your-computer/
I have already installed WRDS in my virtual…

Sean
- 81
- 1
- 7
2
votes
2 answers
R: import and converting CRSP data into a xts-object
I have downloaded historical US stock prices from the CRSP database via the WRDS website.
I can import the .csv file but my approach to properly fit it into a xts-object is at least unhandy. With longer time periods and more data, after splitting…

user169340
- 45
- 5
2
votes
1 answer
MATLAB Database fetch() for WRDS Compustat taking too long
I am connecting MATLAB to the Wharton Research Data Services COMPUSTAT database and am running a simple query
WRDS_Connect
setdbprefs('FetchInBatches','yes')
query = exec(WRDS, ['select gvkey from COMP.FUNDA where fyear = 2000 order by gvkey…

rajomato
- 1,167
- 2
- 10
- 25
1
vote
1 answer
How do I deal with this Python 3.8 fstring syntax error?
I use Python 3.8.
I get the following error when trying to run "import wrds" in Jupyter (although I get the same error in Spyder):
Traceback (most recent call last):
File "C:\Users\xxxxx\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py",…

emoney98
- 11
- 1
1
vote
1 answer
How to unzip multiple TAQ data files in SAS
I have daily TAQ data for a month. I am trying to unzip those using SAS but I am failing. The folder's name is EQY_US_ALL_TRADE_202107. It has several zipped (GZ files) files for each trading day named…

zannatus saba
- 21
- 3
1
vote
2 answers
Join a data frame (or other R object) to a table in a read-only Postgresql database?
I have read-only access to a Postgres database. I can not write to the database.
Q. Is there a way to construct and run a SQL query where I join a data frame (or other R object) to a table in a read-only Postgres database?
This is for accessing data…

Kelly Thompson
- 11
- 3
1
vote
1 answer
"db.list_tables(library='taq')" returns an empty list. Why?
I'm trying to download data from wrds-taq dataset(taq_1993,...,taq_2014 products).
[x for x in db.list_libraries() if 'taq' in x] returns:
['taq', 'taqm_2012', 'taqm_2013', 'taqm_2014', 'taqm_2015', 'taqm_2016', 'taqm_2017', 'taqm_2018',…

aleticmyhero
- 11
- 3
1
vote
0 answers
Python: Using Multiple Variables in WRDS CRSP Query
I would like to use multiple variables within a WRDS SQL query.
I am seeking to search the CRSP database by PERMNO and Date, return the stock price for a particular company on a particular day. I have a large DataFrame from which these variables…

dy1903
- 11
- 2
1
vote
1 answer
Does Rstudio server keeps running my code if I sign out?
I am currently using Rstudio server for running a very long function in order to make it run faster. I wanted to know what happens to the debug if I log out or close my laptop. Does the code on the server keep running or does it stops until I sign…

Andrea De Lucia
- 11
- 2
1
vote
1 answer
Using Python dict values from external file in WRDS CRSP query
I would like to read dictionary values (CRSP PERMNOS) from an external file (a Python dict) and use them in a function that will return rows from a particular table. The code below, adapted from the WRDS Python Support site, works well with the…

Coding4Library
- 21
- 4
1
vote
1 answer
Cannot install R packages within WRDS Interactive R session
I would like to install the R package 'rstan' in an interactive R session on the WRDS server, but cannot manage to install it, or any other packages.
I have tried specifying the CRAN mirrors directly in the install.packages() command.
I have tried…

txinferno
- 85
- 5