## Security Risk

A security's risk comes in different flavors: total risk (standard deviation), and risk decomposition (factor & specific variance).

These values are retrievable from the security risk node from the Omega Point API (which drives all the data displayed within the web application):

`# The security's risk values as Std Dev & Variance Decomposition`

type SecurityRisk {

# The security's predicted risk (std dev)

standardDeviation: {

# The security's total predicted risk

total: Float

}

# The risk decomposition of the security, as a % of total risk

varianceDecomposition:{

# The aggregate decompositions of the security's risk

summary:{

# The % of the security's risk attributed to specific risk (as

a variance decomposition to total risk)

specific: Float

# The % of the security's risk attributed to factor risk (as a

variance decomposition to total risk)

factors: Float

}

}

}

The total risk value itself comes directly from the underlying risk model, though the definition of total risk across models remains consistent, and can be thought of in the following terms:

`factor variance = X * F * X.T`

where

X are the exposures, X.T is the transpose

F is the factor covariance matrix

specific variance = W * S * W.T

where

W = security weights

S = security covariance

W.T = weight transpose

total variance = factor variance + specific variance

total risk = sqrt(total variance)

## Portfolio Risk

Portfolio risk is calculated using the standard deviation of each security in the portfolio and the correlation between securities in the portfolio. This number is displayed as a portfolio's total risk.

We can back out the factor and specific decomposition in terms of standard deviation of (total) risk, as follows:

`variance `

= (standard std risk)^2

variance(total)

= variance(factor) + variance(specific)

variance(total)

= (%variance factor) * variance(total) + (%variance specific) * variance(total)

(std risk total)^2

= (std factor risk)^2 + (std idio risk)^2

= (%variance factor) * variance(total) + (%variance specific) * variance(total)

(std factor risk)^2

= (% variance factor) * variance(total)

`Note that % variance can be negative. % variance should always be positive for factor vs idiosyncratic since idiosyncratic and total are always positive.`