Hierarchical Risk Parity (HRP) 5. Tree Clustering.
Stage 1 : Tree Clustering에 대해 설명해보려 한다.
이 과정에서는 portfolio를 구성하는 asset을 가격 움직임이 얼마나 비슷한지에 따라 순서대로 엮는다.
과정은 다음과 같다.
1. 가격 움직임이 가장 비슷한(=Euclidean Distance가 가까운, https://lunarkim0.tistory.com/51 참조.) 두 assets (혹은 link)를 가장 먼저 묶고, 이를 Link로 나타낸다.
2. 이후 link와 다른 모든 asset 간의 Euclidean distance를 정의한다.
3. 새롭게 만들어진 Eucidean Distance들을 Matrix에 추가한다. 기존의 두 asset(혹은 link)는 행렬에서 제외한다.
4. 1~3을 반복한다. 이를 반복하면 matrix에는 결국 하나의 link만 남게 된다.
이때 두 asset 간의 Euclidean distance는 아래와 같이 정의된다.
# Euclidean_distance(A,B)
# = sum( (d(A,i)-d(B,i))**2) )**(1/2)
# d := 두 asset 간의 distance
# := ( (1/2) * (1-corr(i,j)) )**(1/2)
# corr(i,j) = 두 변수 i와 j의 상관계수
# = cov(i,j) / ( std(i) * std(j) )
또한 link[A,B]와 asset C의 Euclidean distance는 아래와 같이 정의된다.
# Euclidean_distance(link[A,B],C)
# = min( Euclidean_distance(A,C),
# Euclidean_distance(B,C))
# min(A,B)는 A와 B중 같거나 더 작은 값.
이 과정을 거치면 다음과 같은 그림이 나온다. x축이 asset의 종류이고, y축이 asset 간의 거리이다.
또한 이를 linkage matrix를 통해 나타낼 수도 있는데,
https://lunarkim0.tistory.com/52여기랑
https://lunarkim0.tistory.com/49여기를 참고하면 도움이 될 것이다.