Alto Steel’s pension plan has $250 million in assets with an expected return of 12 percent. The
last thirty monthly returns are given below. What is the 10 percent monthly probability VAR for
Alto’s pension plan?
import pandas as pd portfolio_value=250000000 #清洗数据 data='21.84% -21.50% 31.76% 8.88% 2.54% 17.44%6.97% 10.00% 2.71% 35.66% 31.07% 18.56%9.82% -7.94% -0.78% 12.57% 11.77% 8.47%2.99% 14.35% 14.20% 9.81% 11.03% 22.25%9.68% 19.55% 8.53% 39.45% 36.15% 10.97%' data=data.replace('\xa0','').split('%') data=[float(i)/100 for i in data if len(i)>0] #对数据进行排序 data=sorted(data) # the 10% oercent percent=0.0078 # the var var=portfolio_value*percent print('var is',var)