Print Page  
STRATEGY / DIVERSIFICATION
MaxCorrel(period_bars,pct_bars)
Full Description

This function returns the maximum correlation coefficient of the stock being evaluated versus the existing holdings.

Parameters

period_bars: # of bars used in the correlation series
pct_bars: used to compute the % price change. Use 1 for day % chg, 5 for 1 week pct chg, etc.

Example

To avoid buying stocks that have correlations > 0.5 for the 1 day price % series for the past 50 bars, enter the following BUY rule:

MaxCorrel(50,1) < 0.5

To exit a position that has a correlation > 0.5 for the 1 day price % series for the past 50 bars, enter the following SELL rule:

MaxCorrel(50,1) > 0.5