Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Open-Quant/openquant
/ mean
Function
mean
crates/openquant/src/strategy_risk.rs:285–287 ·
view source on GitHub ↗
(values: &[f64])
Source
from the content-addressed store, hash-verified
283
}
284
285
fn mean(values: &[f64]) -> f64 {
286
values.iter().sum::<f64>() / values.len() as f64
287
}
288
289
fn std_dev(values: &[f64]) -> f64 {
290
if values.len() < 2 {
Callers
2
estimate_strategy_failure_probability
Function · 0.70
std_dev
Function · 0.70
Calls
1
len
Method · 0.80
Tested by
no test coverage detected