Skip to content
Prev 460 / 15274 Next

Creating a Price Series From a Returns Series Using R

It will depend on what type of returns you have, but
assuming you have log returns and your returns are in
'retvec', then:

pseudoprice <- orig.price * exp(cumsum(retvec))

Will give you a price series.  If you have simple returns,
one approach is to first transform them into log returns.


Patrick Burns
patrick at burns-stat.com
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")
Katherine Walton wrote: