Questions tagged [wrds-compusat]

Wharton Research Data Services (WRDS) is the award-winning research platform and business intelligence tool for over 30,000 corporate, academic, government and nonprofit clients at over 375 institutions in 33 countries.

22 questions
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
0 answers

WRDS Python package error: psycopg2.errors.UndefinedColumn

According to WRDS (large data provider) itself, one can list the different libraries of data they provide by doing the following (source): import wrds db = wrds.Connection() db.list_libraries() This works fine for me. One can then look at all the…
shenflow
  • 345
  • 2
  • 12
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
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

Batch executing query in RPostgres returning same data

I am currently trying to download a large database using RPostgres - however, when I try to write the results to csvs in batches, it writes the same data over and over (always the first 1M records). Here is the code I am currently using: wrds <-…
mhohaus
  • 11
  • 1
1
vote
1 answer

Calculations in a column which depends on previous observations in R

Is there any way I can create a variable which depends on its earlier observation in R? In the below example, the column 'asset' should be depreciated by 1,67% (20%/12) per time period (t) The first 'end result' is = 'asset - depr' The problem I…
1
vote
1 answer

Downloading only transportation companies from the WRDS

I am trying to download data from wrds running an SQL query on my R studio. However I keep getting the same mistake. I am trying to download data only for transportation companies (NSDINX code 6) but I get error messages. It did not happen when…
1
vote
1 answer

Libref is not assigned

I was trying to inquiry data from TAQ, daily trade database. In SAS, I did the following but sas complained that, "Library does not exist." I am sure that the path is correct. %let wrds = wrds.wharton.upenn.edu 4016;options comamid = TCP…
Angel Chen
  • 67
  • 1
  • 2
  • 10
1
vote
0 answers

How to calculate "Redemption value of Preferred Stocks" in Compustat (Global) database [WRDS Database]

"Redemption Value of Preferred Stocks " (Compustat#56) for Compustat (North America) database is available, which is sum of "redeemable Preferred Stocks" and "Preferred dividends in arrears". In Compustat (Global) database "Redemption Value of…
Omer
  • 11
  • 2
1
vote
1 answer

SAS list all file names issue (authorization to some files but not all)

I am trying to use the following code to list all file names with a prefix in a folder and call a function named CALCU with the filenames: proc contents data=&libref.._all_ noprint out=contents; run; data _null_; set contents; by…
Jinhua Wang
  • 1,679
  • 1
  • 17
  • 44
1
vote
1 answer

WRDS library and SQL?

I am using the WRDS library to connect to the WRDS databases through Spyder. I import wrds. According to the WRDS website, a query should look like this: result = wrds.sql('select * from dataset',…
st19297
  • 521
  • 1
  • 5
  • 18
0
votes
0 answers

Libref error in WRDS Cloud SAS environment

I use WRDS server via the WRDS Cloud using SAS. Trying the code below, I received the error (below the code). How can I fix it. * Download Moody's annual accounting data; proc sql; create table moody as select gvkey, datadate, mval from…
Sara Siep
  • 13
  • 3
0
votes
1 answer

AttributeError when using wrds library

Doing the following: import wrds db = wrds.Connection() does throw this error: --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) File…
shenflow
  • 345
  • 2
  • 12
0
votes
1 answer

Python - .pgpass not remembering login information

I frequently use Wharton Research Data Services (WRDS) through Python on my mac. Here is the code I use to log in: conn = wrds.Connection() And here is the message I get after entering my username and password: Enter your WRDS username…
user19745533
0
votes
2 answers

Access WRDS data through Google Colab: OperationalError

I've tried to access data from WRDS through Google Colab by using wrds.Connection() function. But I got the OperationalError. I accessed data from WRDS through Google Colab many times before but this is the first time I face this problem. I changed…
MinHaw
  • 39
  • 9
1
2