Calculate returns
Calculate returns
returns(x, type = "r", n = 1)
x |
numeric vector |
type |
|
n |
lookback |
Vector of same length as x with absent returns converted to 0 for relative and 1 for logarithmic.
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.