Z-Score

Author: Optuma Team Last updated: Dec 12, 2023 05:49
Included in Trader Services Included in Professional Services Included in Enterprise Services

Overview

The Z-Score (also called Standard Score) is used in statistics to determine the number of standard deviations a data point is away from the mean value of what is being observed or measured. A 20 period Z-Score is calculated as follows:

  1. Calculate the 20 bar moving average
  2. Calculate the 20 bar standard deviation (set to 1)
  3. Z-Score = (closing price - 20MA) / standard deviation

A positive Z-Score occurs if the price is above the moving average, and negative if below.

In this example, Dell’s Z-Score is 2.194 (i.e. the last close is 2.194 standard deviations above the 20MA).

MASZSCORE Large
To add the tool to your chart, select the tool from the Statistical tool group, and left-click on the chart to add the tool. Optuma will then draw the tool in a window below the chart using the default settings.

Scripting Function: ZSCORE()

For a 30 period Z-Score crossing above equilibrium:

ZSCORE(BARS=30) CrossesAbove 0

Actions & Properties

Actions

Actions

Copy Data to Clipboard: Will copy the tool’s values to the clipboard which can then be inserted into a spreadsheet, for example, allowing for further analysis.

Add to Toolbar: Adds the selected tool to your custom toolbar.

Apply Settings to All: When multiple Z-Score tools have been applied to a chart, page or workbook, this action can be used to apply the settings of the one selected to other instances of the tool. This is a great time saver if an adjustment is made to the tool - such as line colour - as this allows all the other Z-Score tools in the chart, page or entire workbook to be updated instantly.

Copy Tool: Allows you to copy the selected tool, which can then be pasted onto a different chart window.

Move to Back: If the tool is displaying in front of other tools or indicators clicking this action will move the tool view to the background.

Move to Front: If the tool is displaying behind other tools or indicators on the chart, clicking this action will bring the tool to the forefront.

Restore Default Settings: Click this action if you have adjusted the default settings of the tool, and wish to return to the standard properties originally installed with Optuma.

Save Settings as Default: If you have adjusted any of the tool’s properties (colour, for example) you can save the adjustments as your new default setting. Each time you apply a new Z-Score to a chart, the tool will display using the new settings.

Delete: Deletes the tool from the chart.

Properties

Properties

Tool Name: Allows you to adjust the name of the tool, as it’s displayed in the Structures Panel.

Bars: The number of bars that are used in calculating the Z-Score.

MA Style: This option is used to set the type of calculation for the moving average, eg Simple, Exponential, Wilder, Geometric.

MA Calc: This option is used to determine which components of the data are used in calculating the moving average. You can choose from, Open Price, Closed Price, High Price, Low Price, HL (High + Low / 2), HLC (High + Low + Close / 3), OHLC (Open + High + Low + Close / 4), OC (Open + Close / 2), and Median.

Std Dev Style: Standard Deviation based on Value, Percentage, Average Plus Deviation, Average Minus Deviation, Sample Standard Deviation. Sigma Multiplier: Sets the value for the Sigma multiplier used in the StdDev. The default value is 1.00. Z-Score Plot Style: Adjusts the display style of the Z-Score (colour, display style, etc).

Equilibrium Plot Style: Adjusts the display style of the horizontal equilibrium line (colour, display style, etc).

Offset: Moves the tool forward or backwards in time. The offset is measured in bars, so a value of 2 will push the tool forward 2 bars and -2 will move the tool back 2 bars.

Tool Transparency: Use this slider bar to adjust the transparency of the tool. Moving the slider to the left will increase the transparency of the tool.

Visible: Un-tick this checkbox to hide the tool from the chart.

Show in Price Scale: When selected the current Z-Score value will be displayed in the Price Scale.

Discussion