Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Merging to the CRSP header file


From   Malcolm Wardlaw <[email protected]>
To   [email protected]
Subject   st: Merging to the CRSP header file
Date   Thu, 17 Apr 2008 09:54:34 -0500

I have a data manipulation question about 1-to-many merging based on tickers and date ranges. It's similar to a previous question, but a much simpler operation and a much more common operation for me. I thought I had solved this problem, but I can't for the life of me figure it out again.
Basically I have lots of observations by date and ticker in Dataset(A) . Tickers are only unique for companies in the CRSP header file for specific date ranges. The CRSP header file provides for a completely unique company identifier, matching the ID up to the ticker symbol and providing a <start> and <end> date for the period that the ticker is a valid match for that ID. So, I need to merge using the ticker, where the date in Dataset(A) is in between the <start> and <end> dates.

Someone had suggested -nearmrg-, which kind of works, but it seems a bit squirrely for what I'm doing. Plus, I'm unfortunately still on Stata 9. I think I read some comment on the archives somewhere about creating 'bins', but I couldn't tell what they were talking about.

This seems like such a common problem, I figured there must be a stock way to handle this.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index