Technical / Performance
Rel%Chg(bars [, series])
Full Description

This function returns the total return relative to the benchmark (the default) or a specific series.

The period is expressed as either 'bars' or 'days'. If you want a fixed time span use functions that use calendar days (excluding the weekend). For example if you use days=5 you always get a weekly return, like Monday to Monday, regardless of whether there was a market holiday in between.

Functions using 'bars'
Rel%Chg(days [,series])

Functions using 'days'
Rel%Chg_D(days [,series])

Parameters

bar: the lookback period in bars or trading days
days: the lookback period in calendar days (excluding Sat & Sun)
series: specify alternate time series

Example

To calculate the 1 month total return relative to a stock's industry use

Rel%Chg(21,#Industry)

To calculate the 1 year total return relative to the SPY ETF use

Rel%Chg(251,GetSeries("SPY")) 

Show more details