Beatrice Crozza<[email protected]> :
There are a lot of possible reasons. To see one, try:
sysuse sp500, clear
tsset date
g r=close/l.close-1
g dr=(close/close[_n-1]-1)/(date-date[_n-1])
li in 1/10
On Thu, Aug 27, 2009 at 9:22 AM, Beatrice
Crozza<[email protected]> wrote:
> Dear all,
>
> I have just realised to have a problem with my database.
> I need to generate the variable return from my prices. So I did:
> tsset time
> gen lreturn= ln(price/l.price)
> but the result is that there are 12 missing values.
> This problem does not happen with Eviews, for example. What I did wrong?
>
> Thank you very much
>
> Bea
*
* 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/