Beatrice writes:
I have a question concerning the type of data in my dataset.
I have data about five different bonds, with observations for the
time, the date and other variables, such as the bid and ask prices.
I would like to treat my data both as a time-series (i.e. paying no
attention to the type of bond) and as a panel-data.
However, when I use the command tsset I receive this message:
repeated time values in sample
r(451);
I think that this is due to the fact that I have the same date for
different times and for different variables,because, for example, I
have at the same date a bid price for a given time, an ask price for
the same data and time and so on.
Does anyone know how to solve the problem both for time-series and panel-date?
**************
It is not very clear to me what you wish to do but given a unit of
time, I assume you will want trading days, you can have only one
observation per panel variable, in this case either bond (bond A
midpoint - average of bid and ask) or bond/quote type (bond A/ask,
bond A/bid, etc.). You may wish to manipulate your data to gather the
last quote bid or ask for each trade day or else the last mid for each
trading day before running tsset. You may also wish to consider
converting your trading dates to an integer variable trading day
number so there are no gaps in your panel for weekends and trading
holidays. If you wish to go the other way toward trading day hours or
trading day minutes, you can keep more observations but your panel
will surely be unbalanced unless this is high frequency data.
Tom
--
Thomas Jacobs
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/