Either continuous returns or discrete returns are computed for an
object. The returns can be expressed as percenatges and the first NA
value can be trimmed.
Objects of classes: numeric, matrix, data.frame, ts, mts,
timeSeries, zoo and xts are supported.
method
Character, the type of return to be computed.
percentage
Logical, if TRUE (the default) the returns
are expressed as percenatges.
trim
Logical, if FALSE (the default) the first value is
set to NA such that the length of the return series coincides
with the length of the series in levels.
compound
Logical, if FALSE (the default), then simple
returns are computed and otherwise compounded returns.
Value
An object of the same class as y, containing the truncated series.