Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Measuring Risk of Portfolio | Portfolio Analysis Basics
Introduction to Financial Portfolio Management with Python
course content

Зміст курсу

Introduction to Financial Portfolio Management with Python

Introduction to Financial Portfolio Management with Python

1. Portfolio Analysis Basics
2. Portfolio Optimization Basics
3. Factor Investing

Measuring Risk of Portfolio

What is Risk?

Next, let's discover the second key concept in portfolio analysis - risk.

First of all, let's define what risk is.

Practically, investing always involves risk because asset prices fluctuate frequently.

They can fall just as easily as they can rise.

Common Measure of Risk

The question arises: how to measure risk?

Since investing is considered riskier when an asset's price fluctuates more significantly, a common measure of risk is the standard deviation of an asset's returns or corresponding variance.

This is common measure, also known as volatility.

Here is a code example of measuring risk of assets:

123456789101112131415161718
# Importing necessary library import pandas as pd # Creating DataFrame `stocks` with values of stock prices of Apple, Meta and Amazon for the period from `2024-09-06` to `2024-09-10` stocks = pd.DataFrame(index = ['2024-09-06', '2024-09-09', '2024-09-10', '2024-09-11'], columns = ['Apple', 'Meta', 'Amazon'], data = [[220.14, 499.60, 170.56], [220.88, 505.90, 176.25], [219.74, 504.56, 179.40], [222.14, 512.20, 184.05]]) # Printing basic DataFrame `stocks` print ('Stock data: \n') print(stocks) # Printing DataFrame with values of corresponding return print ('Return: \n') print(stocks.pct_change()) # Printing Series with measures of risk for each company print ('Risk: \n') print(stocks.pct_change().std())
copy

Risk of Portfolio

After we have covered the key aspects of the risk associated with individual investments, it's time to turn our attention to the risk of an entire portfolio.

We will explore this topic in the following video:

Here is a corresponding Google Colab.

Additionally, there are several other measures of financial risk, some of which we will explore in later chapters of this course.

Why do we need consider covariance matrix of returns while computing risk of portfolio?

Виберіть правильну відповідь

Все було зрозуміло?

Секція 1. Розділ 4
We're sorry to hear that something went wrong. What happened?
some-alt