On Mon, 20 Aug 2012, Logan Kelly wrote:
It strikes me that exp(cum(ln(index))) could be more costly both in
terms of cycles and added round-off error (though for the simple stuff I
do both are probably trivial). My concern with exp(cum(ln(index))) is
that it will not work if the series contains negative values?
Of course not, but:
1) does it make sense at all to compute the cumulative product of
something that may be non-positive? Can you provide any real-world
example?
2) the definitive solution was Allin's: y = y *y(-1) all the rest are just
musings on the subject.
--------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Economia
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
--------------------------------------------------