Commit 341a2f6
committed
feat: add Jupyter Notebook / IPython magic integration (#454)
Add %%backtest cell magic and %backtest line magic for running
backtests directly in Jupyter notebooks.
- %%backtest: define a strategy inline and run a backtest in one cell
- %backtest: run a backtest from an existing strategy file
- Supports both event-driven and vectorized backtesting (--vectorized)
- Parameters: --start, --end, --initial-amount, --market, --trading-symbol,
-o (output variable), --show-report, --show-progress, --risk-free-rate
- Extension loaded via %load_ext investing_algorithm_framework
- Includes unit tests for parser, date parsing, strategy discovery, and
extension registration
Closes #4541 parent 8298819 commit 341a2f6
5 files changed
Lines changed: 565 additions & 0 deletions
File tree
- investing_algorithm_framework
- notebook
- tests/notebook
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| 257 | + | |
257 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments