Session Ready
Exercise

Graphically compare the simple and continuously compounded returns

In this exercise, you will create a plot that contains both the simple and continuously compounded returns. This makes it easy to compare both types of returns.

Have a look at the sample code on the right. First of all, we have to plot the simple returns as a function of time. The argument type = l specifies a line plot, col = blue specifies that the simple returns line is blue, lwd = 2 specifies the line thickness, ylab = "Return" specifies that "Return" is the label of the y-axis and main specifies the plot's main title.

Instructions
100 XP
  • Your task is to add the continuously compounded returns to the plot. This can be done with the lines() function, having sbux_ccret as a first argument. Furthermore, the line should be red and its thickness should be set to 2. You can do that by setting the col and lwd arguments.