Get startedGet started for free

Annualized monthly estimates

Remember that the returns in return_matrix were continuously compounded. Therefore, an estimate of the annual continuously compounded return is just 12 times the monthly continuously compounded return. An estimate of the continuously compounded annual standard deviation is the square root of 12 times the monthly standard deviation.

For the three assets we can use the apply() function again to calculate their respective means and standard deviations, and then apply the correct transformation. Your task is to complete the code on the right. The calculation for the simple return is given to get you started!

This exercise is part of the course

Intro to Computational Finance with R

View Course

Exercise instructions

  • Print the annualized continuously compounded mean to the console.
  • Print the annualized standard deviation to the console.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# return_matrix is preloaded in your workspace

# Annualized continuously compounded mean 

# Annualized simple mean
exp(12 * apply(return_matrix, 2, mean)) - 1

# Annualized standard deviation values
Edit and Run Code