docs: 添加金融相关性计算方法调研报告
调研背景: - 分析韩国半导体ETF相关性时发现Pearson与Spearman矛盾 - 短债vs韩国:Pearson=0.771(异常高),Spearman=-0.007(不相关) - 波动率差距100倍导致Pearson偏差 调研结论: - Pearson在波动率差距大时不可靠 - Spearman对极端值稳健,推荐用于金融 - 业界(AQR)使用月度数据或波动率标准化 参考文献: - Kendall Correlation for Portfolio Optimization (arXiv) - Value and Momentum Everywhere (AQR) - DCC-GARCH (风险管理标准)
This commit is contained in:
282
docs/20260622_金融相关性计算方法调研.md
Normal file
282
docs/20260622_金融相关性计算方法调研.md
Normal file
@@ -0,0 +1,282 @@
|
||||
# 金融资产相关性计算方法调研报告
|
||||
|
||||
> 调研日期:2026-06-22
|
||||
> 调研来源:学术文献、业界实践(AQR)、实验验证
|
||||
> Git Commit:`d4edbbb`(验证实验)
|
||||
> 当前结论:金融资产相关性计算应使用Spearman或波动率标准化Pearson,而非原始Pearson
|
||||
|
||||
---
|
||||
|
||||
## 1. 调研背景
|
||||
|
||||
### 1.1 问题来源
|
||||
|
||||
在分析韩国半导体ETF(513310.SH)与配置中各ETF的相关性时,发现**Pearson相关性出现异常结果**:
|
||||
|
||||
| 配对 | Pearson相关性 | Spearman相关性 | 矛盾分析 |
|
||||
|------|--------------|---------------|---------|
|
||||
| 短债指数 vs 韩国半导体 | **0.771**(高度正相关) | **-0.007**(不相关) | 极度矛盾 |
|
||||
| 纵指100 vs 韩国半导体 | 0.384(中等) | 0.406(中等) | 基本一致 |
|
||||
|
||||
**核心疑问**:短债指数(防御资产)与韩国半导体(高风险周期股)相关性高达0.771完全不符合金融常识,为何会出现这种异常?
|
||||
|
||||
### 1.2 数据特征
|
||||
|
||||
| 标的 | 波动率(年化) | 日收益率标准差 | 日收益率范围 |
|
||||
|------|--------------|---------------|-------------|
|
||||
| 短债指数 | **0.56%** | 0.000351 | [-0.04%, 0.72%] |
|
||||
| 韩国半导体 | **60.51%** | 0.026084 | [-10%, 10%] |
|
||||
| 纵指100 | 24.53% | 0.0098 | [-5%, 5%] |
|
||||
|
||||
**关键发现**:短债与韩国半导体波动率差距**100倍**,这可能导致Pearson相关性计算偏差。
|
||||
|
||||
---
|
||||
|
||||
## 2. 调研内容
|
||||
|
||||
### 2.1 相关性计算方法对比
|
||||
|
||||
| 方法 | 定义 | 适用场景 | 缺点 | 金融应用 |
|
||||
|------|------|---------|------|---------|
|
||||
| **Pearson** | 线性相关性,$r = \frac{\sum(x-\bar{x})(y-\bar{y})}{\sqrt{\sum(x-\bar{x})^2\sum(y-\bar{y})^2}}$ | 正态分布、无极端值 | ❌敏感于极端值、异方差 | 基础研究,但需谨慎 |
|
||||
| **Spearman** | 排序相关性(基于Rank) | 非线性关系、有极端值 | 只捕捉单调关系 | **推荐用于金融** |
|
||||
| **Kendall** | 秩相关性(τ系数) | 小样本、非正态分布 | 计算量较大 | 投资组合优化 |
|
||||
| **DCC-GARCH** | Dynamic Conditional Correlation | 时变相关性 | 模型复杂 | **风险管理标准** |
|
||||
| **Copula** | 尾部相关性 | 极端事件、危机期间 | 参数选择困难 | 风险压力测试 |
|
||||
|
||||
### 2.2 Pearson相关性在金融中的局限性
|
||||
|
||||
#### 2.2.1 极端值敏感
|
||||
|
||||
根据学界研究,Pearson相关性受极端值(outliers)严重影响:
|
||||
- 金融时间序列常有极端波动(黑天鹅事件)
|
||||
- 一个极端日可以扭曲整个相关性估计
|
||||
- 例:某日韩国半导体涨10%,短债涨0.1%,该日对Pearson贡献极大
|
||||
|
||||
**来源**:[The instability of the Pearson correlation coefficient](https://ideas.repec.org/a/eee/finlet/v13y2015icp243-257.html)
|
||||
|
||||
#### 2.2.2 波动率尺度问题(Heteroskedasticity)
|
||||
|
||||
Pearson相关性假设两个序列具有相似的波动率尺度:
|
||||
- 短债波动率:0.56%(几乎不动)
|
||||
- 韩国半导体波动率:60.51%(剧烈波动)
|
||||
- 波动率差距100倍时,Pearson相关性会产生偏差
|
||||
|
||||
**业界标准做法**:进行波动率标准化(volatility scaling)
|
||||
|
||||
$$r_{scaled} = corr(\frac{r_1}{\sigma_1}, \frac{r_2}{\sigma_2})$$
|
||||
|
||||
**来源**:[Robust estimation of historical volatility and correlations](https://ideas.repec.org/a/taf/quantf/v9y2009i1p43-54.html)
|
||||
|
||||
#### 2.2.3 非正态分布
|
||||
|
||||
金融收益率分布特征:
|
||||
- **厚尾**(fat-tailed):极端事件发生频率高于正态分布预期
|
||||
- **偏态**(skewed):不对称分布
|
||||
- Pearson假设正态分布,实际数据不符合假设
|
||||
|
||||
**来源**:[Modelling time-varying correlations of financial markets](https://www.researchgate.net/publication/4799583_Modelling_time-varying_correlations_of_financial_markets)
|
||||
|
||||
#### 2.2.4 时变性问题
|
||||
|
||||
金融相关性随市场状态变化:
|
||||
- 牛市相关性:通常较低(分散化有效)
|
||||
- 熊市相关性:通常上升(correlation breakdown)
|
||||
- Pearson假设静态相关性,忽略了动态特性
|
||||
|
||||
**来源**:[Dynamic Conditional Correlation GARCH](https://digitalcommons.wayne.edu/cgi/viewcontent.cgi?article=2722&context=jmasm)
|
||||
|
||||
### 2.3 学界推荐的最佳实践
|
||||
|
||||
#### 2.3.1 投资组合优化:Kendall或Spearman
|
||||
|
||||
根据 [Kendall Correlation Coefficients for Portfolio Optimization](https://arxiv.org/html/2410.17366v1):
|
||||
|
||||
> Kendall τ系数在投资组合优化中表现优于Pearson,原因是对极端值稳健,能捕捉非线性关系。
|
||||
|
||||
**核心结论**:
|
||||
- Kendall/Spearman对极端值稳健
|
||||
- 不依赖于收益率分布假设
|
||||
- 更适合厚尾、非正态的金融数据
|
||||
|
||||
#### 2.3.2 风险管理:DCC-GARCH
|
||||
|
||||
根据 [A DCC GARCH Approach to Understanding Equity-Bond Correlation](https://research.cbs.dk/files/98730005/1605479_AferlaHDecker_Thesis.pdf):
|
||||
|
||||
> Dynamic Conditional Correlation (DCC)模型允许相关性随时间变化,是风险管理的业界标准。
|
||||
|
||||
**应用场景**:
|
||||
- VaR/CVaR计算
|
||||
- 压力测试
|
||||
- 跨资产风险监控
|
||||
|
||||
#### 2.3.3 压力测试:Copula
|
||||
|
||||
根据 [Tail Dependence - Copula Models](https://wisostat.uni-koeln.de/fileadmin/sites/statistik/pdf_publikationen/TDCSchmidt.pdf):
|
||||
|
||||
> Copula模型能捕捉尾部相关性(tail dependence),在危机期间相关性上升时尤为重要。
|
||||
|
||||
**应用场景**:
|
||||
- 黑天鹅事件模拟
|
||||
- 极端风险情景分析
|
||||
|
||||
### 2.4 业界实践案例
|
||||
|
||||
#### 2.4.1 AQR的做法
|
||||
|
||||
根据 [Value and Momentum Everywhere](https://w4.stern.nyu.edu/facdir/lpederse/papers/ValMomEverywhere.pdf):
|
||||
|
||||
**核心方法**:
|
||||
1. 使用**月度收益率**而非日度(降低噪音)
|
||||
2. 计算**滚动相关性**(长期窗口,如36个月)
|
||||
3. 跨资产相关性矩阵分析
|
||||
|
||||
**原因**:
|
||||
- 日度收益率噪音太大
|
||||
- 月度数据更稳定,相关性估计更可靠
|
||||
- 滚动窗口捕捉动态变化
|
||||
|
||||
#### 2.4.2 风险管理标准
|
||||
|
||||
根据 [Understanding Correlation in Finance](https://www.scribd.com/document/937587716/2-CORRELATION):
|
||||
|
||||
**最佳实践**:
|
||||
- 正常时期:使用Spearman或Kendall
|
||||
- 波动率差距大时:使用波动率标准化
|
||||
- 动态监控:使用DCC-GARCH
|
||||
- 压力测试:使用Copula
|
||||
|
||||
---
|
||||
|
||||
## 3. 验证实验
|
||||
|
||||
### 3.1 实验设计
|
||||
|
||||
**实验目标**:验证不同相关性计算方法在波动率差距大的情况下的一致性
|
||||
|
||||
**实验对象**:
|
||||
- 短债指数(波动率0.56%)
|
||||
- 韩国半导体ETF(波动率60.51%)
|
||||
- 纵指100 ETF(波动率24.53%)
|
||||
|
||||
**计算方法**:
|
||||
- Pearson相关性
|
||||
- Spearman相关性
|
||||
|
||||
### 3.2 实验结果
|
||||
|
||||
| 配对 | Pearson | Spearman | 差异分析 |
|
||||
|------|---------|----------|---------|
|
||||
| 短债 vs 韩国 | **0.771** | **-0.007** | Pearson异常高,Spearman不相关 |
|
||||
| 短债 vs 纵指 | 0.101 | -0.003 | 基本一致(都不相关) |
|
||||
| 韩国 vs 纵指 | 0.384 | 0.406 | 基本一致(中等相关) |
|
||||
|
||||
### 3.3 结果分析
|
||||
|
||||
**短债 vs 韩国半导体 Pearson=0.771 异常原因**:
|
||||
|
||||
1. **波动率差距100倍**导致计算偏差
|
||||
2. Pearson对极端值敏感,韩国半导体日涨跌10%的极端日对相关性贡献过大
|
||||
3. 短债几乎不动,但极端日"同向变动"的偶然性被放大
|
||||
|
||||
**Spearman=-0.007 是正确结果**:
|
||||
|
||||
1. Spearman基于排序,不受波动率尺度影响
|
||||
2. 短债排序几乎不变,韩国半导体排序剧烈变化
|
||||
3. 排序变化无相关性 → Spearman接近0
|
||||
|
||||
---
|
||||
|
||||
## 4. 结论与建议
|
||||
|
||||
### 4.1 核心结论
|
||||
|
||||
| 结论 | 说明 |
|
||||
|------|------|
|
||||
| **Pearson相关性在波动率差距大时不可靠** | 波动率差距超过10倍时应避免使用原始Pearson |
|
||||
| **Spearman相关性更稳健** | 对极端值稳健,不受波动率尺度影响 |
|
||||
| **业界推荐:波动率标准化或月度数据** | AQR使用月度数据,风险管理使用波动率标准化 |
|
||||
|
||||
### 4.2 对本项目的影响
|
||||
|
||||
**韩国半导体ETF相关性结论(使用Spearman)**:
|
||||
|
||||
| ETF | Spearman相关性 | 配置建议 |
|
||||
|-----|---------------|---------|
|
||||
| 纵指100 | 0.406 | 中等相关,可配置 |
|
||||
| 日经225 | 需重算 | - |
|
||||
| 创业板 | 需重算 | - |
|
||||
| 短债 | -0.007 | 不相关,无竞争 |
|
||||
| 黄金 | 需重算 | - |
|
||||
|
||||
### 4.3 建议修正方案
|
||||
|
||||
**推荐计算方法**:
|
||||
|
||||
```python
|
||||
def calculate_correlation_robust(prices1, prices2, method='spearman'):
|
||||
"""
|
||||
金融资产相关性计算(稳健方法)
|
||||
|
||||
Args:
|
||||
prices1, prices2: 价格序列
|
||||
method: 'spearman', 'kendall', 'vol_scaled_pearson', 'monthly'
|
||||
|
||||
Returns:
|
||||
相关系数
|
||||
"""
|
||||
import pandas as pd
|
||||
|
||||
returns1 = prices1.pct_change().dropna()
|
||||
returns2 = prices2.pct_change().dropna()
|
||||
|
||||
if method == 'spearman':
|
||||
# 排序相关性(对极端值稳健)
|
||||
return returns1.corr(returns2, method='spearman')
|
||||
|
||||
elif method == 'kendall':
|
||||
# Kendall秩相关性
|
||||
return returns1.corr(returns2, method='kendall')
|
||||
|
||||
elif method == 'vol_scaled_pearson':
|
||||
# 波动率标准化Pearson(业界标准)
|
||||
vol1, vol2 = returns1.std(), returns2.std()
|
||||
scaled1, scaled2 = returns1/vol1, returns2/vol2
|
||||
return scaled1.corr(scaled2, method='pearson')
|
||||
|
||||
elif method == 'monthly':
|
||||
# 月度收益率相关性(AQR做法)
|
||||
monthly1 = prices1.resample('M').last().pct_change().dropna()
|
||||
monthly2 = prices2.resample('M').last().pct_change().dropna()
|
||||
return monthly1.corr(monthly2, method='pearson')
|
||||
```
|
||||
|
||||
### 4.4 后续建议
|
||||
|
||||
1. **重算韩国半导体与所有配置ETF的Spearman相关性**
|
||||
2. **基于正确相关性判断是否加入配置**
|
||||
3. **建立标准化的相关性计算脚本**,避免未来出现类似问题
|
||||
|
||||
---
|
||||
|
||||
## 5. 参考文献
|
||||
|
||||
### 学术文献
|
||||
|
||||
1. [Kendall Correlation Coefficients for Portfolio Optimization - arXiv](https://arxiv.org/html/2410.17366v1)
|
||||
2. [Value and Momentum Everywhere - NYU Stern](https://w4.stern.nyu.edu/facdir/lpederse/papers/ValMomEverywhere.pdf)
|
||||
3. [Dynamic Conditional Correlation GARCH](https://digitalcommons.wayne.edu/cgi/viewcontent.cgi?article=2722&context=jmasm)
|
||||
4. [Robust estimation of historical volatility and correlations](https://ideas.repec.org/a/taf/quantf/v9y2009i1p43-54.html)
|
||||
5. [Tail Dependence - Copula Models](https://wisostat.uni-koeln.de/fileadmin/sites/statistik/pdf_publikationen/TDCSchmidt.pdf)
|
||||
|
||||
### 业界实践
|
||||
|
||||
1. [Value and Momentum Everywhere - AQR](https://www.aqr.com/Insights/Datasets/Value-and-Momentum-Everywhere-Factors-Monthly)
|
||||
2. [Cross-asset Correlation - QuestDB](https://questdb.com/glossary/cross-asset-correlation/)
|
||||
3. [Understanding Correlation in Finance](https://www.scribd.com/document/937587716/2-CORRELATION)
|
||||
|
||||
---
|
||||
|
||||
**文档版本**:v1.0
|
||||
**创建日期**:2026-06-22
|
||||
**调研状态**:已完成
|
||||
Reference in New Issue
Block a user