เริ่มต้นใช้งานเริ่มต้นใช้งานได้ฟรี

Skewness of the S&P500

We already know from the video that the S&P500 should be normally distributed, without too much skewness (when you have enough data). However, since you're working with a short data sample spanning only a few years, there might actually be some skewness in your sample. To make you aware of this potential sample skewness, let's plot the data and have a look.

The returns data from the S&P500 is available as returns_sp500.

แบบฝึกหัดนี้เป็นส่วนหนึ่งของหลักสูตร

Introduction to Portfolio Analysis in Python

ดูคอร์ส

แบบฝึกหัดเชิงโต้ตอบแบบลงมือทำ

ลองทำแบบฝึกหัดนี้โดยเติมโค้ดตัวอย่างนี้ให้สมบูรณ์

# Create a histogram of the S&P500 returns and show the plot
____.____()
plt.show()
แก้ไขและรันโค้ด