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

Function _turnover

python/openquant/research.py:240–243  ·  view source on GitHub ↗
(positions: list[float])

Source from the content-addressed store, hash-verified

238
239
240def _turnover(positions: list[float]) -> float:
241 if len(positions) <= 1:
242 return 0.0
243 return sum(abs(positions[i] - positions[i - 1]) for i in range(1, len(positions)))
244
245
246def _std(values: list[float]) -> float:

Callers 1

run_flywheel_iterationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected