# Transform Hierarchical Correlation structure to Standard Form

In the standard portfolio risk setup, we have

$$\sigma_{\Pi} = \sqrt{(w' B (VFV) B' w) + w'Dw}$$

where

• $$w$$ is our weight vector for N assets
• $$B$$ is the Nxm factor beta matrix
• $$V$$ is the factor volatility matrix with factor volatilities on the diagonal and zeros elsewhere
• $$F$$ is the mxm factor correlation matrix
• $$D$$ is the NxN idiosyncratic variance matrix with idio variances on the diagonal and zeros elsewhere

$$VFV$$ is the factor covariance matrix, but I specify it factored out. A key assumption of course is that the idiosyncratic risk is uncorrelated with the factor risk.

However I have a bit of a different problem statement:

• I have $$N$$ idiosyncratic risks with a block diagonal correlation matrix. The blocks represent $$k$$ groups of assets. The idiosyncratic returns are correlated between assets of the same group, but have zero correlation with assets outside that group.
• I have $$m$$ factor risks as usual, but
• I also have given correlations between the $$m$$ factors and each of the $$k$$ groups.
• As such, I have
• A top level correlation matrix, $$R$$ which is (m+k)x(m+k)
• k little correlation matrices with cumulative dimensions of NxN

I am calculating the portfolio risk in a two stage process:

• Stage 1, I get the variances within each $$k$$ groups; this gives me $$k$$ variances
• Stage 2,
• I augment the beta matrix $$B$$ with indicator variables for group membership; $$B$$ is now Nx(m+k)
• I make $$V$$ such that the diagonal for length $$m$$ contains the factor variances and stack on $$k$$ variances
• I then apply $$\sigma_{\Pi} = \sqrt{(w' B (VRV) B' w)}$$

My question is How do I formulate the problem so that I do not have to do it in two stages? I am trying to setup a single correlation matrix, beta matrix, and variance matrix that faithfully represents this hierarchical setup.