The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Finance::GeniusTrader::Indicators::BPCorrelation (Bravais-Pearson Correlation Coefficient)

This function will calculate the Bravais-Pearson Correlation Coefficient. Correlation analysis measures the relationship between two items and shows if changes in one item will result in changes in the other item.

this indicator requires three arguments, and provides no default values for any of them.

the first argument is the number of intervals in the period, it can be a constant or a data series. the period is used as the number of data values used in each computation

the second and third arguments must be functions (e.g. data series or data objects?)

the indicator will validate that the arguments are provided and are of the correct type.

examples (display_indicator)

 %   display_indicator.pl I:BPCorrelation 13000 \
 '20 {I:Prices OPEN} {I:Prices CLOSE}'

 %   display_indicator.pl I:BPCorrelation 13000 \
 '14 {I:G:Cum 1} {I:Prices CLOSE}'
 

Finance::GeniusTrader::Indicators::Correlation::calculate($calc, $day)