You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OrthoQuant is a high-performance Python framework for Symmetric Factor Orthogonalization and Cross-Sectional Risk Neutralization in quantitative alpha research.
Designed for quantitative researchers, portfolio managers, and statistical arbitrage teams to eliminate multicollinearity across alpha signals while mathematically minimizing signal distortion.
📖 Full Mathematical Derivations: Complete proofs, lemmas, and spectral analyses are documented in docs/mathematical_formulation.md.
Mathematical Notation & Definitions
Throughout this framework, all mathematical objects are strictly defined as follows:
Symbol
Mathematical Domain
Description
$N \in \mathbb{N}$
Dimension
Number of assets in the cross-sectional universe ($N \ge K$)
$K \in \mathbb{N}$
Dimension
Number of candidate alpha factors
$M \in \mathbb{N}$
Dimension
Number of common risk exposures ($M < N$)
$\mathbf{F} \in \mathbb{R}^{N \times K}$
Matrix
Factor matrix, $\mathbf{F} = [\mathbf{f}_1, \dots, \mathbf{f}_K]$, where $\mathbf{f}_k \in \mathbb{R}^N$ is factor $k$
Given candidate alpha signals $\mathbf{F} \in \mathbb{R}^{N \times K}$ with $\mathrm{rank}(\mathbf{F}) = K$, we seek an orthonormal factor matrix $\widetilde{\mathbf{F}} \in \mathcal{V}_K(\mathbb{R}^N)$ that minimizes the total Frobenius distortion from the original signals:
where $\mathbf{F} = \mathbf{U} \mathbf{\Sigma} \mathbf{V}^T$ is the thin Singular Value Decomposition (SVD) of $\mathbf{F}$ ($\mathbf{U} \in \mathbb{R}^{N \times K}$, $\mathbf{\Sigma} = \mathrm{diag}(\sigma_1, \dots, \sigma_K) \succ 0$, $\mathbf{V} \in \mathbb{R}^{K \times K}$).
Proof Sketch: Expanding $\lVert \mathbf{F} - \widetilde{\mathbf{F}} \rVert_F^2 = \mathrm{Tr}(\mathbf{F}^T \mathbf{F}) - 2 \mathrm{Tr}(\widetilde{\mathbf{F}}^T \mathbf{F}) + \mathrm{Tr}(\mathbf{I}_K)$, minimizing distance is equivalent to maximizing trace overlap $\max_{\widetilde{\mathbf{F}}^T \widetilde{\mathbf{F}} = \mathbf{I}} \mathrm{Tr}(\widetilde{\mathbf{F}}^T \mathbf{F})$. Substituting SVD $\mathbf{F} = \mathbf{U} \mathbf{\Sigma} \mathbf{V}^T$, we have $\mathrm{Tr}(\widetilde{\mathbf{F}}^T \mathbf{U} \mathbf{\Sigma} \mathbf{V}^T) = \mathrm{Tr}(\mathbf{Z}^T \mathbf{\Sigma})$ where $\mathbf{Z} \triangleq \mathbf{U}^T \widetilde{\mathbf{F}} \mathbf{V}$. Since $\lVert \mathbf{Z} \rVert_2 \le 1$, $\lvert z_{kk} \rvert \le 1$, the upper bound $\sum_k \sigma_k$ is attained if and only if $\mathbf{Z} = \mathbf{I}_K \iff \widetilde{\mathbf{F}} = \mathbf{U} \mathbf{V}^T$. $\blacksquare$ (See docs/mathematical_formulation.md for full proof; cf. Lowdin (1950), Higham (1988)).
Theorem 2 (Permutation Symmetry / Equivariance)
Let $\mathbf{P} \in \mathbb{R}^{K \times K}$ be any permutation matrix ($\mathbf{P}^T \mathbf{P} = \mathbf{I}_K$). If factors are permuted as $\mathbf{F}_{\pi} = \mathbf{F} \mathbf{P}$, then:
Theorem 4 (Numerical Stability via QR Decomposition)
Let $\mathbf{X} = \mathbf{Q}_X \mathbf{R}_X$ be the thin QR decomposition of $\mathbf{X}$ ($\mathbf{Q}_X^T \mathbf{Q}_X = \mathbf{I}_M$, $\mathbf{R}_X$ invertible). Then:
where $R_k^2$ is the coefficient of determination from regressing factor $k$ on all other $K-1$ factors (Belsley et al., 2005).
For orthogonal factors, $\mathbf{C} = \mathbf{I}_K \implies \mathrm{VIF}_k = 1.0$ for all $k$.
Effective Number of Factors (ENF)
Using the spectral entropy of the eigenvalue distribution $p_k = \lambda_k / K$ of $\mathbf{C}$ (Meucci, 2009):
If factors $\mathbf{Q} \in \mathcal{V}_K(\mathbb{R}^N)$ are orthonormal ($\mathbf{Q}^T \mathbf{Q} = \mathbf{I}_K$), then in the multiple regression $\mathbf{y} = \sum_{k=1}^K \beta_k \mathbf{q}_k + \boldsymbol{\varepsilon}$, the overall $R^2$ decomposes strictly additively:
Lowdin, P.-O. (1950). On the non-orthogonality problem connected with the use of atomic wave functions in the theory of molecules and crystals. The Journal of Chemical Physics, 18(3), 365–375.
Frisch, R., & Waugh, F. V. (1933). Partial time regressions as compared with individual trends. Econometrica, 1(4), 387–401.
Lovell, M. C. (1963). Seasonal adjustment of economic time series and multiple regression analysis. Journal of the American Statistical Association, 58(304), 993–1010.
Golub, G. H., & Van Loan, C. F. (2013).Matrix Computations (4th ed.). Johns Hopkins University Press.
Higham, N. J. (1988). Computing a nearest symmetric positive semidefinite matrix. Linear Algebra and its Applications, 103, 103–118.
Belsley, D. A., Kuh, E., & Welsch, R. E. (2005).Regression diagnostics: Identifying influential data and sources of collinearity. John Wiley & Sons.
Meucci, A. (2009). Managing diversification. Risk, 22(5), 74–79.
Kakushadze, Z. (2015). Factor models and alpha streams. The Journal of Investment Strategies, 5(1), 1–45.