# Example includes how to pass in arguements to the function - must be in order:
# > rollingStat(gg.ts@Data[,1],period=12,FUN="SharpeRatio.annualized",rf=.03/12)
# [1] 1.476426
# > rollingStat(gg.ts@Data[,1],period=3,FUN="SharpeRatio.annualized",rf=.03/12)
# [1] 6.804358
# > rollingStat(gg.ts@Data[,1],period=3,FUN="SharpeRatio.annualized",rf=0)
# [1] 8.253612
Run the code above in your browser using DataLab