Correlation Coefficient
Category: momentum
Calculates the Pearson Correlation Coefficient between two series (or a series and its offset) over a specified period to measure linear relationship strength.
Formula
r = \frac{\sum(x - \bar{x})(y - \bar{y})}{\sqrt{\sum(x - \bar{x})^2 \sum(y - \bar{y})^2}}
Inputs
- length (default: 3)
See signal primitives, usage in published strategies and more on WOBR StrategyVerse.