-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reconsider industry selection in CRSP v2 #102
Comments
Additional CRSP v2 implementation issues:
primaryexch in ('N','A', 'Q') and
First is more relevant, second is just for information. Any thoughts on whether we should implement them? |
Ad 1: I'm in principle in favor of the change, but suggestion from where? We should also add info what those filters mean in human language. As 2: for whom is 2 relevant? For us, it isn't, is it? |
ad 1. Based on the description by WRDS on how the old exchcd maps into primaryexch. We can consider conditionaltype in ('RW', 'NW'), where RW is regular trading and NW for when issued (as we also use exchcd 31, 32, and 33). The TradingStatusFlg is necessary to avoid prices when execution is halted. ad 2. It is not relevant in the book, but there are many situations where you would need it (anything taking prices as an input without multiplying by shares). |
We currently use the
siccd
frommsf_db
(i.e.,in_schema("crsp", "msf_v2")
). However, the more accurate way issiccd
fromstksecurityinfohist_db
(i.e.,in_schema("crsp", "stksecurityinfohist")
). Yes, this variable has the same name but a different meaning depending on the table.Reasoning: Back-fills in
msf_v2
'ssiccd
. A simple check to reveal this back-fill (with an active WRDS connection):siccd_permno_pairs <- msf_db |> select(permno, siccd) |> collect() |> distinct()
nrow(siccd_permno_pairs) == length(unique(siccd_permno_pairs$permno))
This shows that every permno only has a single industry, which implies that no firm ever changed the industry - but they do: contradiction
Relevant for r-tidyfinance
The text was updated successfully, but these errors were encountered: