Commit f7a4339
committed
feat: fill-time slippage/commission, partial fills, volume impact model
- Move slippage/commission from order creation to fill time in
SimulationBlotter, eliminating double-counting
- Add VolumeImpactSlippage model (power-law market impact)
- Add FillModel ABC with FullFill and VolumeBasedFill for partial
fill simulation
- Refactor BacktestTradeOrderEvaluator to delegate to blotter
methods (get_fill_price, get_fill_commission, get_fill_amount,
on_fill) with TradingCost fallback
- Record transactions at fill time via blotter.on_fill()
- Clean test_eventloop.py: remove ~500 lines of commented-out code
- Update test_blotter.py for new fill-time architecture1 parent 44fd90a commit f7a4339
11 files changed
Lines changed: 568 additions & 729 deletions
File tree
- docusaurus/docs/Advanced Concepts
- investing_algorithm_framework
- domain
- services/trade_order_evaluator
- tests
- app
- domain
- resources/backtest_reports_for_testing/test_algorithm_backtest
- runs
- backtest_EUR_20231201_20231202
- backtest_EUR_20231202_20231203
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
264 | | - | |
| 264 | + | |
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
| 274 | + | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
241 | 243 | | |
242 | 244 | | |
243 | 245 | | |
| 246 | + | |
244 | 247 | | |
245 | 248 | | |
246 | 249 | | |
247 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
248 | 254 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
| |||
163 | 165 | | |
164 | 166 | | |
165 | 167 | | |
| 168 | + | |
166 | 169 | | |
167 | 170 | | |
168 | 171 | | |
169 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
170 | 176 | | |
0 commit comments