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 + float(cfg["slippage_vol_mult"]) * bar_vol * pipeline.TRADING_DAYS_PER_YEAR**0.5 * 1e-3
245 )
246 total_cost = turnover * cost_per_turn
247 gross_total_return = backtest["equity"][-1] - 1.0
248 net_total_return = gross_total_return - total_cost
249
250 # Charge each bar for the position change into it, so the charges sum to total_cost.
251 net_returns = [
252 r - (abs(positions[i] - positions[i - 1]) * cost_per_turn if i > 0 else 0.0)
253 for i, r in enumerate(strategy_returns)
254 ]

Callers 2

run_flywheel_iterationFunction · 0.70
_annualized_volFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected