Course Content
Introduction to Portfolio Management with Python
Introduction to Portfolio Management with Python
Annualized Risk
Now, we're going to discuss annualization in terms of risk.
In practice, it is defined in a way that is analogical to the annualized return, and majorly used for comparing risk of different assets.
Risk measured by standard deviation the annualized value can generally be calculated using the following formula:
So, for example, if we're working with monthly risk - then annualized one could be computed using the next expression:
Or, in case of daily risk, to annualize we use time period equal to 252, since it is an approximate number of trading days in a year (excluding weekends and holidays), and the following expression is used for computing:
Below is a code example for computing annualized risks for the instance provided above:
# Computing annualized risk for Nvidia Nvidia_annualized = 0.007 * 252 ** 0.5 print('Nvidia:') print(Nvidia_annualized) # Computing annualized risk for AMD AMD_annualized = 0.03 * 12 ** 0.5 print('AMD:') print(AMD_annualized)
Swipe to show code editor
In this task you need to:
- Compute the annualized risk
vol_sony_annualized
for the Sony Group Corporation stocks, using the given daily riskvol_sony
, by defining the required time periodT_sony
, and applying the formula for annualized risk. - Compute the annualized risk
vol_cola_annualized
for the Coca-Cola Company stocks, using the given monthly riskvol_cola
, by defining the required time periodT_cola
, and applying the formula for annualized risk.
Thanks for your feedback!
Annualized Risk
Now, we're going to discuss annualization in terms of risk.
In practice, it is defined in a way that is analogical to the annualized return, and majorly used for comparing risk of different assets.
Risk measured by standard deviation the annualized value can generally be calculated using the following formula:
So, for example, if we're working with monthly risk - then annualized one could be computed using the next expression:
Or, in case of daily risk, to annualize we use time period equal to 252, since it is an approximate number of trading days in a year (excluding weekends and holidays), and the following expression is used for computing:
Below is a code example for computing annualized risks for the instance provided above:
# Computing annualized risk for Nvidia Nvidia_annualized = 0.007 * 252 ** 0.5 print('Nvidia:') print(Nvidia_annualized) # Computing annualized risk for AMD AMD_annualized = 0.03 * 12 ** 0.5 print('AMD:') print(AMD_annualized)
Swipe to show code editor
In this task you need to:
- Compute the annualized risk
vol_sony_annualized
for the Sony Group Corporation stocks, using the given daily riskvol_sony
, by defining the required time periodT_sony
, and applying the formula for annualized risk. - Compute the annualized risk
vol_cola_annualized
for the Coca-Cola Company stocks, using the given monthly riskvol_cola
, by defining the required time periodT_cola
, and applying the formula for annualized risk.
Thanks for your feedback!