pub fn student_t_adjusted_std(
prices: &[f64],
period: usize,
df: f64,
) -> Vec<f64>Expand description
Calculates the Student’s t-adjusted standard deviation over a given period.
Adjusts the sample standard deviation by the factor sqrt(df/(df-2)) to match the standard deviation of a Student’s t-distribution.
§Arguments
prices- Slice of pricesperiod- Period over which to calculate the standard deviationdf- Degrees of freedom (must be > 2)
§Panics
Panics if:
* period == 0
* period > prices.len()
* df <= 2.0
§Examples
let prices = vec![1.0, 2.0, 3.0, 4.0, 5.0];
let student_std = rust_ti::basic_indicators::bulk::student_t_adjusted_std(&prices, 3, 5.0);
assert_eq!(3, student_std.len());