correl
CORREL
Type:
correl
• Category:indicators
Description
Pearson correlation coefficient
Parameters
Name | Type | Description | Required | Default |
---|---|---|---|---|
real0 | string | First data series | no | |
real1 | string | Second data series | no | |
timeperiod | number | no | 30 |
Help
CORREL
Description
The CORREL worker calculates the Pearson correlation coefficient between two data series. This indicator is commonly used in financial markets to measure the correlation between two assets or market indices.
What does this worker do?
The CORREL worker takes two data series and a time period as input, and returns the Pearson correlation coefficient between the two series over the specified time period. The Pearson correlation coefficient measures the linear relationship between two variables, ranging from -1 (perfect negative correlation) to 1 (perfect positive correlation), with 0 indicating no correlation.
How to interpret the results
The CORREL worker returns a value between -1 and 1, which can be interpreted as follows:
- A value close to 1 indicates a strong positive correlation between the two data series.
- A value close to -1 indicates a strong negative correlation between the two data series.
- A value close to 0 indicates no correlation between the two data series.
Parameters
The CORREL worker takes the following parameters:
real0
- Type: string
- Description: First data series
real1
- Type: string
- Description: Second data series
timeperiod
- Type: number
- Default: 30
- Description: Time period over which to calculate the correlation
Example Usage
{
"real0": "data_series_1",
"real1": "data_series_2",
"timeperiod": 30
}
Note that the actual usage may vary depending on the specific implementation and data format.