#twitter-follow { border: 0;position: fixed; top: 240px; left:0;} #live-support { border: 0;position: fixed; top: 370px; left:0;} #knowledge-base { border: 0;position: fixed; top: 170px; left:0;}

## Z-Score (Standard Score)

by QuantShare, 2523 days ago

If you want to compare a certain value of a time-series for a particular security to the value of other securities for the same date, then you should use the z-score. You will need to standardize data in order to use the z-score or the standard score.

The standard score, which is commonly referred to as the z-score, represents the distance between the score or the value and the observation or indicator mean for all the population (U.S. stocks) in units of the standard deviation. The population does not have to be normally distributed.

For each date, you will need to get every security time-series value (The time-series could be the share price, the volume or any indicator), and then calculate the mean and the standard deviation of these values. The end result should be two time-series, one that contains the standard deviation values and the other that contains the mean values.

This can be easily done using the composite plug-in. Mean and Standard deviation - Z-Score is an example on how to do that. This item calculates the one-day rate of return mean and standard deviation of all securities and for every trading bar.

The final step will be to use the following formula to calculate the standard score (z-score):
z = (x - mean) / (standard deviation)

Where z is the z-score for a particular bar and for a specific security and x is the security indicator's value for that bar.

The formula is named "zscore"; it accepts two parameters. The first one is the indicator or time-series for which you want to get the z-score values, and the second parameter is the composite symbol name.
Example:
score = zscore(roc(close, 1), "_RETURN SDV");

Let us take Google (GOOG) and the 25/01/2010 bar for example; a negative z-score value means that the one-bar rate of return of Google on 25/01/2010 was lower than the average one-bar rate of return of all U.S. stocks. A z-score value higher than two means that the one-bar rate of return of Google on 25/01/2010 was two standard deviations above the average one-bar rate of return of all U.S. stocks.

In case the indicator values follow a normal distribution, you can use the standard score and the statistical tables to calculate the percentile rank.

You have to log in to bookmark this object
What is this?

 Type: Trading Indicator Object ID: 382 Country: All Market: All Style: Technical Analysis

Related objects
Show All
Chaikin Money Flow Indicator (by bug man, uploaded several months ago)
No notes
 48
Volatility Channels Indicator (by Caleb, uploaded several months ago)
No notes
 24
Upside-Downside and Custom Standard Deviation (by QuantShare, uploaded several months ago)
No notes
 14
Keltner Channel (by Brian Brown, uploaded several months ago)
No notes
 94
Swing Simulation (by Jason Robbins, uploaded several months ago)
No notes
 11
Morningstar Annual Fundamentals 2.0 for US and International Stocks (by Chaim6, uploaded several months ago)
No notes
 60
Triple Momentum Timing Strategy (by QuantShare, uploaded several months ago)
No notes
 58
Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object

 Random Blog Posts Trend Following and Moving Averages Put-Call Ratio for Individual Stocks Historical Market Data What's new in this trading software? Historical volatility estimators Short Selling Stocks Stock split & dividend Survivorship bias Show All

Number of reviews
Click to add a review
Average rate
Click to rate this item
Number of times this object was downloaded
Number of rates the current object received
Report an object
if you can't run it for example or if it contains errors
Click to report this object