Risk and performance measures: methods
Last updated 10 November 2026
This page describes how GIAnalyzer computes risk and performance measures from a history of prices or values: how the history is turned into changes, how each risk and performance measure is computed, and what the measures do not do. It describes GIAnalyzer version 5.12.0. It is provided for information and is not a contractual specification.
The function-level detail is in the function reference.
Coverage
| Group | Measures | Inputs |
|---|---|---|
| Statistics of changes | Average change, average absolute change, percentile, frequency, volatility, EWMA volatility | One price history, or two, when the measure is taken on the difference between their changes |
| Statistics of values | Average, percentile, frequency | One history of values, or the difference between two |
| Co-movement | Correlation, beta, tracking error | Two histories |
| Portfolio volatility | Volatility of a weighted portfolio | Weights, and a covariance matrix or a correlation matrix with volatilities |
| Volatility curve | Volatility interpolated to a date or a number of days | A volatility curve |
| Performance | Sharpe, Sortino and Treynor ratios, Jensen's alpha, Modigliani measure | A portfolio or fund history and a risk-free rate history; for Treynor, Jensen and Modigliani, also a market index or benchmark |
Each measure takes the history either as separate ranges of dates and prices, or as one table with the assets in columns (the functions whose names end in FromTable). The history can be in ascending or descending date order.
From prices to changes
The change
The change between two dates is one of three kinds, chosen by the user:
- Discrete: the later price divided by the earlier price, less one.
- Continuous: the natural logarithm of the later price divided by the earlier price.
- Absolute: the later price less the earlier price.
The interval
- Days: a set number of observations back, that is, rows of the history, not calendar days.
- Week: back to the chosen weekday of the week before.
- Month, Quarter, Year: back to the same day one, three or twelve months earlier.
Where the earlier date is not in the history, the nearest earlier date in the history is used.
Overlapping or separate windows
- Overlapping: a change ends on every date of the history, so consecutive changes share most of their window.
- Separate: the changes are laid end to end, back from the end of the period, so no two share a day. Weekly changes end on the chosen weekday.
The period
- The changes used are those that end between the start date and the end date.
- A period inside it can be left out, for example a crisis that should not weigh on the estimate. A change that ends inside the excluded period is not used; for the performance measures, nor is a change that starts inside it.
Two histories
When a measure uses two histories, only the dates found in both are used. Correlation offers a second choice: keep the dates of both histories, and fill a date missing from one with that history's previous observation.
The measures named with a 2, such as the volatility of two assets, subtract the change of the second asset from the change of the first on each date, and compute the measure on those differences.
Risk measures
Volatility
The sample standard deviation of the changes, divided by n − 1, multiplied by the square root of a scaling factor set by the user: 252, for example, to annualize daily changes by the square-root-of-time rule.
EWMA volatility
- Each squared deviation of a change from the average change is weighted by (1 − λ) λi, where i is 0 for the most recent change, 1 for the one before, and so on. The square root of the weighted sum is the volatility.
- The decay factor λ is set by the user, for example 0.94 for daily changes.
- The weights are not rescaled to sum to one: over n changes they sum to 1 − λn, close to one for a history of a year or more of daily changes.
- The result is scaled by the same scaling factor as above.
Averages, percentiles and frequencies
- Average change, and average absolute change, where each change is taken without its sign.
- Percentile: interpolated between the two ranked changes either side of it, in the way of Excel's PERCENTILE function; or the observed change nearest to that point, just below it, or just above it.
- Frequency: the number of changes below a value, above a value, equal to a value, between two values, or outside them, given as a count or as a share of all the changes.
- The same three statistics can be taken on the values themselves, rather than on their changes, over the same period.
Correlation and beta
- Correlation: the Pearson correlation of the two series of changes.
- Beta: the covariance of the stock's and the index's changes, divided by the variance of the index's changes. It is computed as the correlation multiplied by the ratio of the two standard deviations, with n − 1 in each.
Tracking error
- Computed on changes from one observation to the next, on the dates found in both histories.
- The square root of the sum of the squared differences between the fund's and the index's changes, divided by n − 1. The differences are not centred on their average.
- The result is multiplied by the square root of the scaling factor.
Portfolio volatility
The square root of w′Σw, where w are the weights and Σ is the covariance matrix. Given a correlation matrix instead, Σ is built from it and the volatilities: the correlation of each pair multiplied by the two volatilities.
Volatility interpolation
Linear in total variance, the volatility squared times the time, between the two points of the curve either side of the target. The volatility is the square root of the interpolated total variance divided by the time. A target after the last point of the curve is not extrapolated: the curve has to reach it.
Performance measures
Excess returns
- Each period's excess return is the portfolio's return for the period less the risk-free rate for the period.
- The risk-free rate is given as an annual rate, as a decimal such as 0.04 for 4%. It is divided by the number of periods in a year: 365 divided by n for changes over n days, 52 for weekly, 12 for monthly, 4 for quarterly and 1 for annual changes. The division is simple, without compounding.
- The rate used for a period is the latest one on or before the period's end date.
Sharpe ratio
The average excess return divided by the sample standard deviation of the excess returns, annualized by the square root of the number of periods in a year: 252 divided by n for changes over n days, 52, 12, 4 or 1.
Sortino ratio
- The average excess return divided by the downside deviation, annualized as the Sharpe ratio is.
- The target return is the average risk-free rate for one period, over the period of the calculation.
- The downside deviation takes each portfolio return below zero, squares its distance from the target, sums these, divides by the number of all the returns and takes the square root. Returns of zero or above contribute nothing.
Treynor ratio
The average excess return divided by the portfolio's beta to the market index, the beta being computed as above on the changes of the portfolio and the index. The ratio is per period, not annualized.
Jensen's alpha
The portfolio's average excess return less beta times the index's average excess return. It is per period, not annualized.
Modigliani measure
The portfolio's Sharpe ratio multiplied by the standard deviation of the benchmark's excess returns, plus the average risk-free rate: the portfolio's return as it would be at the benchmark's level of risk.
What the measures do not do
The measures:
- are estimated from history only; implied volatilities are on the option pages;
- weight every change equally, except EWMA volatility; correlation and beta have no EWMA form;
- scale volatility by the square-root-of-time rule, with no adjustment for autocorrelation;
- use no holiday calendars: where a date is missing, the nearest earlier date in the history is used;
- convert the risk-free rate to a period rate by simple division, without compounding;
- give the Treynor ratio and Jensen's alpha per period, not annualized.
References
- Jensen, M. C. (1968). The performance of mutual funds in the period 1945–1964. Journal of Finance 23(2), 389–416.
- J.P. Morgan and Reuters (1996). RiskMetrics: Technical Document, 4th edition.
- Modigliani, F. and Modigliani, L. (1997). Risk-adjusted performance. Journal of Portfolio Management 23(2), 45–54.
- Sharpe, W. F. (1966). Mutual fund performance. Journal of Business 39(1), 119–138.
- Sortino, F. A. and Price, L. N. (1994). Performance measurement in a downside risk framework. Journal of Investing 3(3), 59–64.
- Treynor, J. L. (1965). How to rate management of investment funds. Harvard Business Review 43(1), 63–75.
Document history
| Edition | Date | Changes |
|---|---|---|
| 1 | November 2026 | First edition. Describes GIAnalyzer 5.12.0. |
