title: How to calculate rolling annualized portfolio alpha/beta in R?
body: <p>I'm trying to compute a rolling annualized alpha for a given portfolio using the package PerformanceAnalytics.</p>
  
  <p>So far, I managed to do 2 things:</p>
  
  <ul>
  <li><p>get a rolling daily alpha on my daily returns using <code>chart.RollingRegression(r,r_idx,width = 250, attribute = "Alpha")</code></p></li>
  <li><p>get a rolling annualized return using <code>chart.RollingPerformance(r,r_idx,width = 250, FUN="Return.annualized")</code>. I'd like to transpose that annualization feature to the former function call</p></li>
  </ul>
  
  <p>I tried to use the FUN parameter in the RollingRegression which doesn't work. Is there another way to do it?</p>
  
  <p>Thanks</p>
  
  <p>Here's the code you can run that gives the 2 graphs mentioned above from 2 randomly generated returns time series:</p>
  
  <pre><code>library(PerformanceAnalytics)
  
  dates &lt;- seq.Date(as.Date("2006-12-31"),by="day",length.out = 1000)
  
  set.seed(3542)
  ra &lt;- xts(rnorm(1000,0,0.01),order.by = dates)
  rb &lt;- xts(rnorm(1000,0,0.01),order.by = dates)
  
  chart.RollingRegression(ra,rb,width = 250, attribute = "Alpha")
  
  chart.RollingPerformance(ra,width = 250, FUN="Return.annualized")
  </code></pre>