investing-algorithm-framework 8.8.0__tar.gz → 8.9.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 (319) hide show
  1. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/PKG-INFO +232 -8
  2. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/README.md +231 -7
  3. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/__init__.py +22 -35
  4. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/analysis/__init__.py +5 -0
  5. investing_algorithm_framework-8.9.0/investing_algorithm_framework/analysis/backtest_window_analysis.py +364 -0
  6. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/app.py +7 -151
  7. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/strategy.py +65 -1
  8. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/cli.py +304 -0
  9. investing_algorithm_framework-8.9.0/investing_algorithm_framework/cli/index_command.py +387 -0
  10. investing_algorithm_framework-8.9.0/investing_algorithm_framework/cli/migrate_store_command.py +67 -0
  11. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/__init__.py +32 -45
  12. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/backtesting/__init__.py +4 -0
  13. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/backtesting/backtest.py +109 -2
  14. investing_algorithm_framework-8.9.0/investing_algorithm_framework/domain/backtesting/backtest_index_row.py +174 -0
  15. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/backtesting/backtest_utils.py +8 -22
  16. investing_algorithm_framework-8.9.0/investing_algorithm_framework/domain/backtesting/bundle.py +772 -0
  17. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/__init__.py +6 -1
  18. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/risk_rules/__init__.py +10 -0
  19. investing_algorithm_framework-8.9.0/investing_algorithm_framework/domain/models/risk_rules/cooldown_rule.py +214 -0
  20. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/utils/dates.py +3 -4
  21. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/__init__.py +2 -1
  22. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/data_providers/ccxt.py +3 -3
  23. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/services/backtesting/backtest_service.py +14 -18
  24. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/services/backtesting/event_backtest_service.py +1 -0
  25. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/services/backtesting/vector_backtest_service.py +97 -3
  26. investing_algorithm_framework-8.9.0/investing_algorithm_framework/services/backtest_index/__init__.py +3 -0
  27. investing_algorithm_framework-8.9.0/investing_algorithm_framework/services/backtest_index/sqlite_index.py +426 -0
  28. investing_algorithm_framework-8.9.0/investing_algorithm_framework/services/backtest_store/__init__.py +32 -0
  29. investing_algorithm_framework-8.9.0/investing_algorithm_framework/services/backtest_store/base.py +157 -0
  30. investing_algorithm_framework-8.9.0/investing_algorithm_framework/services/backtest_store/decompose.py +70 -0
  31. investing_algorithm_framework-8.9.0/investing_algorithm_framework/services/backtest_store/local_dir_store.py +270 -0
  32. investing_algorithm_framework-8.9.0/investing_algorithm_framework/services/backtest_store/local_tiered_store.py +563 -0
  33. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/pyproject.toml +1 -1
  34. investing_algorithm_framework-8.8.0/investing_algorithm_framework/domain/backtesting/bundle.py +0 -351
  35. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/LICENSE +0 -0
  36. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/analysis/backtest_data_ranges.py +0 -0
  37. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/analysis/markdown.py +0 -0
  38. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/analysis/ranking.py +0 -0
  39. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/__init__.py +0 -0
  40. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/algorithm/__init__.py +0 -0
  41. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/algorithm/algorithm.py +0 -0
  42. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/algorithm/algorithm_factory.py +0 -0
  43. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/app_hook.py +0 -0
  44. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/context.py +0 -0
  45. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/eventloop.py +0 -0
  46. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/__init__.py +0 -0
  47. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/ascii.py +0 -0
  48. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/backtest_report.py +0 -0
  49. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/backtest_report_old.py +0 -0
  50. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/charts/__init__.py +0 -0
  51. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/charts/entry_exist_signals.py +0 -0
  52. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/charts/equity_curve.py +0 -0
  53. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/charts/equity_curve_drawdown.py +0 -0
  54. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/charts/line_chart.py +0 -0
  55. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/charts/monthly_returns_heatmap.py +0 -0
  56. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/charts/ohlcv_data_completeness.py +0 -0
  57. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/charts/rolling_sharp_ratio.py +0 -0
  58. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/charts/yearly_returns_barchart.py +0 -0
  59. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/generate.py +0 -0
  60. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/tables/__init__.py +0 -0
  61. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/tables/key_metrics_table.py +0 -0
  62. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/tables/stop_loss_table.py +0 -0
  63. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/tables/time_metrics_table.py +0 -0
  64. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/tables/trade_metrics_table.py +0 -0
  65. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/tables/trades_table.py +0 -0
  66. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/tables/utils.py +0 -0
  67. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/templates/dashboard.css +0 -0
  68. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/templates/dashboard.js +0 -0
  69. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/templates/dashboard_template.html.j2 +0 -0
  70. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/reporting/templates/report_template.html.j2 +0 -0
  71. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/stateless/__init__.py +0 -0
  72. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/stateless/action_handlers/__init__.py +0 -0
  73. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/stateless/action_handlers/action_handler_strategy.py +0 -0
  74. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/stateless/action_handlers/check_online_handler.py +0 -0
  75. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/stateless/action_handlers/run_strategy_handler.py +0 -0
  76. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/stateless/exception_handler.py +0 -0
  77. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/task.py +0 -0
  78. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/web/__init__.py +0 -0
  79. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/web/controllers/__init__.py +0 -0
  80. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/web/controllers/orders.py +0 -0
  81. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/web/controllers/portfolio.py +0 -0
  82. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/web/controllers/positions.py +0 -0
  83. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/web/create_app.py +0 -0
  84. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/web/error_handler.py +0 -0
  85. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/web/responses.py +0 -0
  86. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/web/run_strategies.py +0 -0
  87. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/web/schemas/__init__.py +0 -0
  88. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/web/schemas/order.py +0 -0
  89. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/web/schemas/portfolio.py +0 -0
  90. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/web/schemas/position.py +0 -0
  91. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/app/web/setup_cors.py +0 -0
  92. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/__init__.py +0 -0
  93. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/deploy_to_aws_lambda.py +0 -0
  94. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/deploy_to_azure_function.py +0 -0
  95. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/initialize_app.py +0 -0
  96. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/mcp_server.py +0 -0
  97. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/.gitignore.template +0 -0
  98. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/app.py.template +0 -0
  99. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/app_aws_lambda_function.py.template +0 -0
  100. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/app_azure_function.py.template +0 -0
  101. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/app_web.py.template +0 -0
  102. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/aws_lambda_dockerfile.template +0 -0
  103. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/aws_lambda_dockerignore.template +0 -0
  104. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/aws_lambda_readme.md.template +0 -0
  105. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/aws_lambda_requirements.txt.template +0 -0
  106. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/azure_function_function_app.py.template +0 -0
  107. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/azure_function_host.json.template +0 -0
  108. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/azure_function_local.settings.json.template +0 -0
  109. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/azure_function_requirements.txt.template +0 -0
  110. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/data_providers.py.template +0 -0
  111. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/env.example.template +0 -0
  112. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/env_azure_function.example.template +0 -0
  113. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/market_data_providers.py.template +0 -0
  114. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/readme.md.template +0 -0
  115. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/requirements.txt.template +0 -0
  116. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/run_backtest.py.template +0 -0
  117. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/templates/strategy.py.template +0 -0
  118. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/cli/validate_backtest_checkpoints.py +0 -0
  119. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/create_app.py +0 -0
  120. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/dependency_container.py +0 -0
  121. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/algorithm_id.py +0 -0
  122. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/backtesting/backtest_date_range.py +0 -0
  123. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/backtesting/backtest_evaluation_focuss.py +0 -0
  124. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/backtesting/backtest_metrics.py +0 -0
  125. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/backtesting/backtest_permutation_test.py +0 -0
  126. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/backtesting/backtest_run.py +0 -0
  127. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/backtesting/backtest_summary_metrics.py +0 -0
  128. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/backtesting/combine_backtests.py +0 -0
  129. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/backtesting/consistency.py +0 -0
  130. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/backtesting/templates/backtest.html +0 -0
  131. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/backtesting/templates/finterion-dark.png +0 -0
  132. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/backtesting/templates/finterion-light.png +0 -0
  133. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/blotter.py +0 -0
  134. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/config.py +0 -0
  135. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/constants.py +0 -0
  136. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/data_provider.py +0 -0
  137. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/data_structures.py +0 -0
  138. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/datetime_parsing.py +0 -0
  139. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/decimal_parsing.py +0 -0
  140. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/exceptions.py +0 -0
  141. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/fx.py +0 -0
  142. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/app_mode.py +0 -0
  143. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/base_model.py +0 -0
  144. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/data/__init__.py +0 -0
  145. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/data/data_source.py +0 -0
  146. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/data/data_type.py +0 -0
  147. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/event.py +0 -0
  148. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/market/__init__.py +0 -0
  149. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/market/market_credential.py +0 -0
  150. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/order/__init__.py +0 -0
  151. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/order/order.py +0 -0
  152. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/order/order_side.py +0 -0
  153. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/order/order_status.py +0 -0
  154. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/order/order_type.py +0 -0
  155. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/portfolio/__init__.py +0 -0
  156. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/portfolio/portfolio.py +0 -0
  157. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/portfolio/portfolio_configuration.py +0 -0
  158. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/portfolio/portfolio_snapshot.py +0 -0
  159. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/portfolio/sync.py +0 -0
  160. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/position/__init__.py +0 -0
  161. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/position/position.py +0 -0
  162. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/position/position_size.py +0 -0
  163. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/position/position_snapshot.py +0 -0
  164. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/risk_rules/scaling_rule.py +0 -0
  165. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/risk_rules/stop_loss_rule.py +0 -0
  166. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/risk_rules/take_profit_rule.py +0 -0
  167. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/risk_rules/trading_cost.py +0 -0
  168. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/snapshot_interval.py +0 -0
  169. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/strategy_profile.py +0 -0
  170. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/time_frame.py +0 -0
  171. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/time_interval.py +0 -0
  172. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/time_unit.py +0 -0
  173. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/tracing/__init__.py +0 -0
  174. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/tracing/trace.py +0 -0
  175. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/trade/__init__.py +0 -0
  176. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/trade/trade.py +0 -0
  177. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/trade/trade_status.py +0 -0
  178. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/trade/trade_stop_loss.py +0 -0
  179. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/models/trade/trade_take_profit.py +0 -0
  180. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/order_executor.py +0 -0
  181. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/pipeline/__init__.py +0 -0
  182. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/pipeline/custom_factor.py +0 -0
  183. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/pipeline/factor.py +0 -0
  184. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/pipeline/factors/__init__.py +0 -0
  185. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/pipeline/factors/builtin.py +0 -0
  186. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/pipeline/filter.py +0 -0
  187. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/pipeline/pipeline.py +0 -0
  188. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/portfolio_provider.py +0 -0
  189. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/services/__init__.py +0 -0
  190. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/services/market_credential_service.py +0 -0
  191. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/services/portfolios/__init__.py +0 -0
  192. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/services/portfolios/portfolio_sync_service.py +0 -0
  193. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/services/rounding_service.py +0 -0
  194. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/services/state_handler.py +0 -0
  195. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/stateless_actions.py +0 -0
  196. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/strategy.py +0 -0
  197. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/utils/__init__.py +0 -0
  198. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/utils/csv.py +0 -0
  199. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/utils/custom_tqdm.py +0 -0
  200. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/utils/jupyter_notebook_detection.py +0 -0
  201. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/utils/polars.py +0 -0
  202. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/utils/random.py +0 -0
  203. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/utils/signatures.py +0 -0
  204. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/utils/stoppable_thread.py +0 -0
  205. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/domain/utils/synchronized.py +0 -0
  206. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/download_data.py +0 -0
  207. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/data_providers/__init__.py +0 -0
  208. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/data_providers/alpha_vantage.py +0 -0
  209. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/data_providers/base_url.py +0 -0
  210. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/data_providers/csv.py +0 -0
  211. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/data_providers/csv_url.py +0 -0
  212. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/data_providers/json_url.py +0 -0
  213. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/data_providers/ohlcv_base.py +0 -0
  214. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/data_providers/pandas.py +0 -0
  215. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/data_providers/parquet_url.py +0 -0
  216. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/data_providers/polygon.py +0 -0
  217. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/data_providers/yahoo.py +0 -0
  218. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/database/__init__.py +0 -0
  219. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/database/sql_alchemy.py +0 -0
  220. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/__init__.py +0 -0
  221. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/decimal_parser.py +0 -0
  222. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/model_extension.py +0 -0
  223. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/order/__init__.py +0 -0
  224. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/order/order.py +0 -0
  225. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/order/trade_allocation.py +0 -0
  226. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/order_trade_association.py +0 -0
  227. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/portfolio/__init__.py +0 -0
  228. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/portfolio/portfolio_snapshot.py +0 -0
  229. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/portfolio/sql_portfolio.py +0 -0
  230. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/position/__init__.py +0 -0
  231. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/position/position.py +0 -0
  232. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/position/position_snapshot.py +0 -0
  233. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/trades/__init__.py +0 -0
  234. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/trades/trade.py +0 -0
  235. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/trades/trade_stop_loss.py +0 -0
  236. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/models/trades/trade_take_profit.py +0 -0
  237. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/order_executors/__init__.py +0 -0
  238. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/order_executors/ccxt_order_executor.py +0 -0
  239. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/portfolio_providers/__init__.py +0 -0
  240. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/portfolio_providers/ccxt_portfolio_provider.py +0 -0
  241. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/repositories/__init__.py +0 -0
  242. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/repositories/order_repository.py +0 -0
  243. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/repositories/portfolio_repository.py +0 -0
  244. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/repositories/portfolio_snapshot_repository.py +0 -0
  245. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/repositories/position_repository.py +0 -0
  246. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/repositories/position_snapshot_repository.py +0 -0
  247. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/repositories/repository.py +0 -0
  248. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/repositories/trade_allocation_repository.py +0 -0
  249. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/repositories/trade_repository.py +0 -0
  250. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/repositories/trade_stop_loss_repository.py +0 -0
  251. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/repositories/trade_take_profit_repository.py +0 -0
  252. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/services/__init__.py +0 -0
  253. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/services/aws/__init__.py +0 -0
  254. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/services/aws/state_handler.py +0 -0
  255. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/services/azure/__init__.py +0 -0
  256. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/services/azure/state_handler.py +0 -0
  257. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/services/backtesting/__init__.py +0 -0
  258. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/infrastructure/services/backtesting/checkpoint_manifest.py +0 -0
  259. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/notebook/__init__.py +0 -0
  260. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/notebook/magic.py +0 -0
  261. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/__init__.py +0 -0
  262. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/configuration_service.py +0 -0
  263. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/data_providers/__init__.py +0 -0
  264. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/data_providers/data.py +0 -0
  265. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/data_providers/data_provider_service.py +0 -0
  266. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/market_credential_service.py +0 -0
  267. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/__init__.py +0 -0
  268. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/_returns_helper.py +0 -0
  269. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/alpha.py +0 -0
  270. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/beta.py +0 -0
  271. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/cagr.py +0 -0
  272. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/calmar_ratio.py +0 -0
  273. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/consistency.py +0 -0
  274. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/drawdown.py +0 -0
  275. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/equity_curve.py +0 -0
  276. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/exposure.py +0 -0
  277. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/generate.py +0 -0
  278. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/mean_daily_return.py +0 -0
  279. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/price_efficiency.py +0 -0
  280. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/profit_factor.py +0 -0
  281. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/recovery.py +0 -0
  282. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/returns.py +0 -0
  283. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/risk_free_rate.py +0 -0
  284. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/sharpe_ratio.py +0 -0
  285. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/sortino_ratio.py +0 -0
  286. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/standard_deviation.py +0 -0
  287. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/trades.py +0 -0
  288. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/treynor_ratio.py +0 -0
  289. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/ulcer.py +0 -0
  290. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/value_at_risk.py +0 -0
  291. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/volatility.py +0 -0
  292. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/metrics/win_rate.py +0 -0
  293. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/order_service/__init__.py +0 -0
  294. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/order_service/order_backtest_service.py +0 -0
  295. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/order_service/order_executor_lookup.py +0 -0
  296. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/order_service/order_service.py +0 -0
  297. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/pipeline/__init__.py +0 -0
  298. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/pipeline/pipeline_engine.py +0 -0
  299. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/pipeline/vector_pipeline_engine.py +0 -0
  300. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/portfolios/__init__.py +0 -0
  301. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/portfolios/backtest_portfolio_service.py +0 -0
  302. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/portfolios/broker_balance_tracker.py +0 -0
  303. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/portfolios/portfolio_configuration_service.py +0 -0
  304. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/portfolios/portfolio_provider_lookup.py +0 -0
  305. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/portfolios/portfolio_service.py +0 -0
  306. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/portfolios/portfolio_snapshot_service.py +0 -0
  307. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/portfolios/portfolio_sync_service.py +0 -0
  308. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/positions/__init__.py +0 -0
  309. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/positions/position_service.py +0 -0
  310. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/positions/position_snapshot_service.py +0 -0
  311. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/repository_service.py +0 -0
  312. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/trade_order_evaluator/__init__.py +0 -0
  313. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/trade_order_evaluator/backtest_trade_oder_evaluator.py +0 -0
  314. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/trade_order_evaluator/default_trade_order_evaluator.py +0 -0
  315. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/trade_order_evaluator/trade_order_evaluator.py +0 -0
  316. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/trade_service/__init__.py +0 -0
  317. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/trade_service/trade_service.py +0 -0
  318. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/trade_service/trade_stop_loss_service.py +0 -0
  319. {investing_algorithm_framework-8.8.0 → investing_algorithm_framework-8.9.0}/investing_algorithm_framework/services/trade_service/trade_take_profit_service.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: investing-algorithm-framework
3
- Version: 8.8.0
3
+ Version: 8.9.0
4
4
  Summary: A framework for creating trading bots
5
5
  Author: MDUYN
6
6
  Requires-Python: >=3.10,<4.0
@@ -47,7 +47,7 @@ Description-Content-Type: text/markdown
47
47
  </h1>
48
48
 
49
49
  <p align="center">
50
- <i align="center">Create trading strategies. Compare them side by side. Pick the best one and Deploy 🚀</i>
50
+ <i align="center">The full quant workflow in one framework: build strategies, vector & event-driven backtest at scale, compare in a single dashboard, and deploy the winner 🚀</i>
51
51
  </p>
52
52
 
53
53
  <h4 align="center">
@@ -103,15 +103,15 @@ Description-Content-Type: text/markdown
103
103
 
104
104
  ## Introduction
105
105
 
106
- `Investing Algorithm Framework` is a Python framework for creating, backtesting, and deploying trading strategies.
106
+ `Investing Algorithm Framework` is a Python framework that covers the entire quant workflow: define a strategy once, vector-backtest thousands of parameter variants to find promising signals, narrow down with a storage layer that ranks 10k+ results in milliseconds, validate the winners in a realistic event-driven simulation, compare everything in a single interactive HTML dashboard, and deploy the best performer live, all with the same `TradingStrategy` class, no code rewrites between stages.
107
107
 
108
- Most quant frameworks stop at "here's your backtest result." You get a number, maybe a chart, and then you're on your own figuring out which strategy is actually better.
108
+ Most quant frameworks stop at "here's your backtest result." You get a number, maybe a chart, and then you're on your own figuring out which strategy variant is actually better, whether the result is robust across time windows, and how to go from research to production. This framework closes that gap.
109
109
 
110
- This framework is built around the full loop: **create strategies → vector backtest for signals analysis → compare them in a single report → event backtest the most promising strategies → deploy the winner.** It generates a self-contained HTML dashboard that lets you rank, filter, and visually compare every strategy you've tested — all in one view, no notebooks required.
110
+ > **Want to see this in practice?** Check out the [`examples/tutorial/`](examples/tutorial/README.md): a series of runnable notebooks that walk you through every stage: defining a strategy, visualizing its signals, sweeping parameters across rolling windows, detecting overfitting with Monte Carlo permutation tests, filtering and ranking with the storage layer, and deploying the winner.
111
111
 
112
112
  <details open>
113
113
  <summary>
114
- Features
114
+ <strong>Features</strong>
115
115
  </summary> <br>
116
116
 
117
117
  - 📊 **[30+ Metrics](https://coding-kitties.github.io/investing-algorithm-framework/Getting%20Started/metrics)** — CAGR, Sharpe, Sortino, Calmar, VaR, CVaR, Max DD, Recovery & more
@@ -128,13 +128,96 @@ This framework is built around the full loop: **create strategies → vector bac
128
128
  - 📉 **[Benchmark Comparison](https://coding-kitties.github.io/investing-algorithm-framework/Getting%20Started/backtest-reports)** — Beat-rate analysis vs Buy & Hold, DCA, risk-free & custom benchmarks
129
129
  - 📄 **[One-Click HTML Report](https://coding-kitties.github.io/investing-algorithm-framework/Getting%20Started/backtest-reports)** — Self-contained file, no server, dark & light theme, shareable
130
130
  - 📦 **[Custom `.iafbt` Backtest Bundle Format](https://coding-kitties.github.io/investing-algorithm-framework/Data/backtest_data)** — An explicit, versioned, compressed, language-portable container (zstd + msgpack with magic-byte header) plus a separate parquet index for fast filtering without loading. ~21× smaller and ~27× fewer files than standard filebased directory layouts, with parallel I/O for fast load/save of large amounts of backtests.
131
+ - 🗄️ **[Tiered Backtest Storage Layer](examples/storage_layer_demo/README.md)** — Manage thousands of `.iafbt` bundles with a Tier-1 SQLite index (sub-100 ms ranks/filters over 10k+ backtests), a swappable `BacktestStore` protocol (`LocalDirStore`, `LocalTieredStore`), content-addressed Tier-3 OHLCV deduplication, and a CLI (`iaf index` / `iaf list` / `iaf rank` / `iaf migrate-store`) that plugs straight into the HTML dashboard.
131
132
  - 🌐 **[Load External Data](https://coding-kitties.github.io/investing-algorithm-framework/Data/external-data)** — Fetch CSV, JSON, or Parquet from any URL with caching and auto-refresh
132
133
  - � **[Per-Market Deposit Schedules & Portfolio Sync](https://coding-kitties.github.io/investing-algorithm-framework/Advanced%20Concepts/portfolio-sync)** — Declare recurring or one-shot external cash flows on a market with `deposit_schedule=` / `auto_sync=True`. Backtests simulate the deposits; live mode reconciles with the broker — same `context.sync_portfolio()` API in both modes.
133
- - �📝 **[Record Custom Variables](https://coding-kitties.github.io/investing-algorithm-framework/Advanced%20Concepts/recording-variables)** — Track any indicator or metric during backtests with `context.record()`
134
+ - 📝 **[Record Custom Variables](https://coding-kitties.github.io/investing-algorithm-framework/Advanced%20Concepts/recording-variables)** — Track any indicator or metric during backtests with `context.record()`
135
+ - ⏱️ **Signal Cooldowns**: Throttle whipsaw with declarative `CooldownRule`s: per-symbol or portfolio-wide, side-aware (`trigger="sell"`, `blocks="buy"`), enforced identically by the vector and event-driven engines
134
136
  - 🚀 **[Build → Backtest → Deploy](https://coding-kitties.github.io/investing-algorithm-framework/Getting%20Started/application-setup)** — Local dev, cloud deploy (AWS / Azure), or monetize on Finterion
135
137
 
136
138
  </details>
137
139
 
140
+ <details open>
141
+ <summary>
142
+ <strong>Strategy Definition</strong>
143
+ </summary> <br>
144
+
145
+ Declare **what data** your strategy needs and **when to buy or sell** as a `TradingStrategy` subclass — the framework wires up data loading, signal evaluation, order execution, position management, and reporting around it. The same class runs unchanged in vector backtests, event-driven backtests, paper trading and live.
146
+
147
+ > **Want strategy ideas to start from?** Check out [`examples/strategies_showcase/`](examples/strategies_showcase/README.md): a collection of runnable strategy templates (trend following, mean reversion, cross-sectional momentum, multi-factor, pairs trading, and more).
148
+
149
+ Risk and execution behaviour are expressed as **declarative rule lists** rather than ad-hoc code paths, so the engines can enforce them identically across modes:
150
+
151
+ - **`position_sizes`**: [`PositionSize`](https://coding-kitties.github.io/investing-algorithm-framework/Risk%20Rules/position-size) per symbol (fixed amount or percentage of portfolio).
152
+ - **`stop_losses`** / **`take_profits`**: [`StopLossRule`](https://coding-kitties.github.io/investing-algorithm-framework/Risk%20Rules/stop-loss-rule) / [`TakeProfitRule`](https://coding-kitties.github.io/investing-algorithm-framework/Risk%20Rules/take-profit-rule) with fixed or trailing thresholds and partial-exit `sell_percentage`.
153
+ - **`scaling_rules`**: [`ScalingRule`](https://coding-kitties.github.io/investing-algorithm-framework/Risk%20Rules/scaling-rule) for pyramiding (`scale_in_percentage=[…]`, `max_entries`, per-symbol `cooldown_in_bars`).
154
+ - **`cooldowns`**: [`CooldownRule`](https://coding-kitties.github.io/investing-algorithm-framework/Risk%20Rules/cooldown-rule) to throttle whipsaw — per-symbol or portfolio-wide, side-aware (e.g. `trigger="sell", blocks="buy", bars=12`). Enforced bar-for-bar in both the vector and event-driven engines.
155
+ - **`trading_costs`**: [`TradingCost`](https://coding-kitties.github.io/investing-algorithm-framework/Risk%20Rules/trading-cost) per symbol (fees, slippage, fixed costs).
156
+
157
+ ```python
158
+ from investing_algorithm_framework import (
159
+ TradingStrategy,
160
+ PositionSize,
161
+ ScalingRule,
162
+ StopLossRule,
163
+ TakeProfitRule,
164
+ CooldownRule,
165
+ TradingCost,
166
+ )
167
+
168
+
169
+ class MyStrategy(TradingStrategy):
170
+ symbols = ["BTC", "ETH"]
171
+
172
+ position_sizes = [
173
+ PositionSize(symbol="BTC", percentage_of_portfolio=20),
174
+ PositionSize(symbol="ETH", percentage_of_portfolio=20),
175
+ ]
176
+
177
+ stop_losses = [
178
+ StopLossRule(symbol="BTC", percentage_threshold=5, trailing=True),
179
+ StopLossRule(symbol="ETH", percentage_threshold=5, trailing=True),
180
+ ]
181
+
182
+ take_profits = [
183
+ TakeProfitRule(
184
+ symbol="BTC", percentage_threshold=10, sell_percentage=50,
185
+ ),
186
+ TakeProfitRule(
187
+ symbol="ETH", percentage_threshold=10, sell_percentage=50,
188
+ ),
189
+ ]
190
+
191
+ scaling_rules = [
192
+ ScalingRule(
193
+ symbol="BTC", max_entries=3, scale_in_percentage=[50, 25],
194
+ ),
195
+ ScalingRule(
196
+ symbol="ETH", max_entries=3, scale_in_percentage=[50, 25],
197
+ ),
198
+ ]
199
+
200
+ cooldowns = [
201
+ CooldownRule(symbol="BTC", trigger="sell", blocks="buy", bars=12),
202
+ CooldownRule(trigger="any", blocks="any", bars=2),
203
+ ]
204
+
205
+ trading_costs = [
206
+ TradingCost(symbol="BTC", fee_percentage=0.1),
207
+ TradingCost(symbol="ETH", fee_percentage=0.1),
208
+ ]
209
+
210
+ def generate_buy_signals(self, data):
211
+ ...
212
+
213
+ def generate_sell_signals(self, data):
214
+ ...
215
+ ```
216
+
217
+ → [Strategy docs](https://coding-kitties.github.io/investing-algorithm-framework/Getting%20Started/strategies)
218
+
219
+ </details>
220
+
138
221
  <details open>
139
222
  <summary>
140
223
  <strong>Backtesting Engines</strong>
@@ -185,10 +268,139 @@ Every backtest produces a **self-contained HTML dashboard** — open it in any b
185
268
  - **Built-in MCP server** — let Copilot, Claude, or any MCP-compatible agent query your backtests, rank strategies, and reason over trades through `investing-algorithm-framework mcp`
186
269
  - **Notes keeping** — annotate every backtest with hypotheses, observations and conclusions; notes travel with the report so your research is never lost
187
270
 
271
+ #### From backtest results to a report
272
+
273
+ > 💡 **Want state-of-the-art analytics, publishable reports, ranking across thousands of runs and AI agents that do the analysis for you?** Partner with our analytics integration partners below — they pick up where the local `report.html` leaves off.
274
+
275
+ <p align="center">
276
+ <a href="https://www.finterion.com/" target="_blank">
277
+ <picture>
278
+ <source media="(prefers-color-scheme: dark)" srcset="static/features/finterion-analytics-dark.svg">
279
+ <source media="(prefers-color-scheme: light)" srcset="static/features/finterion-analytics-light.svg">
280
+ <img src="static/features/finterion-analytics-light.svg" alt="Backtest analytics for teams — featuring Finterion" style="max-width: 100%;">
281
+ </picture>
282
+ </a>
283
+ </p>
284
+
285
+ Every backtest API — vector or event-driven — returns the same `Backtest` object, which the `BacktestReport` consumes directly. So whether you're iterating over an in-memory list or a folder of persisted `.iafbt` bundles, the path to the dashboard is the same:
286
+
287
+ ```python
288
+ from investing_algorithm_framework import BacktestReport
289
+
290
+ # --- Single event-driven backtest ---
291
+ backtest = app.run_backtest(backtest_date_range=date_range)
292
+ BacktestReport(backtests=[backtest]).save("event_report.html")
293
+
294
+ # --- A sweep of vector backtests (parameter grid / multi-window) ---
295
+ backtests = app.run_vector_backtests(
296
+ strategies=[StrategyA(), StrategyB(), StrategyC()],
297
+ backtest_date_ranges=[range_2022, range_2023, range_2024],
298
+ n_workers=-1,
299
+ backtest_storage_directory="./my-backtests/", # persists .iafbt bundles
300
+ show_progress=True,
301
+ )
302
+ BacktestReport(backtests=backtests).save("sweep_report.html")
303
+
304
+ # --- Or: load a folder of bundles back later (parallel decode) ---
305
+ report = BacktestReport.open(
306
+ directory_path="./my-backtests/",
307
+ workers=-1,
308
+ show_progress=True,
309
+ )
310
+ report.save("from_disk_report.html")
311
+ ```
312
+
313
+ For sweeps that grow into the thousands, combine this with the [Backtest Storage Layer](examples/storage_layer_demo/README.md) below — rank in SQLite first, then load only the winners into the report:
314
+
315
+ ```python
316
+ from investing_algorithm_framework import BacktestReport
317
+ from investing_algorithm_framework.cli.index_command import (
318
+ build_index, rank_index,
319
+ )
320
+ from investing_algorithm_framework.services.backtest_store import (
321
+ LocalDirStore,
322
+ )
323
+
324
+ # 1. Build (or refresh) the Tier-1 SQLite index over the folder of bundles.
325
+ build_index("./my-backtests/")
326
+
327
+ # 2. Pick the top 25 by Sharpe straight from SQLite — no Parquet decoded.
328
+ top = rank_index(
329
+ "./my-backtests/",
330
+ by="sharpe_ratio",
331
+ where="summary_number_of_trades > 50",
332
+ limit=25,
333
+ )
334
+
335
+ # 3. Materialise only those 25 bundles through the BacktestStore protocol.
336
+ store = LocalDirStore("./my-backtests/")
337
+ winners = [store.open(row["bundle_path"]) for row in top]
338
+
339
+ # 4. Render a focused dashboard with just the winners.
340
+ BacktestReport(backtests=winners).save("top25_by_sharpe.html")
341
+ ```
342
+
188
343
  → [Backtest dashboard docs](https://coding-kitties.github.io/investing-algorithm-framework/Getting%20Started/backtesting) · [MCP server docs](https://coding-kitties.github.io/investing-algorithm-framework/Advanced%20Concepts/mcp-server)
189
344
 
190
345
  </details>
191
346
 
347
+ <details open>
348
+ <summary>
349
+ <strong>Backtest Storage Layer — scale to thousands of backtests</strong>
350
+ </summary> <br>
351
+
352
+ Once you start sweeping parameter grids and walk-forward windows, a flat folder of `.iafbt` bundles stops scaling: every comparison re-decodes multi-MB Parquet metric blobs just to read a Sharpe number. The storage layer fixes that with three tiers behind a single `BacktestStore` protocol:
353
+
354
+ - **Tier-1 — SQLite index (`index.sqlite`)**: one row per bundle with every scalar from `BacktestSummaryMetrics` promoted to its own column. Ranking 10k+ bundles becomes a sub-100 ms SQL query — no `.iafbt` is opened.
355
+ - **Tier-2 — `BacktestStore` adapters**: `LocalDirStore` (flat folder of bundles) or `LocalTieredStore` (hive-partitioned layout). Same handle-based API, swap the implementation without touching call sites.
356
+ - **Tier-3 — content-addressed OHLCV chunks**: SHA-256 deduped per-symbol OHLCV blobs shared across every bundle that references them. `garbage_collect_ohlcv()` reclaims orphans.
357
+
358
+ A CLI ties it all together: `iaf index` builds/refreshes the Tier-1 SQLite, `iaf list` / `iaf rank` query it, and `iaf migrate-store` moves a whole collection between store kinds in one command.
359
+
360
+ #### Typical workflow
361
+
362
+ ```python
363
+ from investing_algorithm_framework import BacktestReport
364
+ from investing_algorithm_framework.cli.index_command import (
365
+ build_index, rank_index,
366
+ )
367
+ from investing_algorithm_framework.services.backtest_store import (
368
+ LocalDirStore,
369
+ )
370
+
371
+ # 1. Build (or refresh) the Tier-1 SQLite index over a folder of .iafbt bundles.
372
+ build_index("./my-backtests/") # equivalent to: iaf index ./my-backtests/
373
+
374
+ # 2. Pick the top 20 by Sharpe straight from SQLite — no Parquet decoded.
375
+ top = rank_index(
376
+ "./my-backtests/",
377
+ by="sharpe_ratio",
378
+ where="summary_number_of_trades > 50",
379
+ limit=20,
380
+ )
381
+
382
+ # 3. Materialise just those 20 bundles through the BacktestStore protocol.
383
+ store = LocalDirStore("./my-backtests/")
384
+ backtests = [store.open(row["bundle_path"]) for row in top]
385
+
386
+ # 4. Feed them straight into the HTML dashboard.
387
+ BacktestReport(backtests=backtests).save("top20.html")
388
+ ```
389
+
390
+ Or from the shell:
391
+
392
+ ```bash
393
+ iaf index ./my-backtests/
394
+ iaf rank ./my-backtests/ --by sharpe_ratio --where "summary_number_of_trades > 50" -n 20
395
+ iaf list ./my-backtests/ --sort calmar_ratio --json
396
+ iaf migrate-store --from local-dir --src ./my-backtests/ \
397
+ --to local-tiered --dst ./tiered/
398
+ ```
399
+
400
+ → End-to-end runnable example: [`examples/storage_layer_demo/`](examples/storage_layer_demo/README.md)
401
+
402
+ </details>
403
+
192
404
  <details open>
193
405
  <summary>
194
406
  <strong>Live Trading</strong>
@@ -269,7 +481,7 @@ from pyindicators import ema, rsi, crossover, crossunder
269
481
 
270
482
  from investing_algorithm_framework import (
271
483
  TradingStrategy, DataSource, TimeUnit, DataType,
272
- PositionSize, ScalingRule, StopLossRule,
484
+ PositionSize, ScalingRule, StopLossRule, CooldownRule,
273
485
  )
274
486
 
275
487
 
@@ -322,6 +534,18 @@ class RSIEMACrossoverStrategy(TradingStrategy):
322
534
  sell_percentage=100, trailing=True,
323
535
  ),
324
536
  ]
537
+ # Signal throttling: after a stop-out / sell, block re-entries on
538
+ # the same symbol for 12 bars, plus a portfolio-wide breather of
539
+ # 2 bars after any order to avoid same-bar pile-ups.
540
+ cooldowns = [
541
+ CooldownRule(
542
+ symbol="BTC", trigger="sell", blocks="buy", bars=12,
543
+ ),
544
+ CooldownRule(
545
+ symbol="ETH", trigger="sell", blocks="buy", bars=12,
546
+ ),
547
+ CooldownRule(trigger="any", blocks="any", bars=2),
548
+ ]
325
549
 
326
550
  def generate_buy_signals(
327
551
  self, data: Dict[str, Any]
@@ -3,7 +3,7 @@
3
3
  </h1>
4
4
 
5
5
  <p align="center">
6
- <i align="center">Create trading strategies. Compare them side by side. Pick the best one and Deploy 🚀</i>
6
+ <i align="center">The full quant workflow in one framework: build strategies, vector & event-driven backtest at scale, compare in a single dashboard, and deploy the winner 🚀</i>
7
7
  </p>
8
8
 
9
9
  <h4 align="center">
@@ -59,15 +59,15 @@
59
59
 
60
60
  ## Introduction
61
61
 
62
- `Investing Algorithm Framework` is a Python framework for creating, backtesting, and deploying trading strategies.
62
+ `Investing Algorithm Framework` is a Python framework that covers the entire quant workflow: define a strategy once, vector-backtest thousands of parameter variants to find promising signals, narrow down with a storage layer that ranks 10k+ results in milliseconds, validate the winners in a realistic event-driven simulation, compare everything in a single interactive HTML dashboard, and deploy the best performer live, all with the same `TradingStrategy` class, no code rewrites between stages.
63
63
 
64
- Most quant frameworks stop at "here's your backtest result." You get a number, maybe a chart, and then you're on your own figuring out which strategy is actually better.
64
+ Most quant frameworks stop at "here's your backtest result." You get a number, maybe a chart, and then you're on your own figuring out which strategy variant is actually better, whether the result is robust across time windows, and how to go from research to production. This framework closes that gap.
65
65
 
66
- This framework is built around the full loop: **create strategies → vector backtest for signals analysis → compare them in a single report → event backtest the most promising strategies → deploy the winner.** It generates a self-contained HTML dashboard that lets you rank, filter, and visually compare every strategy you've tested — all in one view, no notebooks required.
66
+ > **Want to see this in practice?** Check out the [`examples/tutorial/`](examples/tutorial/README.md): a series of runnable notebooks that walk you through every stage: defining a strategy, visualizing its signals, sweeping parameters across rolling windows, detecting overfitting with Monte Carlo permutation tests, filtering and ranking with the storage layer, and deploying the winner.
67
67
 
68
68
  <details open>
69
69
  <summary>
70
- Features
70
+ <strong>Features</strong>
71
71
  </summary> <br>
72
72
 
73
73
  - 📊 **[30+ Metrics](https://coding-kitties.github.io/investing-algorithm-framework/Getting%20Started/metrics)** — CAGR, Sharpe, Sortino, Calmar, VaR, CVaR, Max DD, Recovery & more
@@ -84,13 +84,96 @@ This framework is built around the full loop: **create strategies → vector bac
84
84
  - 📉 **[Benchmark Comparison](https://coding-kitties.github.io/investing-algorithm-framework/Getting%20Started/backtest-reports)** — Beat-rate analysis vs Buy & Hold, DCA, risk-free & custom benchmarks
85
85
  - 📄 **[One-Click HTML Report](https://coding-kitties.github.io/investing-algorithm-framework/Getting%20Started/backtest-reports)** — Self-contained file, no server, dark & light theme, shareable
86
86
  - 📦 **[Custom `.iafbt` Backtest Bundle Format](https://coding-kitties.github.io/investing-algorithm-framework/Data/backtest_data)** — An explicit, versioned, compressed, language-portable container (zstd + msgpack with magic-byte header) plus a separate parquet index for fast filtering without loading. ~21× smaller and ~27× fewer files than standard filebased directory layouts, with parallel I/O for fast load/save of large amounts of backtests.
87
+ - 🗄️ **[Tiered Backtest Storage Layer](examples/storage_layer_demo/README.md)** — Manage thousands of `.iafbt` bundles with a Tier-1 SQLite index (sub-100 ms ranks/filters over 10k+ backtests), a swappable `BacktestStore` protocol (`LocalDirStore`, `LocalTieredStore`), content-addressed Tier-3 OHLCV deduplication, and a CLI (`iaf index` / `iaf list` / `iaf rank` / `iaf migrate-store`) that plugs straight into the HTML dashboard.
87
88
  - 🌐 **[Load External Data](https://coding-kitties.github.io/investing-algorithm-framework/Data/external-data)** — Fetch CSV, JSON, or Parquet from any URL with caching and auto-refresh
88
89
  - � **[Per-Market Deposit Schedules & Portfolio Sync](https://coding-kitties.github.io/investing-algorithm-framework/Advanced%20Concepts/portfolio-sync)** — Declare recurring or one-shot external cash flows on a market with `deposit_schedule=` / `auto_sync=True`. Backtests simulate the deposits; live mode reconciles with the broker — same `context.sync_portfolio()` API in both modes.
89
- - �📝 **[Record Custom Variables](https://coding-kitties.github.io/investing-algorithm-framework/Advanced%20Concepts/recording-variables)** — Track any indicator or metric during backtests with `context.record()`
90
+ - 📝 **[Record Custom Variables](https://coding-kitties.github.io/investing-algorithm-framework/Advanced%20Concepts/recording-variables)** — Track any indicator or metric during backtests with `context.record()`
91
+ - ⏱️ **Signal Cooldowns**: Throttle whipsaw with declarative `CooldownRule`s: per-symbol or portfolio-wide, side-aware (`trigger="sell"`, `blocks="buy"`), enforced identically by the vector and event-driven engines
90
92
  - 🚀 **[Build → Backtest → Deploy](https://coding-kitties.github.io/investing-algorithm-framework/Getting%20Started/application-setup)** — Local dev, cloud deploy (AWS / Azure), or monetize on Finterion
91
93
 
92
94
  </details>
93
95
 
96
+ <details open>
97
+ <summary>
98
+ <strong>Strategy Definition</strong>
99
+ </summary> <br>
100
+
101
+ Declare **what data** your strategy needs and **when to buy or sell** as a `TradingStrategy` subclass — the framework wires up data loading, signal evaluation, order execution, position management, and reporting around it. The same class runs unchanged in vector backtests, event-driven backtests, paper trading and live.
102
+
103
+ > **Want strategy ideas to start from?** Check out [`examples/strategies_showcase/`](examples/strategies_showcase/README.md): a collection of runnable strategy templates (trend following, mean reversion, cross-sectional momentum, multi-factor, pairs trading, and more).
104
+
105
+ Risk and execution behaviour are expressed as **declarative rule lists** rather than ad-hoc code paths, so the engines can enforce them identically across modes:
106
+
107
+ - **`position_sizes`**: [`PositionSize`](https://coding-kitties.github.io/investing-algorithm-framework/Risk%20Rules/position-size) per symbol (fixed amount or percentage of portfolio).
108
+ - **`stop_losses`** / **`take_profits`**: [`StopLossRule`](https://coding-kitties.github.io/investing-algorithm-framework/Risk%20Rules/stop-loss-rule) / [`TakeProfitRule`](https://coding-kitties.github.io/investing-algorithm-framework/Risk%20Rules/take-profit-rule) with fixed or trailing thresholds and partial-exit `sell_percentage`.
109
+ - **`scaling_rules`**: [`ScalingRule`](https://coding-kitties.github.io/investing-algorithm-framework/Risk%20Rules/scaling-rule) for pyramiding (`scale_in_percentage=[…]`, `max_entries`, per-symbol `cooldown_in_bars`).
110
+ - **`cooldowns`**: [`CooldownRule`](https://coding-kitties.github.io/investing-algorithm-framework/Risk%20Rules/cooldown-rule) to throttle whipsaw — per-symbol or portfolio-wide, side-aware (e.g. `trigger="sell", blocks="buy", bars=12`). Enforced bar-for-bar in both the vector and event-driven engines.
111
+ - **`trading_costs`**: [`TradingCost`](https://coding-kitties.github.io/investing-algorithm-framework/Risk%20Rules/trading-cost) per symbol (fees, slippage, fixed costs).
112
+
113
+ ```python
114
+ from investing_algorithm_framework import (
115
+ TradingStrategy,
116
+ PositionSize,
117
+ ScalingRule,
118
+ StopLossRule,
119
+ TakeProfitRule,
120
+ CooldownRule,
121
+ TradingCost,
122
+ )
123
+
124
+
125
+ class MyStrategy(TradingStrategy):
126
+ symbols = ["BTC", "ETH"]
127
+
128
+ position_sizes = [
129
+ PositionSize(symbol="BTC", percentage_of_portfolio=20),
130
+ PositionSize(symbol="ETH", percentage_of_portfolio=20),
131
+ ]
132
+
133
+ stop_losses = [
134
+ StopLossRule(symbol="BTC", percentage_threshold=5, trailing=True),
135
+ StopLossRule(symbol="ETH", percentage_threshold=5, trailing=True),
136
+ ]
137
+
138
+ take_profits = [
139
+ TakeProfitRule(
140
+ symbol="BTC", percentage_threshold=10, sell_percentage=50,
141
+ ),
142
+ TakeProfitRule(
143
+ symbol="ETH", percentage_threshold=10, sell_percentage=50,
144
+ ),
145
+ ]
146
+
147
+ scaling_rules = [
148
+ ScalingRule(
149
+ symbol="BTC", max_entries=3, scale_in_percentage=[50, 25],
150
+ ),
151
+ ScalingRule(
152
+ symbol="ETH", max_entries=3, scale_in_percentage=[50, 25],
153
+ ),
154
+ ]
155
+
156
+ cooldowns = [
157
+ CooldownRule(symbol="BTC", trigger="sell", blocks="buy", bars=12),
158
+ CooldownRule(trigger="any", blocks="any", bars=2),
159
+ ]
160
+
161
+ trading_costs = [
162
+ TradingCost(symbol="BTC", fee_percentage=0.1),
163
+ TradingCost(symbol="ETH", fee_percentage=0.1),
164
+ ]
165
+
166
+ def generate_buy_signals(self, data):
167
+ ...
168
+
169
+ def generate_sell_signals(self, data):
170
+ ...
171
+ ```
172
+
173
+ → [Strategy docs](https://coding-kitties.github.io/investing-algorithm-framework/Getting%20Started/strategies)
174
+
175
+ </details>
176
+
94
177
  <details open>
95
178
  <summary>
96
179
  <strong>Backtesting Engines</strong>
@@ -141,10 +224,139 @@ Every backtest produces a **self-contained HTML dashboard** — open it in any b
141
224
  - **Built-in MCP server** — let Copilot, Claude, or any MCP-compatible agent query your backtests, rank strategies, and reason over trades through `investing-algorithm-framework mcp`
142
225
  - **Notes keeping** — annotate every backtest with hypotheses, observations and conclusions; notes travel with the report so your research is never lost
143
226
 
227
+ #### From backtest results to a report
228
+
229
+ > 💡 **Want state-of-the-art analytics, publishable reports, ranking across thousands of runs and AI agents that do the analysis for you?** Partner with our analytics integration partners below — they pick up where the local `report.html` leaves off.
230
+
231
+ <p align="center">
232
+ <a href="https://www.finterion.com/" target="_blank">
233
+ <picture>
234
+ <source media="(prefers-color-scheme: dark)" srcset="static/features/finterion-analytics-dark.svg">
235
+ <source media="(prefers-color-scheme: light)" srcset="static/features/finterion-analytics-light.svg">
236
+ <img src="static/features/finterion-analytics-light.svg" alt="Backtest analytics for teams — featuring Finterion" style="max-width: 100%;">
237
+ </picture>
238
+ </a>
239
+ </p>
240
+
241
+ Every backtest API — vector or event-driven — returns the same `Backtest` object, which the `BacktestReport` consumes directly. So whether you're iterating over an in-memory list or a folder of persisted `.iafbt` bundles, the path to the dashboard is the same:
242
+
243
+ ```python
244
+ from investing_algorithm_framework import BacktestReport
245
+
246
+ # --- Single event-driven backtest ---
247
+ backtest = app.run_backtest(backtest_date_range=date_range)
248
+ BacktestReport(backtests=[backtest]).save("event_report.html")
249
+
250
+ # --- A sweep of vector backtests (parameter grid / multi-window) ---
251
+ backtests = app.run_vector_backtests(
252
+ strategies=[StrategyA(), StrategyB(), StrategyC()],
253
+ backtest_date_ranges=[range_2022, range_2023, range_2024],
254
+ n_workers=-1,
255
+ backtest_storage_directory="./my-backtests/", # persists .iafbt bundles
256
+ show_progress=True,
257
+ )
258
+ BacktestReport(backtests=backtests).save("sweep_report.html")
259
+
260
+ # --- Or: load a folder of bundles back later (parallel decode) ---
261
+ report = BacktestReport.open(
262
+ directory_path="./my-backtests/",
263
+ workers=-1,
264
+ show_progress=True,
265
+ )
266
+ report.save("from_disk_report.html")
267
+ ```
268
+
269
+ For sweeps that grow into the thousands, combine this with the [Backtest Storage Layer](examples/storage_layer_demo/README.md) below — rank in SQLite first, then load only the winners into the report:
270
+
271
+ ```python
272
+ from investing_algorithm_framework import BacktestReport
273
+ from investing_algorithm_framework.cli.index_command import (
274
+ build_index, rank_index,
275
+ )
276
+ from investing_algorithm_framework.services.backtest_store import (
277
+ LocalDirStore,
278
+ )
279
+
280
+ # 1. Build (or refresh) the Tier-1 SQLite index over the folder of bundles.
281
+ build_index("./my-backtests/")
282
+
283
+ # 2. Pick the top 25 by Sharpe straight from SQLite — no Parquet decoded.
284
+ top = rank_index(
285
+ "./my-backtests/",
286
+ by="sharpe_ratio",
287
+ where="summary_number_of_trades > 50",
288
+ limit=25,
289
+ )
290
+
291
+ # 3. Materialise only those 25 bundles through the BacktestStore protocol.
292
+ store = LocalDirStore("./my-backtests/")
293
+ winners = [store.open(row["bundle_path"]) for row in top]
294
+
295
+ # 4. Render a focused dashboard with just the winners.
296
+ BacktestReport(backtests=winners).save("top25_by_sharpe.html")
297
+ ```
298
+
144
299
  → [Backtest dashboard docs](https://coding-kitties.github.io/investing-algorithm-framework/Getting%20Started/backtesting) · [MCP server docs](https://coding-kitties.github.io/investing-algorithm-framework/Advanced%20Concepts/mcp-server)
145
300
 
146
301
  </details>
147
302
 
303
+ <details open>
304
+ <summary>
305
+ <strong>Backtest Storage Layer — scale to thousands of backtests</strong>
306
+ </summary> <br>
307
+
308
+ Once you start sweeping parameter grids and walk-forward windows, a flat folder of `.iafbt` bundles stops scaling: every comparison re-decodes multi-MB Parquet metric blobs just to read a Sharpe number. The storage layer fixes that with three tiers behind a single `BacktestStore` protocol:
309
+
310
+ - **Tier-1 — SQLite index (`index.sqlite`)**: one row per bundle with every scalar from `BacktestSummaryMetrics` promoted to its own column. Ranking 10k+ bundles becomes a sub-100 ms SQL query — no `.iafbt` is opened.
311
+ - **Tier-2 — `BacktestStore` adapters**: `LocalDirStore` (flat folder of bundles) or `LocalTieredStore` (hive-partitioned layout). Same handle-based API, swap the implementation without touching call sites.
312
+ - **Tier-3 — content-addressed OHLCV chunks**: SHA-256 deduped per-symbol OHLCV blobs shared across every bundle that references them. `garbage_collect_ohlcv()` reclaims orphans.
313
+
314
+ A CLI ties it all together: `iaf index` builds/refreshes the Tier-1 SQLite, `iaf list` / `iaf rank` query it, and `iaf migrate-store` moves a whole collection between store kinds in one command.
315
+
316
+ #### Typical workflow
317
+
318
+ ```python
319
+ from investing_algorithm_framework import BacktestReport
320
+ from investing_algorithm_framework.cli.index_command import (
321
+ build_index, rank_index,
322
+ )
323
+ from investing_algorithm_framework.services.backtest_store import (
324
+ LocalDirStore,
325
+ )
326
+
327
+ # 1. Build (or refresh) the Tier-1 SQLite index over a folder of .iafbt bundles.
328
+ build_index("./my-backtests/") # equivalent to: iaf index ./my-backtests/
329
+
330
+ # 2. Pick the top 20 by Sharpe straight from SQLite — no Parquet decoded.
331
+ top = rank_index(
332
+ "./my-backtests/",
333
+ by="sharpe_ratio",
334
+ where="summary_number_of_trades > 50",
335
+ limit=20,
336
+ )
337
+
338
+ # 3. Materialise just those 20 bundles through the BacktestStore protocol.
339
+ store = LocalDirStore("./my-backtests/")
340
+ backtests = [store.open(row["bundle_path"]) for row in top]
341
+
342
+ # 4. Feed them straight into the HTML dashboard.
343
+ BacktestReport(backtests=backtests).save("top20.html")
344
+ ```
345
+
346
+ Or from the shell:
347
+
348
+ ```bash
349
+ iaf index ./my-backtests/
350
+ iaf rank ./my-backtests/ --by sharpe_ratio --where "summary_number_of_trades > 50" -n 20
351
+ iaf list ./my-backtests/ --sort calmar_ratio --json
352
+ iaf migrate-store --from local-dir --src ./my-backtests/ \
353
+ --to local-tiered --dst ./tiered/
354
+ ```
355
+
356
+ → End-to-end runnable example: [`examples/storage_layer_demo/`](examples/storage_layer_demo/README.md)
357
+
358
+ </details>
359
+
148
360
  <details open>
149
361
  <summary>
150
362
  <strong>Live Trading</strong>
@@ -225,7 +437,7 @@ from pyindicators import ema, rsi, crossover, crossunder
225
437
 
226
438
  from investing_algorithm_framework import (
227
439
  TradingStrategy, DataSource, TimeUnit, DataType,
228
- PositionSize, ScalingRule, StopLossRule,
440
+ PositionSize, ScalingRule, StopLossRule, CooldownRule,
229
441
  )
230
442
 
231
443
 
@@ -278,6 +490,18 @@ class RSIEMACrossoverStrategy(TradingStrategy):
278
490
  sell_percentage=100, trailing=True,
279
491
  ),
280
492
  ]
493
+ # Signal throttling: after a stop-out / sell, block re-entries on
494
+ # the same symbol for 12 bars, plus a portfolio-wide breather of
495
+ # 2 bars after any order to avoid same-bar pile-ups.
496
+ cooldowns = [
497
+ CooldownRule(
498
+ symbol="BTC", trigger="sell", blocks="buy", bars=12,
499
+ ),
500
+ CooldownRule(
501
+ symbol="ETH", trigger="sell", blocks="buy", bars=12,
502
+ ),
503
+ CooldownRule(trigger="any", blocks="any", bars=2),
504
+ ]
281
505
 
282
506
  def generate_buy_signals(
283
507
  self, data: Dict[str, Any]