与基准比较

Python 投资组合分析入门

Charlotte Werger

Data Scientist

相对基准的主动投资

投资组合累计收益与基准累计收益

Python 投资组合分析入门

主动管理组合的超额收益

$$

  • 超额收益是(主动)投资相对其基准的表现。
  • 计算为实际收益减去基准收益的差。
  • 超额收益来自"主动"配置,即相对基准的超配与低配。
Python 投资组合分析入门

指数跟踪的跟踪误差

$$

  • 被动基金或指数跟踪产品不以超额收益衡量绩效。
  • 被动基金中,组合与基准的差异称为跟踪误差。
Python 投资组合分析入门

主动权重

各行业主动权重的柱状图

1 来源:Schwab Center for Financial Research.
Python 投资组合分析入门

Python 计算超额收益

# Inspect the data 
portfolio_data.head()
      mean_ret    var     pf_w     bm_w     GICS Sector    
Ticker                            
A       0.146    0.035    0.002    0.005    Health Care    
AAL     0.444    0.094    0.214    0.189    Industrials    
AAP     0.242    0.029    0.000    0.000    Consumer Discretionary    
AAPL    0.225    0.027    0.324    0.459    Information Technology        
ABBV    0.182    0.029    0.026    0.010    Health Care
1 全球行业分类标准(GICS)
Python 投资组合分析入门

Python 计算超额收益

# Calculate mean portfolio return
total_return_pf = (pf_w*mean_ret).sum()
# Calculate mean benchmark return
total_return_bm = (bm_w*mean_ret).sum()
# Calculate active return
active_return = total_return_pf - total_return_bm 
print ("Simple active return: ", active_return)
Simple active return: 6.5764
Python 投资组合分析入门

Python 计算主动权重

# Group dataframe by GICS sectors 
grouped_df=portfolio_data.groupby('GICS Sector').sum()
# Calculate active weights of portfolio
grouped_df['active_weight']=grouped_df['pf_weights']-
                            grouped_df['bm_weights']

print (grouped_df['active_weight'])
GICS Sector
Consumer Discretionary         20.257
Financials                     -2.116
...etc
Python 投资组合分析入门

Passons à la pratique !

Python 投资组合分析入门

Preparing Video For Download...