IniziaInizia gratis

Calculating financial returns

The file you loaded in the previous exercise included daily Open, High, Low, Close, Adjusted Close, and Volume data, often referred to as OHLCV data.

The Adjusted Close column is the most important. It is normalized for stock splits, dividends, and other corporate actions, and is a true reflection of the return of the stock over time. You will be using the adjusted close price to calculate the returns of the stock in this exercise.

StockPrices from the previous exercise is available in your workspace, and matplotlib.pyplot is imported as plt.

Questo esercizio fa parte del corso

Introduction to Portfolio Risk Management in Python

Visualizza il corso

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Calculate the daily returns of the adjusted close price
StockPrices['Returns'] = StockPrices[____].____
Modifica ed esegui il codice