금융/시계열

[시계열] 충격반응분석 (Impulse Response Analysis) - (2) (Cholesky Decomposition)

xeskin 2020. 8. 31. 15:14
반응형

Cholesky Decomposition

Cholesky Decomposition은 두 변수를 코릴시키려고 쓴다. 예를 들어서, 두변수 $y, z$가 공분산 행렬(covriance matrix) $\textbf{I}$를 갖는다 쳐보자. 그리고 $y, z$가 공분산 $\rho$를 갖게 다른 변수로 변환을 시켜주고 싶다. 아이디어는 간단하다. 우리가 random vector $\vec{x}=\begin{bmatrix} y \\ z \end{bmatrix}$를 계산할 때, 이를 다음과 같이 계산한다.

$$\begin{equation}\begin{split} Var(\textbf{A}\vec{x}) & = \textbf{A}Var(\vec{x})\textbf{A}^{t} \\ & = \textbf{A}\textbf{I}\textbf{A}^{t} \\ & = \textbf{A}\textbf{A}^{t} \end{split}\end{equation} $$

그러므로, 우리는 $\textbf{A}\textbf{A}^{t}$와 우리가 원하는 공분산 행렬과 갖게 만들어줄 행렬 $\textbf{A}$를 찾아주기만 하면 된다.

$$\begin{equation} \begin{split} \begin{bmatrix} 1 & \rho \\ \rho & 1 \end{bmatrix} & = \begin{bmatrix} a_{11} & 0 \\ a_{21} & a_{22} \end{bmatrix} \begin{bmatrix} a_{11} & 0 \\ a_{21} & a_{22} \end{bmatrix}^{t} \\ & = \begin{bmatrix} a_{11} & 0 \\ a_{21} & a_{22} \end{bmatrix} \begin{bmatrix} a_{11} & a_{21} \\ 0 & a_{22} \end{bmatrix} \\ & = \begin{bmatrix} a_{11}^{2} & a_{11}a_{21} \\ a_{21}a_{11} & a_{21}^{2}+a_{22}^{2} \end{bmatrix} \end{split} \end{equation}$$

그러므로, 우리는 다음 방정식을 풀기만 하면 된다.

$$\begin{aligned} \begin{cases} a_{11}^{2}=1 \\ a_{11}a_{21}=\rho \\ a_{21}^{2}+a_{22}^{2}=1 \end{cases} \Rightarrow \begin{cases} a_{11}=1 \\ a_{21}=\rho \\ a_{22}=\sqrt{1-\rho^{2}} \end{cases} \end{aligned}$$

그러면 이제 변환해주는 벡터 하나를 정의할 수 있다.

$$\begin{equation} \begin{split} \vec{x}_{trans} & = \begin{bmatrix} 1 & 0 \\ \rho & \sqrt{1-\rho^{2}} \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} \\ & = \begin{bmatrix} x \\ x \rho + y \sqrt{1-\rho^{2}} \end{bmatrix} \end{split} \end{equation}$$

이를 이용하면 공분산 행렬을 항등 행렬로 쉽게 바꿔줄 수 있다. $\vec{x}$의 공분산 행렬을 $\boldsymbol{\Sigma}$라 해보자. 그러면 우리는 $Var(\textbf{A}\vec{x})=\textbf{A}\boldsymbol{\Sigma}\textbf{A}^{t}=\textbf{I}$로 만들어주는 행렬 $\textbf{A}$를 찾을 수 있다. 이건 $\boldsymbol{\Sigma}^{-1}$을 얻기 위해 'Cholesky Decomposition'을 적용하는 것과 같다.

$$\begin{equation} \begin{split} &\;\;\;\;\;\, \textbf{I}=\textbf{A}\boldsymbol{\Sigma}\textbf{A}^{t} \\ & \Rightarrow \textbf{I}^{-1}=(\textbf{A}^{-1})^{-1}\boldsymbol{\Sigma}^{-1}\textbf{A}^{-1} \\ & \Rightarrow \boldsymbol{I}=(\textbf{A}^{t})^{-1}\boldsymbol{\Sigma}^{-1}\textbf{A}^{-1} \\ & \Rightarrow \textbf{A}^{t}\textbf{I}\textbf{A}=\boldsymbol{\Sigma}^{-1} \\ & \Rightarrow \textbf{A}^{t}\textbf{A}=\boldsymbol{\Sigma}^{-1} \end{split} \end{equation}$$

그래서 우리는 $\textbf{A}^{t}\textbf{A}=\boldsymbol{\Sigma}^{-1}$인 $\textbf{A}$를 찾아서 $\vec{x}_{trans}=\textbf{A}\vec{x}$로 두기만 하면된다.

$$\begin{equation} \begin{split} Var(\vec{x}_{trans}) & = Var(\textbf{A}\vec{x}) \\ & = \textbf{A}Var(\vec{x})\textbf{A}^{t} \\ & = \textbf{A}\boldsymbol{\Sigma}\textbf{A}^{t} \\ & = \textbf{I} \end{split} \end{equation}$$

그러므로, 주어진 시계열 $\vec{x}_{t}=\textbf{B}(L)\vec{\epsilon}_{t}$, where $Var(\vec{\epsilon}_{t})=\boldsymbol{\Sigma} \neq \textbf{I}$에 대해서 다음과 같은 순서로 계산하면 두 변수를 코릴시켜 줄 수 있다.

 

1. $\textbf{A}^{t}\textbf{A}=\boldsymbol{\Sigma}^{-1}$인 $\textbf{A}$를 찾는다.
2. $\vec{x}_{t}$를 다음과 같이 둔다. $\vec{x}_{t}=\textbf{B}(L)\textbf{A}^{-1}\textbf{A}\vec{\epsilon}_{t}=\textbf{B}(L)\textbf{A}^{-1}\vec{\xi}_{t}$, $\textbf{B}(L)$은 lag-operator $L$의 다항함수다.
3. $\textbf{C}(L)=\textbf{B}(L)\textbf{A}^{-1}$인 $\textbf{C}(L)$을 정의한다. $\Rightarrow \vec{x}_{t}=\textbf{C}(L)\vec{\xi}_{t}$
4. 충격반응함수(Impulse Responsibility Function)를 계산한다.

 

*Cholesky Decomposition은 QR Decomposition이라고도 불린다.

반응형