Quantcast
Channel: Statalist
Viewing all articles
Browse latest Browse all 72764

Easy loop help

$
0
0
Hi everyone,
thanks in advance for your help, as you will see I'm pretty new with Stata.

I just want to perform a loop to get stock levels and anual growth from quarterly growth.

I have forecasted (arima-predict) a time series using quartely growth (dlog of stock) and got the output results. Now I want to convert quarterly growth results in anual growth

date (M/Y) // stock // quarterly growth // anual growth

3/15 // 100 // ...
6/15 // 101 // ...
9/15 // 104 // ...
12/15 // 105 // ...

3/16 // ? // 1,2% // ?
6/16 // ? // 1,1% // ?
9/16 // ? // 3,4% // ?

...


In March 2016 stock=105*(1+1,2%)=106,26 and anual growth=6,26%
In June 2016 stock=106,26*(1+1%)=107,32 and anual growth=(107,32-102)/102
and so on.
How can I create this loop?

Thanks








Viewing all articles
Browse latest Browse all 72764

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>