Rolling apply R-squared series of reg: ret~ret.mkt
1  | RollingRSq(returns, winlen = 21, mktcol = "SPY", intercept = TRUE)
 | 
returns | 
 xts df of returns, one column is the mkt return default daily, can be monthly  | 
winlen | 
 length rollapply window, default 21 trading days  | 
mktcol | 
 string colname of market, default 'SPY'  | 
intercept | 
 bool fit the intercept or not  | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.