MCPcopy Create free account
hub / github.com/Open-Quant/openquant / _std

Function _std

python/openquant/research.py:246–251  ·  view source on GitHub ↗
(values: list[float])

Source from the content-addressed store, hash-verified

244
245
246def _std(values: list[float]) -> float:
247 if len(values) < 2:
248 return 0.0
249 mean_v = sum(values) / len(values)
250 var = sum((v - mean_v) ** 2 for v in values) / (len(values) - 1)
251 return var**0.5
252
253
254def _annualized_vol(values: list[float]) -> float:

Callers 2

run_flywheel_iterationFunction · 0.70
_annualized_volFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected