Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rollFun

Analysis of Running/Rolling/Moving Windows


Description

Various functions to analyze data over a moving window of periods.

Usage

rollSFM(Ra, Rb, n = 60)

Arguments

Ra

Object coercible to xts or matrix, containing the excess return for an individual security

Rb

Object coercible to xts or matrix, containing the market / benchmark return

n

Number of periods to use in the window

Value

A object of the same class as Ra (and Rb?) or a vector (if try.xts fails).

rollSFM

returns single-factor model parameters and R-squared over a n-period moving window.

Author(s)

Joshua Ulrich

References

The following site(s) were used to code/document this indicator: https://en.wikipedia.org/wiki/Simple_linear_regression


TTR

Technical Trading Rules

v0.24.2
GPL (>= 2)
Authors
Joshua Ulrich
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.