Statalist


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

Re: st: Type of data (time-series and panel-data)


From   "Beatrice Crozza" <beatrice.crozza@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Type of data (time-series and panel-data)
Date   Tue, 22 Jul 2008 13:48:56 +0200

Dear Thomas,

thank for your reply.

I'll try to explain better my problem.
First of all yes, I have high-frequency data.

My problem is that I do not have one observation for panel data,
because some are repeated, i.e. I have, for example, the variable bid
(which represent the bid proposed price) for 23-Apr-2008,but I have
three times the time 16:30:00 because there were three proposals at
the same time and so on.

So i have two problems:
1)How to transform my data so to that the three observations about the
bid price on 23-Apr-2008 become three unique observations.

2)If it is not possible to transform my series in a time-series how
can I transform my data in order to have the variable data in a
chronological order? Because I have to divide my securities in on and
off-the-run.

Hope that someone could help me

Thank you very much.

Best regards,
Bea

2008/7/20 Thomas Jacobs <thomasjacobs@gmail.com>:
> 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/
>
*
*   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/



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