MulaiMulai sekarang secara gratis

The monthly mean and volatility

You have now created month to month returns for the S&P 500. Next, you will need to do a descriptive analysis of the returns.

In this exercise, you will calculate the mean (arithmetic and geometric) and volatility (standard deviation) of the returns. These returns are available in your workspace as the variable sp500_returns.

Latihan ini adalah bagian dari kursus

Introduction to Portfolio Analysis in R

Lihat Kursus

Petunjuk latihan

  • Compute the arithmetic mean value of the return series.
  • Compute the geometric mean value of the return series using mean.geometric().
  • Compute the standard deviation of the return series.

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

# Compute the mean monthly returns


# Compute the geometric mean of monthly returns


# Compute the standard deviation

Edit dan Jalankan Kode