On Sat, 20 Mar 2010, Simari wrote:
Dear,
anyone knows how to compute the return of all stocks (500) in only one command?
I have to insert this formula
"(Microsft-Microsoft(-1))/Micorsoft(-1)*100
for 500 different stocks and I would like to know if there's a way to do that giving
only one command.
To exactly what you said you'd need a loop (see chapter 9 in the User's
Guide). A very, very similar transformation can be obtained via the ldiff
command, applied to a list (see chapter 11).
HTH,
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
r.lucchetti(a)univpm.it
http://www.econ.univpm.it/lucchetti