Description Usage Arguments Details Value Examples
Calculate the rolling maximum of an xts time series over a sliding window (lookback period).
1  roll_max(x_ts, look_back)


An xts time series containing one or more columns of data. 

The size of the lookback window, equal to the number of data points for calculating the rolling sum. 
For example, if look_back=3, then the rolling sum at any point is
equal to the sum of x_ts
values for that point plus two preceding
points.
The initial values of roll_max() are equal to cumsum() values, so that
roll_max() doesn't return any NA
values.
The function roll_max()
performs the same operation as function
runMax()
from package
TTR, but
using vectorized functions, so it's a little faster.
An xts time series with the same dimensions as the input series.
1 2 3 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.