quantjourney-bt 0.10.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. quantjourney_bt-0.10.0/CHANGELOG.md +258 -0
  2. quantjourney_bt-0.10.0/CONTRIBUTING.md +162 -0
  3. quantjourney_bt-0.10.0/LICENSE +202 -0
  4. quantjourney_bt-0.10.0/MANIFEST.in +22 -0
  5. quantjourney_bt-0.10.0/PKG-INFO +514 -0
  6. quantjourney_bt-0.10.0/README.md +458 -0
  7. quantjourney_bt-0.10.0/backtester/__init__.py +63 -0
  8. quantjourney_bt-0.10.0/backtester/core.py +2329 -0
  9. quantjourney_bt-0.10.0/backtester/engines/__init__.py +12 -0
  10. quantjourney_bt-0.10.0/backtester/engines/benchmark.py +304 -0
  11. quantjourney_bt-0.10.0/backtester/engines/blotter.py +545 -0
  12. quantjourney_bt-0.10.0/backtester/engines/performance.py +742 -0
  13. quantjourney_bt-0.10.0/backtester/execution/__init__.py +92 -0
  14. quantjourney_bt-0.10.0/backtester/execution/commission.py +196 -0
  15. quantjourney_bt-0.10.0/backtester/execution/contract_spec.py +541 -0
  16. quantjourney_bt-0.10.0/backtester/execution/fill_engine.py +874 -0
  17. quantjourney_bt-0.10.0/backtester/execution/order_types.py +203 -0
  18. quantjourney_bt-0.10.0/backtester/execution/simulator.py +563 -0
  19. quantjourney_bt-0.10.0/backtester/execution/slippage.py +138 -0
  20. quantjourney_bt-0.10.0/backtester/metrics/__init__.py +27 -0
  21. quantjourney_bt-0.10.0/backtester/metrics/configs/__init__.py +10 -0
  22. quantjourney_bt-0.10.0/backtester/metrics/configs/portfolio_perf.py +47 -0
  23. quantjourney_bt-0.10.0/backtester/metrics/formatters.py +122 -0
  24. quantjourney_bt-0.10.0/backtester/metrics/utils.py +50 -0
  25. quantjourney_bt-0.10.0/backtester/mixins/__init__.py +11 -0
  26. quantjourney_bt-0.10.0/backtester/mixins/reporting.py +309 -0
  27. quantjourney_bt-0.10.0/backtester/mixins/sdk_client.py +309 -0
  28. quantjourney_bt-0.10.0/backtester/plots/__init__.py +4 -0
  29. quantjourney_bt-0.10.0/backtester/plots/plot_compat.py +969 -0
  30. quantjourney_bt-0.10.0/backtester/plots/theme/__init__.py +26 -0
  31. quantjourney_bt-0.10.0/backtester/plots/theme/configs/__init__.py +16 -0
  32. quantjourney_bt-0.10.0/backtester/plots/theme/configs/quantjourney.py +203 -0
  33. quantjourney_bt-0.10.0/backtester/plots/theme/date_formatter.py +243 -0
  34. quantjourney_bt-0.10.0/backtester/plots/theme/manager.py +208 -0
  35. quantjourney_bt-0.10.0/backtester/plots/theme/types.py +212 -0
  36. quantjourney_bt-0.10.0/backtester/portfolio/__init__.py +57 -0
  37. quantjourney_bt-0.10.0/backtester/portfolio/_time.py +48 -0
  38. quantjourney_bt-0.10.0/backtester/portfolio/accounting/__init__.py +21 -0
  39. quantjourney_bt-0.10.0/backtester/portfolio/accounting/ledger.py +543 -0
  40. quantjourney_bt-0.10.0/backtester/portfolio/book.py +420 -0
  41. quantjourney_bt-0.10.0/backtester/portfolio/calc/__init__.py +15 -0
  42. quantjourney_bt-0.10.0/backtester/portfolio/calc/metrics.py +14 -0
  43. quantjourney_bt-0.10.0/backtester/portfolio/calc/returns.py +29 -0
  44. quantjourney_bt-0.10.0/backtester/portfolio/calc/risk.py +36 -0
  45. quantjourney_bt-0.10.0/backtester/portfolio/calc/rolling_stats.py +14 -0
  46. quantjourney_bt-0.10.0/backtester/portfolio/config.py +58 -0
  47. quantjourney_bt-0.10.0/backtester/portfolio/instr_calc.py +82 -0
  48. quantjourney_bt-0.10.0/backtester/portfolio/instr_data.py +1221 -0
  49. quantjourney_bt-0.10.0/backtester/portfolio/instrument_plots.py +200 -0
  50. quantjourney_bt-0.10.0/backtester/portfolio/portf_calc.py +427 -0
  51. quantjourney_bt-0.10.0/backtester/portfolio/portf_data.py +876 -0
  52. quantjourney_bt-0.10.0/backtester/portfolio/portfolio_plots.py +2095 -0
  53. quantjourney_bt-0.10.0/backtester/portfolio/portfolio_utils.py +118 -0
  54. quantjourney_bt-0.10.0/backtester/portfolio/rebalance.py +1469 -0
  55. quantjourney_bt-0.10.0/backtester/portfolio/schemas.py +169 -0
  56. quantjourney_bt-0.10.0/backtester/portfolio/weight_cost.py +115 -0
  57. quantjourney_bt-0.10.0/backtester/py.typed +1 -0
  58. quantjourney_bt-0.10.0/backtester/reporting_frequency.py +413 -0
  59. quantjourney_bt-0.10.0/backtester/risk/__init__.py +51 -0
  60. quantjourney_bt-0.10.0/backtester/risk/base.py +109 -0
  61. quantjourney_bt-0.10.0/backtester/risk/inverse_vol.py +112 -0
  62. quantjourney_bt-0.10.0/backtester/risk/position_limit.py +158 -0
  63. quantjourney_bt-0.10.0/backtester/risk/pre_trade.py +314 -0
  64. quantjourney_bt-0.10.0/backtester/risk/risk_parity.py +176 -0
  65. quantjourney_bt-0.10.0/backtester/risk/vol_target.py +122 -0
  66. quantjourney_bt-0.10.0/backtester/sample_data.py +151 -0
  67. quantjourney_bt-0.10.0/backtester/sdk/__init__.py +4 -0
  68. quantjourney_bt-0.10.0/backtester/sdk/client.py +972 -0
  69. quantjourney_bt-0.10.0/backtester/universe.py +201 -0
  70. quantjourney_bt-0.10.0/backtester/utils/__init__.py +4 -0
  71. quantjourney_bt-0.10.0/backtester/utils/decorators.py +264 -0
  72. quantjourney_bt-0.10.0/backtester/utils/logger.py +55 -0
  73. quantjourney_bt-0.10.0/backtester/version.py +30 -0
  74. quantjourney_bt-0.10.0/backtester/walkforward/__init__.py +37 -0
  75. quantjourney_bt-0.10.0/backtester/walkforward/config.py +106 -0
  76. quantjourney_bt-0.10.0/backtester/walkforward/engine.py +522 -0
  77. quantjourney_bt-0.10.0/backtester/walkforward/folds/__init__.py +44 -0
  78. quantjourney_bt-0.10.0/backtester/walkforward/folds/anchored.py +110 -0
  79. quantjourney_bt-0.10.0/backtester/walkforward/folds/base.py +65 -0
  80. quantjourney_bt-0.10.0/backtester/walkforward/folds/cpcv.py +31 -0
  81. quantjourney_bt-0.10.0/backtester/walkforward/folds/expanding.py +106 -0
  82. quantjourney_bt-0.10.0/backtester/walkforward/folds/purge.py +72 -0
  83. quantjourney_bt-0.10.0/backtester/walkforward/folds/rolling.py +100 -0
  84. quantjourney_bt-0.10.0/backtester/walkforward/optimization/__init__.py +60 -0
  85. quantjourney_bt-0.10.0/backtester/walkforward/optimization/base.py +44 -0
  86. quantjourney_bt-0.10.0/backtester/walkforward/optimization/grid.py +261 -0
  87. quantjourney_bt-0.10.0/backtester/walkforward/optimization/optuna_.py +653 -0
  88. quantjourney_bt-0.10.0/backtester/walkforward/optimization/result.py +148 -0
  89. quantjourney_bt-0.10.0/backtester/walkforward/optimization/summary.py +1073 -0
  90. quantjourney_bt-0.10.0/backtester/walkforward/persistence.py +75 -0
  91. quantjourney_bt-0.10.0/backtester/walkforward/result.py +300 -0
  92. quantjourney_bt-0.10.0/backtester/walkforward/runner.py +693 -0
  93. quantjourney_bt-0.10.0/backtester/walkforward/statistics/__init__.py +60 -0
  94. quantjourney_bt-0.10.0/backtester/walkforward/statistics/aggregation.py +149 -0
  95. quantjourney_bt-0.10.0/backtester/walkforward/statistics/deflated_sharpe.py +176 -0
  96. quantjourney_bt-0.10.0/backtester/walkforward/statistics/interpretation.py +164 -0
  97. quantjourney_bt-0.10.0/backtester/walkforward/statistics/overfit.py +94 -0
  98. quantjourney_bt-0.10.0/backtester/walkforward/statistics/pbo.py +216 -0
  99. quantjourney_bt-0.10.0/benchmarks/README.md +5 -0
  100. quantjourney_bt-0.10.0/benchmarks/strategy_suite.md +21 -0
  101. quantjourney_bt-0.10.0/compare/README.md +40 -0
  102. quantjourney_bt-0.10.0/docs/ROADMAP.md +60 -0
  103. quantjourney_bt-0.10.0/docs/public_scope.md +35 -0
  104. quantjourney_bt-0.10.0/docs/release.md +37 -0
  105. quantjourney_bt-0.10.0/pyproject.toml +106 -0
  106. quantjourney_bt-0.10.0/quantjourney_bt.egg-info/PKG-INFO +514 -0
  107. quantjourney_bt-0.10.0/quantjourney_bt.egg-info/SOURCES.txt +167 -0
  108. quantjourney_bt-0.10.0/quantjourney_bt.egg-info/dependency_links.txt +1 -0
  109. quantjourney_bt-0.10.0/quantjourney_bt.egg-info/requires.txt +34 -0
  110. quantjourney_bt-0.10.0/quantjourney_bt.egg-info/top_level.txt +1 -0
  111. quantjourney_bt-0.10.0/setup.cfg +4 -0
  112. quantjourney_bt-0.10.0/skills/README.md +33 -0
  113. quantjourney_bt-0.10.0/skills/qj-config-helper/SKILL.md +64 -0
  114. quantjourney_bt-0.10.0/skills/qj-report-analyst/SKILL.md +46 -0
  115. quantjourney_bt-0.10.0/skills/qj-strategy-author/SKILL.md +21 -0
  116. quantjourney_bt-0.10.0/skills/qj-strategy-ideas/SKILL.md +57 -0
  117. quantjourney_bt-0.10.0/skills/qj-strategy-reviewer/SKILL.md +49 -0
  118. quantjourney_bt-0.10.0/strategies/README.md +126 -0
  119. quantjourney_bt-0.10.0/strategies/example_orders_01_market_sma_cross.py +106 -0
  120. quantjourney_bt-0.10.0/strategies/example_orders_02_market_rsi_reversion.py +95 -0
  121. quantjourney_bt-0.10.0/strategies/example_orders_03_limit_rsi_dip.py +115 -0
  122. quantjourney_bt-0.10.0/strategies/example_orders_04_limit_trend_pullback.py +118 -0
  123. quantjourney_bt-0.10.0/strategies/example_orders_05_stop_breakout_entry.py +121 -0
  124. quantjourney_bt-0.10.0/strategies/example_orders_06_stop_loss_protection.py +119 -0
  125. quantjourney_bt-0.10.0/strategies/example_orders_07_stop_limit_breakout.py +123 -0
  126. quantjourney_bt-0.10.0/strategies/example_orders_08_stop_limit_protection.py +120 -0
  127. quantjourney_bt-0.10.0/strategies/example_orders_09_trailing_stop_trend.py +117 -0
  128. quantjourney_bt-0.10.0/strategies/example_orders_10_trailing_stop_rsi.py +115 -0
  129. quantjourney_bt-0.10.0/strategies/example_orders_11_trailing_stop_limit.py +118 -0
  130. quantjourney_bt-0.10.0/strategies/example_orders_12_bracket_trend.py +119 -0
  131. quantjourney_bt-0.10.0/strategies/example_orders_13_bracket_rsi_reversion.py +108 -0
  132. quantjourney_bt-0.10.0/strategies/example_orders_14_oco_dip_or_breakout.py +131 -0
  133. quantjourney_bt-0.10.0/strategies/example_orders_15_intraday_5m_bracket_reversion.py +124 -0
  134. quantjourney_bt-0.10.0/strategies/example_orders_16_intraday_30m_stop_breakout.py +140 -0
  135. quantjourney_bt-0.10.0/strategies/example_orders_17_monthly_rotation_orders.py +113 -0
  136. quantjourney_bt-0.10.0/strategies/example_orders_18_signal_change_rotation_orders.py +108 -0
  137. quantjourney_bt-0.10.0/strategies/example_orders_19_fx_momentum_lots.py +167 -0
  138. quantjourney_bt-0.10.0/strategies/example_orders_20_futures_donchian_contracts.py +182 -0
  139. quantjourney_bt-0.10.0/strategies/example_weights_01_sma_daily.py +94 -0
  140. quantjourney_bt-0.10.0/strategies/example_weights_02_monthly_drift_etf.py +82 -0
  141. quantjourney_bt-0.10.0/strategies/example_weights_03_weekly_rsi_reversion.py +93 -0
  142. quantjourney_bt-0.10.0/strategies/example_weights_04_quarterly_dual_momentum.py +89 -0
  143. quantjourney_bt-0.10.0/strategies/example_weights_05_monthly_inverse_vol.py +84 -0
  144. quantjourney_bt-0.10.0/strategies/example_weights_06_signal_change_defensive.py +96 -0
  145. quantjourney_bt-0.10.0/strategies/example_weights_07_intraday_rsi_15m.py +102 -0
  146. quantjourney_bt-0.10.0/strategies/example_weights_08_intraday_1m_ema_scalp.py +94 -0
  147. quantjourney_bt-0.10.0/strategies/example_weights_09_intraday_1h_sma_trend.py +94 -0
  148. quantjourney_bt-0.10.0/strategies/example_weights_10_monthly_circuit_breaker.py +89 -0
  149. quantjourney_bt-0.10.0/strategies/example_weights_11_quarterly_te_cost_gate.py +95 -0
  150. quantjourney_bt-0.10.0/strategies/example_weights_12_daily_partial_drift.py +91 -0
  151. quantjourney_bt-0.10.0/strategies/example_weights_13_pairs_ratio_zscore.py +107 -0
  152. quantjourney_bt-0.10.0/strategies/example_weights_14_pairs_hedge_ratio.py +110 -0
  153. quantjourney_bt-0.10.0/strategies/example_weights_15_cross_sectional_momentum.py +107 -0
  154. quantjourney_bt-0.10.0/strategies/example_weights_16_cross_sectional_reversal.py +109 -0
  155. quantjourney_bt-0.10.0/strategies/example_weights_17_vol_target_trend.py +85 -0
  156. quantjourney_bt-0.10.0/strategies/example_weights_18_vol_target_momentum.py +89 -0
  157. quantjourney_bt-0.10.0/strategies/example_weights_19_risk_parity_multiasset.py +86 -0
  158. quantjourney_bt-0.10.0/strategies/example_weights_20_risk_parity_capped.py +92 -0
  159. quantjourney_bt-0.10.0/strategies/example_weights_21_bollinger_reversion.py +99 -0
  160. quantjourney_bt-0.10.0/strategies/example_weights_22_macd_trend.py +87 -0
  161. quantjourney_bt-0.10.0/strategies/example_weights_23_fx_time_series_momentum.py +94 -0
  162. quantjourney_bt-0.10.0/strategies/example_weights_24_fx_cross_sectional_momentum.py +106 -0
  163. quantjourney_bt-0.10.0/strategies/example_weights_25_continuous_futures_trend.py +97 -0
  164. quantjourney_bt-0.10.0/strategies/example_wf_01_rolling_walkforward.py +159 -0
  165. quantjourney_bt-0.10.0/strategies/example_wf_02_expanding_walkforward.py +158 -0
  166. quantjourney_bt-0.10.0/strategies/example_wf_03_anchored_purge_embargo.py +167 -0
  167. quantjourney_bt-0.10.0/strategies/example_wf_04_grid_search_optimization.py +119 -0
  168. quantjourney_bt-0.10.0/strategies/example_wf_05_optuna_tpe_optimization.py +160 -0
  169. quantjourney_bt-0.10.0/strategy.sh +252 -0
@@ -0,0 +1,258 @@
1
+ # QuantJourney Backtester Changelog
2
+
3
+ ## 0.10.0 - 2026-07-10
4
+
5
+ ### Added
6
+ - Added the shared execution simulator, contract-aware portfolio ledger,
7
+ portfolio-of-strategies book, and pre-trade risk controls to the explicitly
8
+ approved Apache-2.0 public scope.
9
+ - Expanded the runnable catalog to 50 examples: 25 weight-based, 20
10
+ order-based, and 5 walk-forward/optimization strategies, including the new
11
+ FX and continuous-futures research examples.
12
+ - Added a fail-closed release boundary: local commit/push guards, a reviewed
13
+ source manifest, clean-tag publishing, and exact wheel/sdist verification.
14
+
15
+ ### Fixed
16
+ - Rejected unsupported cross-currency FX accounting in core and standalone
17
+ ledger paths instead of treating quote-currency PnL as portfolio currency;
18
+ incomplete or invalid external FX/futures contract metadata now fails closed.
19
+ - Standardized strategy storage on `(strategy, field, instrument)`, rejected
20
+ silently misaligned strategy output, and preserved valid all-zero strategies.
21
+ - Scoped ETag response caches to one immutable per-request tenant/principal
22
+ snapshot, including during concurrent context changes; cache keys are fully
23
+ opaque and invalidated whenever the security context changes.
24
+
25
+ ### Changed
26
+ - Restored the public README and changelog boundary, then documented only the
27
+ approved public runtime and strategy additions.
28
+ - Modernized Python 3.11 typing syntax, removed the Ruff backlog, and made full
29
+ lint/format checks blocking.
30
+ - Added a locked full-package mypy baseline gate that fails on every
31
+ unreviewed diagnostic change while the existing typing debt is reduced.
32
+ - Declared and continuously tests Python 3.11 through 3.14.
33
+ - External PyPI artifacts are built only from a clean version-matched tag after
34
+ tests and artifact-manifest checks; local uploads are unsupported.
35
+
36
+ ## 0.9.1 - 2026-07-09
37
+
38
+ ### Changed
39
+ - Hardened missing-data accounting with frozen/held semantics so portfolio NAV, risk triggers and reported weights stay consistent through temporary price gaps.
40
+ - Normalized timezone alignment before reindexing benchmark and cash-buffer inputs.
41
+ - Improved order-mode idempotency and bracket/OCA lifecycle handling.
42
+ - Tightened circuit-breaker re-entry, weekly holiday scheduling and PBO failed-candidate handling.
43
+
44
+ ## 0.8.9 - 2026-07-08
45
+
46
+ ### Changed
47
+ - Weight-mode accounting now books the full price move across missing-data gaps on the resume bar (matching order-mode economics), and gapped positions are reported at their carried value.
48
+ - Honest walk-forward reporting: slice-diagnostics output is labeled in-sample end-to-end, failed folds are reported as failed (not zero Sharpe), verdicts are gated so losing strategies never render green, and the composite Sharpe carries a bootstrap confidence interval.
49
+ - Stricter, louder input handling: unknown constructor kwargs raise, execution mode and fill timing are validated, missing OHLC data degrades with a clear warning, inactive configuration knobs warn once per mode, and the tracking-error trigger activates when `benchmark_returns` is provided.
50
+ - Re-running a backtest on the same instance is idempotent (execution state resets per run); weekly calendar rebalances snap to the prior trading day on holidays; documentation now spells out the execution-timing contract and calendar-convention sensitivity.
51
+
52
+ ## 0.8.8 - 2026-07-08
53
+
54
+ ### Changed
55
+ - Refined same-bar fill priority for OCO orders and aligned the tracking-error trigger with the NAV accounting basis.
56
+ - Cleaner walk-forward metadata and configuration errors (empty purge windows, overlapping-OOS warning, early CPCV validation).
57
+
58
+ ## 0.8.7 - 2026-07-07
59
+
60
+ ### Changed
61
+ - Tightened rebalance and risk-event accounting so daily returns are always booked on the weights actually held, with improved circuit-breaker recovery behavior.
62
+ - Hardened order execution around partial fills and edge conditions: trailing-stop activation, OCO and bracket lifecycle, bar-expiry counting, stop-limit trigger bounds, and volume-cap handling with incomplete data.
63
+ - More robust input validation across sizing, weights and configuration (non-finite prices and volumes, cash-buffer types, rebalance frequency and holiday scheduling).
64
+ - Protective `stop_loss()`/`take_profit()` exits now link as an OCO pair automatically.
65
+ - Walk-forward upgrades: more reliable optimizer execution with loud failure reporting, `direction="minimize"` support, deflated Sharpe aligned with Bailey & López de Prado (2014), and honest availability reporting for overfitting statistics (`pbo_trials` opt-in).
66
+
67
+ ## 0.8.6 - 2026-07-06
68
+
69
+ ### Added
70
+ - Added explicit walk-forward mode reporting in logs, summaries and archived metadata: `slice_diagnostics` for fast NAV-slice diagnostics and `per_fold_refit` when a fold-local `backtester_factory` reruns the strategy.
71
+ - Added `QJ_WF_MODE=per_fold_refit` support to WF01-WF03 examples, with optional `QJ_WF_REPORT_PACKET=1` report/plot packet generation.
72
+
73
+ ### Changed
74
+ - Deduplicated the walk-forward slice-diagnostics warning so it appears once per result instead of once per fold.
75
+ - Clarified README and strategy-catalog language around walk-forward diagnostics, per-fold refit cost, and optimization workflow interpretation.
76
+
77
+ ## 0.8.5 - 2026-07-04
78
+
79
+ ### Fixed
80
+ - Fixed order-mode trade recording so fill metadata from the execution engine (`slippage`, theoretical price and fill status) is accepted by the blotter and preserved in trade artifacts.
81
+ - Hardened the 30-minute intraday stop-breakout example against sparse provider bars by skipping invalid NAV, price and breakout-reference observations before sizing orders.
82
+
83
+ ## 0.8.4 - 2026-07-04
84
+
85
+ ### Added
86
+ - Added a deterministic bundled sample-data path for `example_weights_01_sma_daily` via `./strategy.sh example_weights_01_sma_daily --sample-data`, allowing a reproducible demo without API credentials.
87
+
88
+ ## 0.8.3 - 2026-07-04
89
+
90
+ ### Added
91
+ - Grew the example strategy suite to 45. Added 10 weight-based templates: long/short pairs trading with a ratio z-score and with a rolling OLS hedge-ratio spread; dollar-neutral cross-sectional momentum and short-term reversal; volatility-targeted trend and momentum baskets; risk-parity (equal risk contribution) standalone and chained with a per-position cap; Bollinger Band mean reversion; and MACD trend.
92
+ - Added a per-folder strategy catalog (`strategies/README.md`) that links each example's source and, where published, its results page, and embedded a summary catalog in the main README.
93
+ - Attached the risk-overlay modules (volatility targeting, risk parity, position limits, chained overlays) to runnable examples via the `risk_model=` hook.
94
+
95
+ ## 0.8.2 - 2026-07-04
96
+
97
+ ### Added
98
+ - Expanded the example strategy suite to 35 runnable templates: 12 weight-based, 18 order-based, and 5 walk-forward / optimization examples.
99
+ - Added an intraday timeframe grid so a single engine spans minute-to-hour cadences: `example_weights_08_intraday_1m_ema_scalp` (1m EMA scalp), `example_orders_15_intraday_5m_bracket_reversion` (5m bracket reversion), `example_orders_16_intraday_30m_stop_breakout` (30m stop breakout), and `example_weights_09_intraday_1h_sma_trend` (1h SMA trend).
100
+ - Added rebalance-focused templates that exercise the full policy stack: `example_weights_10_monthly_circuit_breaker` (drawdown circuit breaker + cooldown), `example_weights_11_quarterly_te_cost_gate` (tracking-error trigger + turnover budget), and `example_weights_12_daily_partial_drift` (partial drift-band rebalance).
101
+ - Added event-driven order-mode rotation templates: `example_orders_17_monthly_rotation_orders` (calendar rebalance expressed as orders) and `example_orders_18_signal_change_rotation_orders` (trade only on trend-signal flips).
102
+ - Added dedicated walk-forward and optimization examples: rolling, expanding, and anchored walk-forward (`example_wf_01`–`example_wf_03`), exhaustive grid search (`example_wf_04`), and Optuna TPE search with out-of-sample validation (`example_wf_05`).
103
+ - Surfaced walk-forward traffic-light interpretation (overfit ratio, efficiency, Sharpe decay) directly in the walk-forward examples.
104
+
105
+ ### Changed
106
+ - Refreshed public documentation: rewrote the README around what the engine does, why it is reproducible, how to run it, and example report output; removed fixed strategy-count language so the suite can grow without stale numbers.
107
+ - Aligned every example strategy configuration with the verified `RebalancePolicy` fields (`drift_threshold`, `tracking_error_threshold`, `max_drawdown_trigger`, `max_annual_turnover`, `partial_rebalance`, `rebalance_on_signal_change`).
108
+ - Reworked the packaging smoke tests to check tracked files rather than a fixed strategy count, so new untracked example strategies no longer break local test runs.
109
+
110
+ ### Fixed
111
+ - Preserved intraday NaN gaps in `Universe.returns` and `Universe.log_returns` using `pct_change(fill_method=None)`, so halted or illiquid intraday bars are excluded from allocation instead of being counted as 0% return observations.
112
+ - Seeded only the first available bar per instrument to a defined return, keeping pre-listing and post-halt gaps as unavailable rather than synthetic zeros.
113
+
114
+ ## 0.8.1 - 2026-07-04
115
+
116
+ ### Added
117
+ - Added `granularity` normalization for API-backed backtests, including yfinance historical intraday values such as `1m`, `5m`, `15m`, `30m`, and `1h`.
118
+ - Added `example_weights_07_intraday_rsi_15m.py`, a simple RSI strategy using `granularity="15m"`.
119
+ - Added true walk-forward refit hooks via fold-local `backtester_factory`/optimizer support.
120
+ - Added date/time-aware x-axis labels for intraday time-series plots.
121
+ - Added a per-fold "slice diagnostics" warning so walk-forward runs without a refit factory are labeled honestly rather than reported as true out-of-sample.
122
+
123
+ ### Fixed
124
+ - Fixed order-mode contract accounting so cash, NAV, position values, weights, and trade value use `ContractSpec` multipliers and lot sizes.
125
+ - Fixed order-mode commission notional to use `ContractSpec` multipliers and lot sizes, aligning bps/max-pct fees with contract-aware NAV and PnL.
126
+ - Fixed limit and stop-limit execution semantics so slippage never fills worse than the limit price.
127
+ - Fixed partial-fill commissions so per-order minimums, caps, and tiers are applied cumulatively to the parent order.
128
+ - Fixed reporting-frequency resampling so the first reporting bucket keeps its actual return instead of a synthetic zero.
129
+ - Fixed Sharpe, volatility, and Sortino calculations to use metric returns that exclude the synthetic day-0 zero.
130
+ - Fixed position-limit redistribution to iteratively enforce `max_weight` after redistributing capped excess.
131
+ - Fixed partial rebalance and tax-aware rebalance normalization so frozen positions are not moved by the traded sleeve.
132
+ - Fixed benchmark return handling to prefer adjusted total-return sources and warn on ambiguous raw-close or missing-day alignment.
133
+ - Fixed dollar valuation semantics to use raw close prices for exposure, turnover, and dollar PnL, with bounded forward-fill for stale valuation prices.
134
+ - Preserved NaN market-data gaps in `Universe` and weight-mode rebalancing so unavailable instruments are excluded from allocation instead of treated as 0% return assets.
135
+
136
+ ## 0.8.0 - 2026-06-20
137
+
138
+ ### Added
139
+ - Added AI Co-Pilot materials for strategy authoring, strategy review, and report interpretation.
140
+ - Added explicit NAV accounting identity validation.
141
+ - Added per-instrument strategy trace charts combining price, indicators, signal state, realized exposure, and portfolio context.
142
+ - Added reporting semantics documentation for FIFO lot matching, exposure path checks, loss-positive risk fields, and execution assumptions.
143
+ - Added a reproducibility fingerprint over configuration and input data for auditable research runs.
144
+
145
+ ### Changed
146
+ - Hardened instrument analytics contracts: units now mean executed position quantities, and weight-based attribution requires explicit weights.
147
+ - Standardized turnover to institutional half-turnover with separate gross weight churn diagnostics.
148
+ - Reworked VaR/CVaR outputs to use a loss-positive convention.
149
+
150
+ ## 0.7.0 - 2026-06-12
151
+
152
+ ### Added
153
+ - Added reporting-frequency support for daily, weekly, monthly, and quarterly report cadences.
154
+ - Added frequency-aware annualization, rolling windows, labels, and table wording.
155
+
156
+ ### Fixed
157
+ - Removed hard-coded daily wording from risk and volatility report labels.
158
+ - Guarded resampling paths so reporting-frequency changes preserve strategy and benchmark alignment.
159
+
160
+ ## 0.6.0 - 2026-05-30
161
+
162
+ ### Added
163
+ - Added website changelog and documentation pages for the QuantJourney Backtester.
164
+ - Added architecture diagrams and publishing-oriented documentation.
165
+ - Added default QuantJourney plot styling, source stamps, and report metadata.
166
+ - Added multiple visual themes for report charts, including terminal, dark, and paper-ready academic styles.
167
+
168
+ ### Changed
169
+ - Refined plot readability for cumulative returns, drawdown, rolling risk, rolling beta, rolling alpha, and holdings charts.
170
+
171
+ ## 0.5.0 - 2026-02-01
172
+
173
+ ### Added
174
+ - Added anchored, rolling, and expanding walk-forward validation.
175
+ - Added grid-search and Optuna optimization integration for strategy parameter studies.
176
+ - Added fold-level in-sample/out-of-sample diagnostics and summary metrics.
177
+ - Added purge and embargo gaps between train and test windows to reduce information leakage.
178
+ - Added overfit-ratio, efficiency, and Sharpe-decay traffic-light interpretation of walk-forward results.
179
+
180
+ ### Changed
181
+ - Separated optimizer configuration from strategy configuration so research runs can be reproduced from saved metadata.
182
+
183
+ ## 0.4.2 - 2026-01-10
184
+
185
+ ### Added
186
+ - Added cross-engine comparison materials for QuantJourney, vectorbt, Backtrader, Zipline, and QuantConnect-style strategies.
187
+ - Added fair-metric comparison helpers for equity curves, timing, drawdown, and return statistics.
188
+
189
+ ### Fixed
190
+ - Improved cash handling and signal timing checks for cross-engine benchmark parity.
191
+
192
+ ## 0.4.1 - 2025-12-01
193
+
194
+ ### Added
195
+ - Added order-mode strategy examples for market, limit, stop, stop-limit, trailing stop, bracket, and OCO behavior.
196
+ - Added trade blotter export paths for execution-mode strategies.
197
+
198
+ ### Fixed
199
+ - Tightened same-bar stop/limit execution ordering and volume-participation partial fill behavior.
200
+
201
+ ## 0.4.0 - 2025-10-15
202
+
203
+ ### Added
204
+ - Added deterministic order-mode execution simulation.
205
+ - Added slippage and commission model interfaces.
206
+ - Added initial futures/FX contract specification types for multiplier, lot size, tick size, and margin metadata.
207
+
208
+ ### Changed
209
+ - Split target-weight accounting from order-based accounting so strategies can choose the appropriate simulation mode.
210
+
211
+ ## 0.3.0 - 2025-08-15
212
+
213
+ ### Added
214
+ - Added portfolio analytics for returns, volatility, drawdowns, rolling statistics, attribution, exposure, and turnover.
215
+ - Added dashboard-oriented report artifacts: summary text, JSON metrics, CSV metrics, equity curve CSV, and PNG charts.
216
+ - Added benchmark comparison support for common index and ETF references.
217
+ - Added crisis-window analysis across predefined historical stress periods.
218
+ - Added Monte Carlo block-bootstrap resampling for NAV confidence bands and probability-of-ruin estimates.
219
+
220
+ ### Fixed
221
+ - Improved NAV, cash, position, and weight alignment checks.
222
+
223
+ ## 0.2.2 - 2025-06-20
224
+
225
+ ### Added
226
+ - Added risk-model hooks for inverse volatility, volatility targeting, risk parity, and position limits.
227
+ - Added calendar, drift, signal-change, turnover-gate, and circuit-breaker rebalance policies.
228
+ - Added partial rebalance and tax-aware young-lot avoidance options.
229
+
230
+ ### Changed
231
+ - Moved rebalance behavior into a dedicated engine so strategy logic stays focused on signals and target weights.
232
+
233
+ ## 0.2.1 - 2025-04-20
234
+
235
+ ### Added
236
+ - Added technical indicator configuration for SMA, EMA, RSI, MACD, Bollinger Bands, ATR, and related features.
237
+ - Added reusable strategy examples for daily, weekly, monthly, and quarterly research workflows.
238
+
239
+ ### Fixed
240
+ - Improved strategy data alignment between indicator frames, signal frames, and target-weight frames.
241
+
242
+ ## 0.2.0 - 2025-03-10
243
+
244
+ ### Added
245
+ - Added QuantJourney Cloud API-backed market-data fetch through `/bt/prepare`.
246
+ - Added SDK client integration, API-key auth support, and session/dataset identifiers.
247
+ - Added local pandas containers for instruments, portfolio data, signals, weights, and positions.
248
+
249
+ ### Changed
250
+ - Established the design principle that market data comes from the cloud while strategy computation runs locally.
251
+
252
+ ## 0.1.0 - 2025-02-01
253
+
254
+ ### Added
255
+ - Initial QuantJourney Backtester package.
256
+ - Added the `Backtester` base class with signal, weight, and position hooks.
257
+ - Added local NAV calculation, basic portfolio returns, and strategy summary output.
258
+ - Added the first runnable SMA-style strategy skeleton.
@@ -0,0 +1,162 @@
1
+ # Contributing
2
+
3
+ Thanks for your interest in the QuantJourney Backtester. Contributions are
4
+ welcome — especially **new example strategies**, bug fixes, and documentation
5
+ improvements.
6
+
7
+ ## How contributions are accepted
8
+
9
+ **Open a pull request on GitHub.** A maintainer reviews every pull request and
10
+ decides how to integrate it. A change may be merged as-is, adapted first, or
11
+ re-applied through the QuantJourney source of truth and the pull request closed
12
+ as *integrated*. Either way you will get a response, and accepted work is
13
+ credited. Please don't be surprised if your change lands in a slightly different
14
+ form — the maintainer curates how each contribution is included.
15
+
16
+ Small, focused pull requests are reviewed fastest: one strategy, or one fix, per
17
+ pull request.
18
+
19
+ ## Ways to contribute
20
+
21
+ - **New example strategies** — the easiest and most valued contribution. A good
22
+ example is small, self-contained, and teaches one idea clearly.
23
+ - **Bug fixes** — with a short description of the incorrect behavior and, where
24
+ possible, a test that fails before the fix.
25
+ - **Documentation** — clarifications, typos, better explanations.
26
+ - **Ideas and feedback** — open an issue; not every contribution needs code.
27
+
28
+ ## Step by step
29
+
30
+ ### 1. Fork the repository
31
+
32
+ On GitHub, click **Fork** (top right) to create your own copy.
33
+
34
+ ### 2. Clone your fork and add the upstream remote
35
+
36
+ ```bash
37
+ git clone https://github.com/<your-username>/quantjourney-bt.git
38
+ cd quantjourney-bt
39
+ git remote add upstream https://github.com/QuantJourneyOrg/quantjourney-bt.git
40
+ ```
41
+
42
+ ### 3. Sync your main branch with upstream
43
+
44
+ ```bash
45
+ git checkout main
46
+ git pull upstream main
47
+ ```
48
+
49
+ ### 4. Create a feature branch
50
+
51
+ ```bash
52
+ git checkout -b feat/short-description
53
+ ```
54
+
55
+ Use a short, descriptive name, e.g. `feat/example-bollinger-squeeze` or
56
+ `fix/limit-fill-rounding`.
57
+
58
+ ### 5. Set up a development environment
59
+
60
+ Use the reviewed lockfile (do not install into system/Homebrew Python):
61
+
62
+ ```bash
63
+ uv sync --frozen --extra dev --extra data --extra wf --extra typecheck
64
+ ```
65
+
66
+ ### 6. Make your change
67
+
68
+ For a new strategy, follow the conventions in
69
+ [Adding an example strategy](#adding-an-example-strategy) below.
70
+
71
+ ### 7. Run the checks locally
72
+
73
+ ```bash
74
+ uv run --no-sync pytest -q
75
+ uv run --no-sync ruff check .
76
+ uv run --no-sync ruff format --check .
77
+ uv run --no-sync python tools/check_mypy_baseline.py
78
+ # for a new strategy, confirm it imports cleanly:
79
+ ./strategy.sh <your_strategy_name> --check
80
+ ```
81
+
82
+ Everything should pass before you open a pull request.
83
+ Do not update `quality/mypy-baseline.json` merely to make CI green; a
84
+ maintainer must review the complete diagnostic change.
85
+
86
+ ### 8. Commit
87
+
88
+ ```bash
89
+ git add .
90
+ git commit -m "Add Bollinger squeeze example strategy"
91
+ ```
92
+
93
+ Write a clear, present-tense message describing what the change does.
94
+
95
+ ### 9. Push to your fork
96
+
97
+ ```bash
98
+ git push origin feat/short-description
99
+ ```
100
+
101
+ ### 10. Open the pull request
102
+
103
+ Go to your fork on GitHub — it will offer to **Compare & pull request** against
104
+ `QuantJourneyOrg/quantjourney-bt`. Open it, and in the description include:
105
+
106
+ - what the change does and why,
107
+ - for a strategy: the idea in one or two sentences and the universe used,
108
+ - confirmation that `pytest`, `ruff`, and (for strategies) `--check` pass.
109
+
110
+ ### 11. Respond to review
111
+
112
+ A maintainer will review and may ask for adjustments or adapt the change during
113
+ integration. Push more commits to the same branch to update the pull request.
114
+
115
+ ## Adding an example strategy
116
+
117
+ Example strategies follow a simple convention so they stay consistent and
118
+ discoverable:
119
+
120
+ - **File name:** `example_<mode>_<NN>_<name>.py`, where `<mode>` is `weights`,
121
+ `orders`, or `wf` (walk-forward / optimization), and `<NN>` is the next number
122
+ in that series.
123
+ - **License header + docstring:** start with the short license header used by the
124
+ other files, then a docstring describing Mode, the idea, the universe, and
125
+ (for order or intraday strategies) the order type / granularity — match the
126
+ style of the existing files in `strategies/`.
127
+ - **Structure:** subclass `Backtester` and implement `_compute_signals` and
128
+ `_compute_weights` (weight mode) or `_compute_orders` (order mode).
129
+ - **Keep it runnable:** it should pass `./strategy.sh <name> --check` (an
130
+ import-only check, no credentials or data call).
131
+ - **Add it to the catalog:** a one-line row in
132
+ [`strategies/README.md`](strategies/README.md).
133
+
134
+ Prefer widely available symbols so the example runs against common data, and
135
+ keep the universe small enough to read the resulting report.
136
+
137
+ ## Pull request checklist
138
+
139
+ - [ ] `pytest -q` passes.
140
+ - [ ] `ruff check .` is clean.
141
+ - [ ] `ruff format --check .` and the reviewed mypy baseline gate pass.
142
+ - [ ] New strategies pass `./strategy.sh <name> --check`.
143
+ - [ ] Docstrings follow the existing style.
144
+ - [ ] No credentials, API keys, tokens, or private paths are included.
145
+ - [ ] The change is focused and described in the pull request.
146
+
147
+ ## Scope and honesty
148
+
149
+ Example strategies are research templates, not production trading systems. If an
150
+ example simplifies an assumption (borrow cost, financing, liquidity, market
151
+ impact), state it in the docstring so the assumption is documented, not hidden —
152
+ this is the core value of the project.
153
+
154
+ ## Code of conduct
155
+
156
+ Be respectful and constructive. Assume good faith, keep discussion technical,
157
+ and help newcomers. Behavior that harasses or demeans others is not welcome.
158
+
159
+ ## License
160
+
161
+ By contributing, you agree that your contributions are licensed under the
162
+ project's [Apache License 2.0](LICENSE).
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2024-2026 Jakub Polec / QuantJourney
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,22 @@
1
+ include README.md
2
+ include LICENSE
3
+ include CONTRIBUTING.md
4
+ include strategy.sh
5
+ recursive-include backtester *.py
6
+ include backtester/py.typed
7
+ recursive-include backtester/plots/theme/configs *.py
8
+ recursive-include strategies *.py
9
+ include strategies/README.md
10
+ recursive-include benchmarks *.md
11
+ recursive-include compare *.md
12
+ recursive-include docs *.md *.mdx
13
+ recursive-include skills *.md
14
+ include CHANGELOG.md
15
+ prune tests
16
+ prune tools
17
+ prune release
18
+ prune quality
19
+ prune .githooks
20
+ prune .github
21
+ exclude uv.lock
22
+ exclude RELEASE_BLOCKED