Exercise

Compute continuously compounded 1-month returns

As you might remember from class, the relation between single-period and multi-period returns is multiplicative for single returns. That is not very convenient. The yearly return is for example the geometric average of the monthly returns.

Therefore, in practice you will often use continuously compounded returns. These returns have an additive relationship between single and multi-period returns and are defined as

$$r_t = ln(1+R_t),$$

with \(R_t\) the simple return and \(r_t\) the continuously compounded return at moment \(t\).

Continuously compounded returns can be computed easily in R by realizing that

$$r_t = ln\left(\frac{P_t}{P_{t-1}}\right)$$
$$ln\left(\frac{P_t}{P_{t-1}}\right) = ln(P_t) - ln(P_{t-1}).$$

In R, the log price can be easily computed through log(price). Notice how the log() function in R actually computes the natural logarithm.

Instructions

100 XP
  • Compute the continuously compounded returns and assign to sbux_ccret.
  • Set the names of the sbux_ccret to the correct dates, as you did in the previous exercise.
  • Use the head() function to display the first elements of sbux_ccret.