pub fn perf<'a, T: ToPrimitive>(
series1: &'a [T],
series2: &'a [T],
window: usize,
) -> impl Iterator<Item = f64> + 'aExpand description
Performance Index
Used to compare a asset’s price trend to the general trend of a benchmark index.
§Usage
Value above 1 would state that base series outperforms benchmark.
§Sources
§Examples
use traquer::correlation;
correlation::perf(
&[1.0,2.0,3.0,4.0,5.0,6.0,4.0,5.0],
&[1.0,2.0,3.0,4.0,5.0,6.0,4.0,5.0],
2).collect::<Vec<f64>>();