BaşlayınÜcretsiz Başlayın

Calculating skewness and kurtosis

You just saw the histogram of the S&P500 data, let's now put it into numbers and calculate skewness and kurtosis. For the full picture of the distribution, you'll also look at the mean and standard deviation. Available are the S&P500 returns data under returns_sp500, which is all you need for this.

Bu egzersiz

Introduction to Portfolio Analysis in Python

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Calculate the mean and the standard deviation.
  • Calculate the skewness.
  • Calculate kurtosis.

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Print the mean
print("mean : ", returns_sp500.____()*100)

# Print the standard deviation
print("Std. dev  : ", returns_sp500.____()*100)

# Print the skewness
print("skew : ", returns_sp500.____())

# Print the kurtosis
print("kurt : ", returns_sp500.____())
Kodu Düzenle ve Çalıştır