Computes a cumulated financial 'timeSeries', e.g. prices or indexes, from financial returns.

1 2 3 4 5 |

`method` |
a character string naming the method how the returns were computed. |

`percentage` |
a logical value. By default |

`x` |
an object of class |

`...` |
arguments to be passed. |

Note, the function `cumulated`

assumes as input discrete
returns from a price or index series. Only then the cumulatrd
series agrees with the original price or index series. The
first values of the cumulated series cannot be computed, it
is assumed that the series is indexed to 1.

Returns a 'timeSeries' object of the same class as
the input argument `x`

.

1 2 3 4 5 6 7 8 9 10 11 | ```
## Use the Microsofts' Close Prices Indexed to 1 -
MSFT.CL <- MSFT[, "Close"]
MSFT.CL <- MSFT.CL/MSFT[[1, "Close"]]
head(MSFT.CL)
## Compute Discrete Return -
MSFT.RET <- returns(MSFT.CL, method = "discrete")
## Cumulated Series and Compare -
MSFT.CUM <- cumulated(MSFT.RET, method = "discrete")
head(cbind(MSFT.CL, MSFT.CUM))
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.