Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: Timevarying IDs in a panel dataset


From   "Salvati, Jean" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: Timevarying IDs in a panel dataset
Date   Tue, 22 Nov 2005 10:27:07 -0500

What exactly does ID represent, and how does it affect the stock and its returns (if at all)?

Jean Salvati 

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On Behalf Of 
> Mark Schaffer
> Sent: Tuesday, November 22, 2005 10:15 AM
> To: [email protected]
> Cc: [email protected]
> Subject: Re: st: RE: Timevarying IDs in a panel dataset
> 
> Nick,
> 
> > It is not clear that these identifiers are really 
> identifiers. Or, to 
> > put it another way, how can this problem be solved at all?
> >
> > As I understand it, you may need a new identifier based on a 
> > combination of now and the next period. So, any stock that is 3 now 
> > and 2 next period cannot be the same item as one that is 3 
> and 3, any 
> > more than a person who is male now and female next week can be the 
> > same person as someone with more stable gender.
> 
> But a person who has a maiden name last week and a married 
> name this week is the same person.  This is what Daniel has, 
> more or less.
> 
> --M
> 
> > But does a combination of now and next uniquely identify stock?
> >
> > Nick
> > [email protected]
> >
> > Daniel H�chle
> >
> >> I do have a panel of several thousand stocks. Each stock has an id 
> >> called ID_now. However, there is a problem: The stock's id 
> may change 
> >> over time. Therefore, I do have variable ID_nextperiod 
> which contains 
> >> the stock's id in the next period. The data looks like this:
> >>
> >> Date       ID_now       ID_nextperiod         Price_now
> >>  1           1               1                    100
> >>  2           1               1                    110
> >>  3           1               1                    105
> >>  4           1               1                    100
> >>  3           2               2                     22
> >>  4           2               2                     27
> >>  1           3               3                     20
> >>  2           3               2                     25
> >>  1           4               5                     60
> >>  2           5               5                     65
> >>  3           5               5                     67
> >> ...
> >>
> >> What I would like to do is calculating the discrete stock 
> returns. If 
> >> the stock's ID would not change over time this could be achieved 
> >> (after tssetting the dataset) by simply typing
> >>
> >> . PriceRet = Price_now / L.Price_now - 1
> >>
> >> However, I do not have any idea how to calculate the 
> discrete stock 
> >> returns in case of changing IDs. Any ideas would be appreciated.
> >
> > *
> > *   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/
> >
> 
> 
> Prof. Mark Schaffer
> Director, CERT
> Department of Economics
> School of Management & Languages
> Heriot-Watt University, Edinburgh EH14 4AS tel 
> +44-131-451-3494 / fax +44-131-451-3294
> email: [email protected]
> web: http://www.sml.hw.ac.uk/ecomes
> 
> 
> 
> __________________________________________________________________
> 
> DISCLAIMER:
> 
> This e-mail message is subject to 
> http://www.hw.ac.uk/disclaim.htm 
> __________________________________________________________________
> 
> *
> *   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/
> 

*
*   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