This function returns the correlation value of two IPV series. The series are date synched, to remove holidays or other missing data, so each record compared between the series have the same date. The CorrelationLogSynch function uses the log of the (rate of) change between the elements in the series, whereas the CorrelationLog function uses just the rate of change between the elements in the series. To avoid computing the Log of a negative number, us the "uc" parameter if the back adjusted futures data might go negative.
Because these are date synched, these Synch functions only work with auto indexed IPV series.
Syntax: |
---|
CorrelationSynch( series1, series2, sampleSize, offset1, offset2, "uc" ) |
Parameter: |
Description: |
---|---|
series1 |
Series element/property value of the first series. |
series2 |
Series element/property value of the second series. |
sampleSize |
Number of bars over which to measure the correlation coefficient. |
offset1 |
Offset value for the first series. |
offset2 |
Offset value for the second series. |
"uc" |
Use the unadjusted close as the rate of change divisor, in case the adjusted price goes negative. |
Example: |
---|
' Run the correlation process once a month ' Can run every day or bar if desired. |
Returns: |
|
Links: |
---|
Correlation Properties, CorrelationLog, CorrelationSynch, CorrelationLogSynch, MaxSynchBars |
See Also: |
Edit Time: 9/18/2020 11:24:19 AM |
Topic ID#: 232 |