annualizeStandardDeviation <- function(rawStandardDeviation, freq){
#c("days","weeks","months","years")
scalingFactor <- switch(freq
, days = 252
, weeks = 52
, months = 12
, years = 1
)
annualStandardDeviation <- rawStandardDeviation*sqrt(scalingFactor)
return(annualStandardDeviation)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.