Statalist The Stata Listserver


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

st: Calculating the return of stocks - problem with weekends


From   Tobias Br�tsch <[email protected]>
To   <[email protected]>
Subject   st: Calculating the return of stocks - problem with weekends
Date   Mon, 30 Apr 2007 10:02:57 +0200

Dear Stata-listers,

I have a little problem and i hope someone of you could help me.
I have to calculate the returns of 134 firms. My Data looks like this:


daily    number 	 date              f        return

16790   1          20.12.2005        12         .0041841

16791   1          21.12.2005        12.25    .0208333

16792   1          22.12.2005        12.25    0

16793   1          23.12.2005        12.3      .0040816

16796   1          26.12.2005        12.3      

16797   1          27.12.2005        12.5      .0162601

16798   1          28.12.2005        12.7      .016

16799   1          29.12.2005        12.95    .019685

16800   1          30.12.2005        12.75    -.015444

14976   2          01.01.2001        184       

14977   2          02.01.2001        184       0

14978   2          03.01.2001        173.75  -.0557065

14979   2          04.01.2001        175.5    .0100719

14980   2          05.01.2001        173.75  -.0099715

14983   2          08.01.2001        174.5    

14984   2          09.01.2001        167.75  -.0386819

I used the following codes to calculate:


. sort   nummer  daily

. tsset  nummer daily

  gen redite = f/l.f-1
 

The problems are the weekends. For example at the 26.12.2005 STATA doesn�t
calculate the return.

How can I solve this problem?
Thank You all

Tobias


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