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

Active return

In this first exercise, you're going to calculate the active return of a portfolio that's managed against a benchmark. You've learned many ways of how to calculate total return over a period. For this exercise, you'll use the simple mean returns multiplied with the weights to obtain a total return for both the portfolio as well as the benchmark. Available is portfolio data containing weights and asset returns under portfolio_data. Have a look at the data by running portfolio_data.head(10) in the IPython Shell. Good luck!

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

Introduction to Portfolio Analysis in Python

ดูคอร์ส

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

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

# Check the portfolio weights
print(portfolio_data.____.____())
แก้ไขและรันโค้ด