markowitz.backtest.costs¶
markowitz.backtest.costs
¶
Transaction-cost models applied to gross backtest returns.
apply_transaction_costs(gross_returns: pd.Series, turnover: pd.Series, *, bps: float = 10.0) -> pd.Series
¶
Subtract proportional transaction costs from gross_returns.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gross_returns
|
Series
|
Per-period simple returns before costs. |
required |
turnover
|
Series
|
Per-period one-sided turnover, aligned to |
required |
bps
|
float
|
Round-trip-equivalent cost in basis points. The deduction applied
to period |
10.0
|