kestrel-chartkitv0.43.0

← All examples

correlation

Rolling Pearson correlation of the simple returns of two close series

correlation

examples/site_showcase.rs
// Rolling Pearson correlation of the simple returns of two close series
let mut indicator = build_pair_checked("correlation", &params)?;
// The bars of the two series are paired by timestamp.
let outputs = run_pair_batch(indicator.as_mut(), &bars, &reference);

Not yet verified: no independent second implementation yet.

It reads two series, the bars and a reference series, and the demo is one share; it is not drawn here.

  • Other input kinds
  • unit: Ratio