Skip to main content

How it works

Every run follows the same steps for each matrix, and the Preview in the screen follows exactly the same rules, so what you see there is what the schedule saves.


Reading the items​

Every item in the group is used unless you untick it on the Items tab.

ItemWhat is read
Timeseries (also smart, event and metric timeseries)Its values in the window
Curve (also smart, event and composed curves)The timeseries of each of its relative tenors, such as M01, the front month: the value of that tenor on each ondate. Each tenor is an item of its own, a row and a column in the matrices. The tenors are set for the group, and can be changed for each curve
Anything else (a matrix, options, an event list)Not used; the matrix description says so

Only one value a day is used: for an hourly series, the last one of the day. Values that are not numbers are ignored.

Several tenors of a curve​

Tenors are written as a list, separated by commas or spaces, and ranges with the same letters on both sides are filled in:

TenorsRead as
M01The front month only (the default)
M01, M02, Q01The first two months and the first quarter
M01-M06M01, M02, M03, M04, M05 and M06
M01-M03, Q01-Q04Three months and four quarters

A curve read at more than one tenor adds the tenor to its name: German power base becomes German power base M01, German power base M02 and so on, and a name you gave the curve, such as DE base, becomes DE base M01, DE base M02. A curve can be read at up to 36 tenors. A tenor the curve has no values for is left out of the matrices on its own (the description says so); the curve's other tenors are still used.

This is how to see how the months of a curve move together, or how a quarter moves with the months in it:

German power base at four tenors


Windows​

The window is the stretch of dates a matrix is worked out over. It ends on the ondate.

WindowStarts
A number of daysThat many days before the ondate (90 days to 27 November starts on 29 August)
A number of monthsThat many months before the ondate, on the same day of the month
A number of observationsWherever it takes to have that many observations after lining up and sampling (for changes, one more value is kept as the base of the first change)
The year to dateOn 1 January of the ondate's year
Fixed datesOn the date you give, and ends on the end date you give (or the ondate, if that is earlier)

Lining the items up​

A correlation or covariance compares the items on the same dates, so their values are lined up first:

  1. Items with fewer values in the window than Leave out items with fewer than are left out of the matrix. The description names them.
  2. Every date any remaining item has a value on is listed.
  3. Carry values over gaps of lets an item's last value stand in on up to that many of those dates it has no value on. Use 1 or 2 when your items follow different holiday calendars (a UK hub and a German one), so a holiday in one country does not remove the date for every item. With 0, a date is used only when every item has a value.
  4. Only the dates every item now has a value on are kept.
caution

One item with a short history shortens the window for all of them. That is why the minimum per item exists: in the Northgate example, API2 coal has only 12 values, so it is left out and the other six items keep 59 observations instead of 11.


Frequency​

FrequencyKeeps
DailyEvery date
WeeklyThe last date of each week (Monday to Sunday)
MonthlyThe last date of each month

Values and changes​

Correlations of prices themselves are misleading (two prices that both rise over a year look closely related even if their daily moves are not), so matrices are usually worked out on the changes from one kept date to the next.

Worked out onChange from a to bUse it for
Log returnsln(b / a)Prices; the usual choice for risk. Not possible when a value is nought or below
Returnsb / a - 1Percentage moves
Changesb - aValues that can be nought or negative, such as spreads or power prices
Values as they arebLevels, such as a weather index

When a change cannot be worked out for an item on a date (a log return of a negative power price), that date is left out for every item, and the description counts the dates left out.


The matrices​

KindWhat it holds
CorrelationThe Pearson correlation of each pair of items' changes, from -1 to 1, with 1 on the diagonal. Empty when an item did not move at all
CovarianceThe sample covariance (divided by n - 1) of each pair. Annualise multiplies it by the periods a year: 252 for daily business days, 52 weekly, 12 monthly
StatisticsOne row per item and one column per statistic you choose (see below), worked out on each item's own values in the window, not lined up with the others

A matrix is not saved when fewer than two items are left, or fewer observations than At least (never fewer than 3). The run's message says why, including which item has the shortest history.


Statistics​

The statistics of values use the values in the window (sampled by the frequency); the statistics of changes use their log returns, returns or changes.

StatisticWorked out as
ObservationsThe number of values
First, LastThe first and last value
Change, Change %Last less first; last / first - 1, in percent
Minimum, Maximum, MeanOf the values
Median, 5th percentile, 95th percentileOf the values, to 6 decimal places
Standard deviationSample standard deviation of the values
Mean of the changesAverage of the log returns, returns or changes
Standard deviation of the changesTheir sample standard deviation
VolatilityStandard deviation of the changes x the square root of the periods a year (0.0234 x 15.87 = 37.2% for TTF)
Lowest of, Highest of the changesThe biggest fall and the biggest rise
Skewness, Excess kurtosis of the changesSample skewness and excess kurtosis (nought for a normal distribution), to 6 decimal places

What is saved​

Each matrix is saved on the record under its key as a dated matrix: NGE.RISK:CORRELATION lists its ondates, and NGE.RISK:CORRELATION:2026-11-27 is the matrix for 27 November. Saving a matrix for an ondate that already has one replaces it. Its name is the one you give (or "Correlation of" and the group's name), and its description says exactly how it was built:

Pearson correlation of daily log returns over 90 days to 2026-11-27: 59 observations from 2026-09-02 to
2026-11-27, 6 items, 4 dates left out where a change could not be worked out. Left out: API2 coal (12 values
in the window)

Correlations are kept to 8 decimal places, statistics to 10 and covariances to 12, so the covariance of daily returns keeps its precision.