investing-algorithm-framework 6.9.1__tar.gz → 7.19.18__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.

Potentially problematic release.


This version of investing-algorithm-framework might be problematic. Click here for more details.

Files changed (322) hide show
  1. investing_algorithm_framework-7.19.18/PKG-INFO +534 -0
  2. investing_algorithm_framework-7.19.18/README.md +497 -0
  3. investing_algorithm_framework-7.19.18/investing_algorithm_framework/__init__.py +199 -0
  4. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/__init__.py +47 -0
  5. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/algorithm/algorithm.py +5 -41
  6. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/algorithm/algorithm_factory.py +17 -10
  7. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/analysis/__init__.py +15 -0
  8. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/analysis/backtest_data_ranges.py +121 -0
  9. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/analysis/backtest_utils.py +107 -0
  10. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/analysis/permutation.py +116 -0
  11. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/analysis/ranking.py +297 -0
  12. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/app.py +2214 -0
  13. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/context.py +196 -88
  14. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/eventloop.py +590 -0
  15. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/reporting/__init__.py +27 -0
  16. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/reporting/ascii.py +57 -202
  17. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/reporting/backtest_report.py +349 -0
  18. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/reporting/charts/__init__.py +19 -0
  19. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/reporting/charts/entry_exist_signals.py +66 -0
  20. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/reporting/charts/equity_curve.py +37 -0
  21. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/reporting/charts/equity_curve_drawdown.py +11 -26
  22. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/reporting/charts/line_chart.py +11 -0
  23. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/reporting/charts/ohlcv_data_completeness.py +51 -0
  24. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/reporting/charts/rolling_sharp_ratio.py +1 -1
  25. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/reporting/generate.py +185 -0
  26. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/reporting/tables/key_metrics_table.py +40 -32
  27. investing_algorithm_framework-7.19.18/investing_algorithm_framework/app/reporting/tables/time_metrics_table.py +80 -0
  28. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/reporting/tables/trade_metrics_table.py +23 -19
  29. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/reporting/tables/trades_table.py +1 -1
  30. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/reporting/tables/utils.py +1 -0
  31. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/reporting/templates/report_template.html.j2 +10 -16
  32. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/strategy.py +323 -175
  33. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/task.py +5 -3
  34. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/cli.py +30 -12
  35. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/deploy_to_aws_lambda.py +131 -34
  36. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/initialize_app.py +20 -1
  37. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/app_aws_lambda_function.py.template +18 -6
  38. investing_algorithm_framework-7.19.18/investing_algorithm_framework/cli/templates/aws_lambda_dockerfile.template +22 -0
  39. investing_algorithm_framework-7.19.18/investing_algorithm_framework/cli/templates/aws_lambda_dockerignore.template +92 -0
  40. investing_algorithm_framework-7.19.18/investing_algorithm_framework/cli/templates/aws_lambda_requirements.txt.template +2 -0
  41. investing_algorithm_framework-7.19.18/investing_algorithm_framework/cli/templates/azure_function_requirements.txt.template +3 -0
  42. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/create_app.py +3 -5
  43. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/dependency_container.py +25 -39
  44. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/__init__.py +45 -38
  45. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/backtesting/__init__.py +21 -0
  46. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/backtesting/backtest.py +503 -0
  47. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/backtesting/backtest_date_range.py +96 -0
  48. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/backtesting/backtest_evaluation_focuss.py +242 -0
  49. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/backtesting/backtest_metrics.py +459 -0
  50. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/backtesting/backtest_permutation_test.py +275 -0
  51. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/backtesting/backtest_run.py +605 -0
  52. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/backtesting/backtest_summary_metrics.py +162 -0
  53. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/backtesting/combine_backtests.py +280 -0
  54. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/config.py +27 -0
  55. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/constants.py +6 -34
  56. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/data_provider.py +334 -0
  57. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/exceptions.py +34 -1
  58. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/__init__.py +10 -19
  59. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/base_model.py +0 -6
  60. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/models/data/__init__.py +7 -0
  61. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/models/data/data_source.py +214 -0
  62. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/models/market_data_type.py → investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/models/data/data_type.py +7 -7
  63. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/market/market_credential.py +6 -0
  64. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/order/order.py +34 -13
  65. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/order/order_status.py +1 -1
  66. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/order/order_type.py +1 -1
  67. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/portfolio/portfolio.py +14 -1
  68. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/portfolio/portfolio_configuration.py +5 -1
  69. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/portfolio/portfolio_snapshot.py +51 -11
  70. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/models/position/__init__.py +5 -0
  71. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/position/position.py +9 -0
  72. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/models/position/position_size.py +41 -0
  73. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/models/risk_rules/__init__.py +7 -0
  74. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/models/risk_rules/stop_loss_rule.py +51 -0
  75. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/models/risk_rules/take_profit_rule.py +55 -0
  76. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/snapshot_interval.py +0 -1
  77. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/models/strategy_profile.py +33 -0
  78. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/time_frame.py +7 -0
  79. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/time_interval.py +33 -0
  80. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/time_unit.py +63 -1
  81. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/trade/__init__.py +0 -2
  82. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/trade/trade.py +56 -32
  83. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/trade/trade_status.py +8 -2
  84. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/trade/trade_stop_loss.py +106 -41
  85. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/models/trade/trade_take_profit.py +365 -0
  86. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/order_executor.py +19 -0
  87. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/portfolio_provider.py +20 -1
  88. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/services/__init__.py +11 -0
  89. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/strategy.py +44 -0
  90. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/utils/__init__.py +5 -1
  91. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/utils/custom_tqdm.py +22 -0
  92. investing_algorithm_framework-7.19.18/investing_algorithm_framework/domain/utils/jupyter_notebook_detection.py +19 -0
  93. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/utils/polars.py +17 -14
  94. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/download_data.py +40 -10
  95. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/__init__.py +13 -25
  96. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/data_providers/__init__.py +7 -4
  97. investing_algorithm_framework-7.19.18/investing_algorithm_framework/infrastructure/data_providers/ccxt.py +1143 -0
  98. investing_algorithm_framework-7.19.18/investing_algorithm_framework/infrastructure/data_providers/csv.py +568 -0
  99. investing_algorithm_framework-7.19.18/investing_algorithm_framework/infrastructure/data_providers/pandas.py +599 -0
  100. investing_algorithm_framework-7.19.18/investing_algorithm_framework/infrastructure/database/__init__.py +10 -0
  101. investing_algorithm_framework-7.19.18/investing_algorithm_framework/infrastructure/database/sql_alchemy.py +127 -0
  102. investing_algorithm_framework-7.19.18/investing_algorithm_framework/infrastructure/models/__init__.py +16 -0
  103. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/models/order/order.py +9 -3
  104. investing_algorithm_framework-7.19.18/investing_algorithm_framework/infrastructure/models/trades/trade_stop_loss.py +59 -0
  105. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/models/trades/trade_take_profit.py +21 -7
  106. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/order_executors/__init__.py +2 -0
  107. investing_algorithm_framework-7.19.18/investing_algorithm_framework/infrastructure/order_executors/backtest_oder_executor.py +28 -0
  108. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/repositories/repository.py +16 -2
  109. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/repositories/trade_repository.py +2 -2
  110. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/repositories/trade_stop_loss_repository.py +6 -0
  111. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/repositories/trade_take_profit_repository.py +6 -0
  112. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/services/__init__.py +0 -4
  113. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/services/aws/state_handler.py +32 -1
  114. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/__init__.py +135 -0
  115. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/backtesting/backtest_service.py +651 -0
  116. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/configuration_service.py +14 -4
  117. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/data_providers/__init__.py +5 -0
  118. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/data_providers/data_provider_service.py +850 -0
  119. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/__init__.py +48 -17
  120. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/drawdown.py +10 -10
  121. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/equity_curve.py +2 -2
  122. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/exposure.py +60 -2
  123. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/metrics/generate.py +358 -0
  124. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/profit_factor.py +36 -0
  125. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/recovery.py +2 -2
  126. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/returns.py +146 -147
  127. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/metrics/risk_free_rate.py +28 -0
  128. investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting/metrics/sharp_ratio.py → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/metrics/sharpe_ratio.py +6 -10
  129. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/sortino_ratio.py +3 -7
  130. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/metrics/trades.py +500 -0
  131. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/metrics/volatility.py +97 -0
  132. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/win_rate.py +70 -3
  133. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/order_service/order_backtest_service.py +21 -31
  134. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/order_service/order_service.py +9 -71
  135. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/portfolios/portfolio_provider_lookup.py +0 -2
  136. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/portfolios/portfolio_service.py +3 -13
  137. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/portfolios/portfolio_snapshot_service.py +136 -0
  138. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/portfolios/portfolio_sync_service.py +0 -3
  139. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/repository_service.py +5 -2
  140. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/trade_order_evaluator/__init__.py +9 -0
  141. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/trade_order_evaluator/backtest_trade_oder_evaluator.py +113 -0
  142. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/trade_order_evaluator/default_trade_order_evaluator.py +51 -0
  143. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/trade_order_evaluator/trade_order_evaluator.py +80 -0
  144. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/trade_service/__init__.py +9 -0
  145. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/trade_service/trade_service.py +51 -29
  146. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/trade_service/trade_stop_loss_service.py +39 -0
  147. investing_algorithm_framework-7.19.18/investing_algorithm_framework/services/trade_service/trade_take_profit_service.py +41 -0
  148. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/pyproject.toml +2 -2
  149. investing_algorithm_framework-6.9.1/PKG-INFO +0 -440
  150. investing_algorithm_framework-6.9.1/README.md +0 -403
  151. investing_algorithm_framework-6.9.1/investing_algorithm_framework/__init__.py +0 -96
  152. investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/__init__.py +0 -30
  153. investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/app.py +0 -1599
  154. investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting/__init__.py +0 -16
  155. investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting/backtest_report.py +0 -235
  156. investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting/charts/__init__.py +0 -11
  157. investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting/evaluation.py +0 -243
  158. investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting/generate.py +0 -199
  159. investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting/metrics/risk_free_rate.py +0 -8
  160. investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting/metrics/volatility.py +0 -69
  161. investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting/tables/time_metrics_table.py +0 -73
  162. investing_algorithm_framework-6.9.1/investing_algorithm_framework/cli/templates/aws_lambda_requirements.txt.template +0 -2
  163. investing_algorithm_framework-6.9.1/investing_algorithm_framework/cli/templates/azure_function_requirements.txt.template +0 -3
  164. investing_algorithm_framework-6.9.1/investing_algorithm_framework/cli/templates/requirements_azure_function.txt.template +0 -3
  165. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/data_provider.py +0 -190
  166. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/models/backtesting/__init__.py +0 -9
  167. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/models/backtesting/backtest_date_range.py +0 -47
  168. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/models/backtesting/backtest_position.py +0 -120
  169. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/models/backtesting/backtest_reports_evaluation.py +0 -0
  170. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/models/backtesting/backtest_results.py +0 -440
  171. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/models/data_source.py +0 -21
  172. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/models/date_range.py +0 -64
  173. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/models/position/__init__.py +0 -4
  174. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/models/strategy_profile.py +0 -165
  175. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/models/trade/trade_risk_type.py +0 -34
  176. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/models/trade/trade_take_profit.py +0 -303
  177. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/models/trading_data_types.py +0 -48
  178. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/models/trading_time_frame.py +0 -223
  179. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/services/__init__.py +0 -24
  180. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/services/market_data_sources.py +0 -543
  181. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/services/market_service.py +0 -153
  182. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/services/observable.py +0 -51
  183. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/services/observer.py +0 -19
  184. investing_algorithm_framework-6.9.1/investing_algorithm_framework/domain/strategy.py +0 -72
  185. investing_algorithm_framework-6.9.1/investing_algorithm_framework/infrastructure/data_providers/ccxt.py +0 -878
  186. investing_algorithm_framework-6.9.1/investing_algorithm_framework/infrastructure/data_providers/csv.py +0 -257
  187. investing_algorithm_framework-6.9.1/investing_algorithm_framework/infrastructure/database/__init__.py +0 -6
  188. investing_algorithm_framework-6.9.1/investing_algorithm_framework/infrastructure/database/sql_alchemy.py +0 -46
  189. investing_algorithm_framework-6.9.1/investing_algorithm_framework/infrastructure/models/__init__.py +0 -29
  190. investing_algorithm_framework-6.9.1/investing_algorithm_framework/infrastructure/models/market_data_sources/__init__.py +0 -16
  191. investing_algorithm_framework-6.9.1/investing_algorithm_framework/infrastructure/models/market_data_sources/ccxt.py +0 -746
  192. investing_algorithm_framework-6.9.1/investing_algorithm_framework/infrastructure/models/market_data_sources/csv.py +0 -270
  193. investing_algorithm_framework-6.9.1/investing_algorithm_framework/infrastructure/models/market_data_sources/pandas.py +0 -312
  194. investing_algorithm_framework-6.9.1/investing_algorithm_framework/infrastructure/models/trades/trade_stop_loss.py +0 -40
  195. investing_algorithm_framework-6.9.1/investing_algorithm_framework/infrastructure/services/market_service/__init__.py +0 -5
  196. investing_algorithm_framework-6.9.1/investing_algorithm_framework/infrastructure/services/market_service/ccxt_market_service.py +0 -471
  197. investing_algorithm_framework-6.9.1/investing_algorithm_framework/infrastructure/services/performance_service/__init__.py +0 -7
  198. investing_algorithm_framework-6.9.1/investing_algorithm_framework/infrastructure/services/performance_service/backtest_performance_service.py +0 -2
  199. investing_algorithm_framework-6.9.1/investing_algorithm_framework/infrastructure/services/performance_service/performance_service.py +0 -322
  200. investing_algorithm_framework-6.9.1/investing_algorithm_framework/services/__init__.py +0 -38
  201. investing_algorithm_framework-6.9.1/investing_algorithm_framework/services/backtesting/backtest_service.py +0 -591
  202. investing_algorithm_framework-6.9.1/investing_algorithm_framework/services/market_data_source_service/__init__.py +0 -10
  203. investing_algorithm_framework-6.9.1/investing_algorithm_framework/services/market_data_source_service/backtest_market_data_source_service.py +0 -269
  204. investing_algorithm_framework-6.9.1/investing_algorithm_framework/services/market_data_source_service/data_provider_service.py +0 -350
  205. investing_algorithm_framework-6.9.1/investing_algorithm_framework/services/market_data_source_service/market_data_source_service.py +0 -377
  206. investing_algorithm_framework-6.9.1/investing_algorithm_framework/services/portfolios/portfolio_snapshot_service.py +0 -170
  207. investing_algorithm_framework-6.9.1/investing_algorithm_framework/services/strategy_orchestrator_service.py +0 -296
  208. investing_algorithm_framework-6.9.1/investing_algorithm_framework/services/trade_service/__init__.py +0 -3
  209. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/LICENSE +0 -0
  210. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/algorithm/__init__.py +0 -0
  211. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/app_hook.py +0 -0
  212. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/reporting/charts/monthly_returns_heatmap.py +0 -0
  213. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/reporting/charts/yearly_returns_barchart.py +0 -0
  214. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/reporting/tables/__init__.py +0 -0
  215. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/reporting/tables/stop_loss_table.py +0 -0
  216. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/stateless/__init__.py +0 -0
  217. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/stateless/action_handlers/__init__.py +0 -0
  218. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/stateless/action_handlers/action_handler_strategy.py +0 -0
  219. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/stateless/action_handlers/check_online_handler.py +0 -0
  220. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/stateless/action_handlers/run_strategy_handler.py +0 -0
  221. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/stateless/exception_handler.py +0 -0
  222. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/web/__init__.py +0 -0
  223. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/web/controllers/__init__.py +0 -0
  224. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/web/controllers/orders.py +0 -0
  225. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/web/controllers/portfolio.py +0 -0
  226. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/web/controllers/positions.py +0 -0
  227. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/web/create_app.py +0 -0
  228. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/web/error_handler.py +0 -0
  229. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/web/responses.py +0 -0
  230. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/web/run_strategies.py +0 -0
  231. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/web/schemas/__init__.py +0 -0
  232. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/web/schemas/order.py +0 -0
  233. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/web/schemas/portfolio.py +0 -0
  234. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/web/schemas/position.py +0 -0
  235. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/app/web/setup_cors.py +0 -0
  236. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/__init__.py +0 -0
  237. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/deploy_to_azure_function.py +0 -0
  238. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/.gitignore.template +0 -0
  239. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/app.py.template +0 -0
  240. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/app_azure_function.py.template +0 -0
  241. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/app_web.py.template +0 -0
  242. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/aws_lambda_readme.md.template +0 -0
  243. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/azure_function_function_app.py.template +0 -0
  244. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/azure_function_host.json.template +0 -0
  245. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/azure_function_local.settings.json.template +0 -0
  246. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/data_providers.py.template +0 -0
  247. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/env.example.template +0 -0
  248. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/env_azure_function.example.template +0 -0
  249. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/market_data_providers.py.template +0 -0
  250. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/readme.md.template +0 -0
  251. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/requirements.txt.template +0 -0
  252. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/run_backtest.py.template +0 -0
  253. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/cli/templates/strategy.py.template +0 -0
  254. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/data_structures.py +0 -0
  255. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/decimal_parsing.py +0 -0
  256. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/app_mode.py +0 -0
  257. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/event.py +0 -0
  258. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/market/__init__.py +0 -0
  259. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/order/__init__.py +0 -0
  260. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/order/order_side.py +0 -0
  261. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/portfolio/__init__.py +0 -0
  262. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/position/position_snapshot.py +0 -0
  263. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/tracing/__init__.py +0 -0
  264. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/models/tracing/trace.py +0 -0
  265. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/services/market_credential_service.py +0 -0
  266. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/services/portfolios/__init__.py +0 -0
  267. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/services/portfolios/portfolio_sync_service.py +0 -0
  268. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/services/rounding_service.py +0 -0
  269. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/services/state_handler.py +0 -0
  270. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/stateless_actions.py +0 -0
  271. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/utils/csv.py +0 -0
  272. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/utils/dates.py +0 -0
  273. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/utils/random.py +0 -0
  274. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/utils/signatures.py +0 -0
  275. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/utils/stoppable_thread.py +0 -0
  276. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/domain/utils/synchronized.py +0 -0
  277. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/models/decimal_parser.py +0 -0
  278. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/models/model_extension.py +0 -0
  279. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/models/order/__init__.py +0 -0
  280. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/models/order/order_metadata.py +0 -0
  281. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/models/order_trade_association.py +0 -0
  282. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/models/portfolio/__init__.py +0 -0
  283. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/models/portfolio/portfolio_snapshot.py +0 -0
  284. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/models/portfolio/sql_portfolio.py +0 -0
  285. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/models/position/__init__.py +0 -0
  286. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/models/position/position.py +0 -0
  287. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/models/position/position_snapshot.py +0 -0
  288. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/models/trades/__init__.py +0 -0
  289. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/models/trades/trade.py +0 -0
  290. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/order_executors/ccxt_order_executor.py +0 -0
  291. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/portfolio_providers/__init__.py +0 -0
  292. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/portfolio_providers/ccxt_portfolio_provider.py +0 -0
  293. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/repositories/__init__.py +0 -0
  294. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/repositories/order_metadata_repository.py +0 -0
  295. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/repositories/order_repository.py +0 -0
  296. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/repositories/portfolio_repository.py +0 -0
  297. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/repositories/portfolio_snapshot_repository.py +0 -0
  298. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/repositories/position_repository.py +0 -0
  299. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/repositories/position_snapshot_repository.py +0 -0
  300. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/services/aws/__init__.py +0 -0
  301. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/services/azure/__init__.py +0 -0
  302. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/infrastructure/services/azure/state_handler.py +0 -0
  303. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/backtesting/__init__.py +0 -0
  304. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/market_credential_service.py +0 -0
  305. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/alpha.py +0 -0
  306. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/beta.py +0 -0
  307. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/cagr.py +0 -0
  308. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/calmar_ratio.py +0 -0
  309. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/mean_daily_return.py +0 -0
  310. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/price_efficiency.py +0 -0
  311. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/standard_deviation.py +0 -0
  312. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/treynor_ratio.py +0 -0
  313. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/ulcer.py +0 -0
  314. {investing_algorithm_framework-6.9.1/investing_algorithm_framework/app/reporting → investing_algorithm_framework-7.19.18/investing_algorithm_framework/services}/metrics/value_at_risk.py +0 -0
  315. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/order_service/__init__.py +0 -0
  316. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/order_service/order_executor_lookup.py +0 -0
  317. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/portfolios/__init__.py +0 -0
  318. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/portfolios/backtest_portfolio_service.py +0 -0
  319. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/portfolios/portfolio_configuration_service.py +0 -0
  320. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/positions/__init__.py +0 -0
  321. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/positions/position_service.py +0 -0
  322. {investing_algorithm_framework-6.9.1 → investing_algorithm_framework-7.19.18}/investing_algorithm_framework/services/positions/position_snapshot_service.py +0 -0
@@ -0,0 +1,534 @@
1
+ Metadata-Version: 2.1
2
+ Name: investing-algorithm-framework
3
+ Version: 7.19.18
4
+ Summary: A framework for creating trading bots
5
+ Author: MDUYN
6
+ Requires-Python: >=3.10
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.10
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Requires-Dist: Flask (>=3.1.0)
12
+ Requires-Dist: Flask-Cors (>=3.0.9,<5.0.0)
13
+ Requires-Dist: Flask-Migrate (>=2.6.0)
14
+ Requires-Dist: SQLAlchemy (>=2.0.18)
15
+ Requires-Dist: azure-identity (>=1.19.0,<2.0.0)
16
+ Requires-Dist: azure-mgmt-resource (>=23.2.0,<24.0.0)
17
+ Requires-Dist: azure-mgmt-storage (>=21.2.1,<22.0.0)
18
+ Requires-Dist: azure-mgmt-web (>=7.3.1,<8.0.0)
19
+ Requires-Dist: azure-storage-blob (>=12.24.0,<13.0.0)
20
+ Requires-Dist: boto3 (>=1.38.41,<2.0.0)
21
+ Requires-Dist: ccxt (>=4.2.48)
22
+ Requires-Dist: dependency-injector (>=4.40.0)
23
+ Requires-Dist: jupyter (>=1.0.0)
24
+ Requires-Dist: marshmallow (>=3.5.0)
25
+ Requires-Dist: plotly (>=6.1.2,<7.0.0)
26
+ Requires-Dist: polars[numpy,pandas] (>=0.20.10)
27
+ Requires-Dist: pyarrow (>=19.0.1)
28
+ Requires-Dist: python-dateutil (>=2.8.2)
29
+ Requires-Dist: python-dotenv (>=1.0.1,<2.0.0)
30
+ Requires-Dist: schedule (>=1.1.0)
31
+ Requires-Dist: tabulate (>=0.9.0)
32
+ Requires-Dist: tqdm (>=4.66.1)
33
+ Requires-Dist: wrapt (>=1.16.0)
34
+ Requires-Dist: yfinance (>=0.2.61,<0.3.0)
35
+ Description-Content-Type: text/markdown
36
+
37
+ <div align="center">
38
+ <h1>⚡ Investing Algorithm Framework</h1>
39
+
40
+ <p style="font-size: 18px; font-weight: 600; margin: 15px 0;">
41
+ 🚀 <b>Build. Backtest. Deploy.</b> Quantitative Trading Strategies at Scale
42
+ </p>
43
+
44
+ <p style="font-size: 14px; color: #666; margin-bottom: 25px;">
45
+ The fastest way to go from trading idea to production-ready trading bot
46
+ </p>
47
+
48
+ <!-- Quick Links -->
49
+ <div style="margin: 20px 0;">
50
+ <a target="_blank" href="https://coding-kitties.github.io/investing-algorithm-framework/">
51
+ <img src="https://img.shields.io/badge/📖_Documentation-blue?style=for-the-badge">
52
+ </a>
53
+ &nbsp;
54
+ <a href="https://coding-kitties.github.io/investing-algorithm-framework/Getting%20Started/installation">
55
+ <img src="https://img.shields.io/badge/🚀_Quick_Start-green?style=for-the-badge">
56
+ </a>
57
+ </div>
58
+
59
+ <!-- Badges -->
60
+ <div style="margin-bottom: 20px;">
61
+ <a target="_blank" href="https://discord.gg/dQsRmGZP"><img src="https://img.shields.io/discord/1345358169777635410.svg?color=7289da&label=Discord&logo=discord&style=flat-square" alt="Discord"></a>
62
+ &nbsp;
63
+ <a href="https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/test.yml"><img src="https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/test.yml/badge.svg?style=flat-square" alt="Tests"></a>
64
+ &nbsp;
65
+ <a href="https://pypi.org/project/investing-algorithm-framework/"><img src="https://img.shields.io/pypi/v/investing-algorithm-framework.svg?style=flat-square" alt="PyPI"></a>
66
+ &nbsp;
67
+ <a href="https://pepy.tech/project/investing-algorithm-framework"><img src="https://pepy.tech/badge/investing-algorithm-framework/month?style=flat-square" alt="Downloads"></a>
68
+ &nbsp;
69
+ <a href="https://github.com/coding-kitties/investing-algorithm-framework/stargazers"><img src="https://img.shields.io/github/stars/coding-kitties/investing-algorithm-framework?style=flat-square" alt="Stars"></a>
70
+ </div>
71
+
72
+ <img src="static/showcase.svg" alt="Investing Algorithm Framework" style="height: 400px; max-width: 100%; margin: 30px 0;">
73
+
74
+ <hr style="margin: 30px 0; border: none; border-top: 2px solid #ddd;">
75
+
76
+ > ⭐ **If you like this project, please consider [starring](https://github.com/coding-kitties/investing-algorithm-framework) it!** Your support helps us build better tools for the community.
77
+
78
+ </div>
79
+
80
+ ---
81
+
82
+ ## 💡 Why Investing Algorithm Framework?
83
+
84
+ Stop wasting time on boilerplate. The **Investing Algorithm Framework** handles all the heavy lifting:
85
+
86
+ ✨ **From Idea to Production** — Write your strategy once, deploy everywhere
87
+ 📊 **Accurate Backtesting** — Event-driven and vectorized engines for realistic results
88
+ ⚡ **Lightning Fast** — Optimized for speed and efficiency
89
+ 🔧 **Extensible** — Connect any exchange, broker, or data source
90
+ 📈 **Production Ready** — Built for real money trading
91
+
92
+ ## Sponsors
93
+
94
+ <a href="https://www.finterion.com/" target="_blank">
95
+ <picture style="height: 30px;">
96
+ <source media="(prefers-color-scheme: dark)" srcset="static/sponsors/finterion-dark.png">
97
+ <source media="(prefers-color-scheme: light)" srcset="static/sponsors/finterion-light.png">
98
+ <img src="static/sponsors/finterion-light.png" alt="Finterion Logo" width="200px" height="50px">
99
+ </picture>
100
+ </a>
101
+
102
+
103
+ ## 🔌 Plugins & Integrations
104
+
105
+ Extend your trading bot with powerful plugins:
106
+
107
+ | Plugin | Description |
108
+ |--------|-----------------------------------------------------------------------------|
109
+ | 🎯 **[PyIndicators](https://github.com/coding-kitties/PyIndicators)** | Technical analysis indicators for strategy development |
110
+ | 🏪 **[Finterion Plugin](https://github.com/Finterion/finterion-investing-algorithm-framework-plugin)** | Monetize & share your strategies with the public on Finterion's marketplace |
111
+
112
+ ## 🌟 Powerful Features
113
+
114
+ | Feature | Description |
115
+ |---------|-------------|
116
+ | 🐍 **Python 3.10+** | Cross-platform support for Windows, macOS, and Linux |
117
+ | ⚙️ **Event-Driven Backtest** | Accurate, realistic backtesting with event-driven architecture |
118
+ | ⚡ **Vectorized Backtest** | Lightning-fast signal research and prototyping |
119
+ | 📊 **Advanced Metrics** | CAGR, Sharpe ratio, max drawdown, win rate, and 50+ more metrics |
120
+ | 📈 **Backtest Reports** | Generate detailed, comparison-ready reports |
121
+ | 🎯 **Statistical Testing** | Permutation testing for strategy significance evaluation |
122
+ | 💱 **Live Trading** | Real-time execution across multiple exchanges (via CCXT) |
123
+ | 💼 **Portfolio Management** | Full position and trade management with persistence |
124
+ | 📉 **Market Data** | OHLCV, tickers, custom data — Polars & Pandas native |
125
+ | 🔗 **Data Integrations** | PyIndicators, multiple data sources, custom providers |
126
+ | ☁️ **Cloud Deployment** | Azure Functions, AWS Lambda, and more |
127
+ | 🌐 **Web API** | REST API for bot interaction and monitoring |
128
+ | 🧩 **Fully Extensible** | Custom strategies, data providers, order executors |
129
+ | 🏗️ **Modular Design** | Build with reusable, composable components |
130
+
131
+
132
+
133
+ ## 🚀 Quickstart
134
+
135
+ ### 📦 Installation
136
+
137
+ Install the framework via [PyPI](https://pypi.org/project/investing-algorithm-framework/):
138
+
139
+ ```bash
140
+ pip install investing-algorithm-framework
141
+ ```
142
+
143
+ ### 🎯 Initialize Your Project
144
+
145
+ Run the following command to scaffold a new trading bot:
146
+
147
+ ```bash
148
+ investing-algorithm-framework init
149
+ ```
150
+
151
+ For an AWS Lambda-ready project:
152
+
153
+ ```bash
154
+ investing-algorithm-framework init --type aws_lambda
155
+ ```
156
+
157
+ This creates:
158
+ - **app.py** — Your bot's entry point (keep as-is)
159
+ - **strategy.py** — Your trading strategy (customize this!)
160
+
161
+ > 💡 **Tip:** You can also create `default_web` or `azure_function` projects
162
+
163
+ ## 📈 Example: A Simple Trading Bot
164
+ The following example trading bot implements a simple moving average strategy.
165
+ The strategy will use data from bitvavo exchange and will calculate
166
+ the 20, 50 and 100 period exponential moving averages (EMA) and the
167
+ 14 period relative strength index (RSI).
168
+
169
+ > This example uses [PyIndicators](https://github.com/coding-kitties/pyindicators) for technical analysis.
170
+ > This dependency is not part of the framework, but is used to perform technical analysis on the dataframes.
171
+ > You can install it using pip: pip install pyindicators.
172
+
173
+ ```python
174
+ from typing import Dict, Any
175
+ from datetime import datetime, timezone
176
+
177
+ import pandas as pd
178
+ from pyindicators import ema, rsi, crossover, crossunder
179
+
180
+ from investing_algorithm_framework import TradingStrategy, DataSource, \
181
+ TimeUnit, DataType, PositionSize, create_app, RESOURCE_DIRECTORY, \
182
+ BacktestDateRange, BacktestReport, TakeProfitRule, StopLossRule
183
+
184
+
185
+ class RSIEMACrossoverStrategy(TradingStrategy):
186
+ time_unit = TimeUnit.HOUR
187
+ interval = 2
188
+ symbols = ["BTC"]
189
+ position_sizes = [
190
+ PositionSize(
191
+ symbol="BTC", percentage_of_portfolio=20.0
192
+ ),
193
+ PositionSize(
194
+ symbol="ETH", percentage_of_portfolio=20.0
195
+ )
196
+ ]
197
+ take_profits = [
198
+ TakeProfitRule(
199
+ symbol="BTC",
200
+ percentage_threshold=10,
201
+ trailing=True,
202
+ sell_percentage=100
203
+ ),
204
+ TakeProfitRule(
205
+ symbol="ETH",
206
+ percentage_threshold=10,
207
+ trailing=True,
208
+ sell_percentage=100
209
+ )
210
+ ]
211
+ stop_losses = [
212
+ StopLossRule(
213
+ symbol="BTC",
214
+ percentage_threshold=5,
215
+ trailing=False,
216
+ sell_percentage=100
217
+ ),
218
+ StopLossRule(
219
+ symbol="ETH",
220
+ percentage_threshold=5,
221
+ trailing=False,
222
+ sell_percentage=100
223
+ )
224
+ ]
225
+
226
+ def __init__(
227
+ self,
228
+ time_unit: TimeUnit,
229
+ interval: int,
230
+ market: str,
231
+ rsi_time_frame: str,
232
+ rsi_period: int,
233
+ rsi_overbought_threshold,
234
+ rsi_oversold_threshold,
235
+ ema_time_frame,
236
+ ema_short_period,
237
+ ema_long_period,
238
+ ema_cross_lookback_window: int = 10
239
+ ):
240
+ self.rsi_time_frame = rsi_time_frame
241
+ self.rsi_period = rsi_period
242
+ self.rsi_result_column = f"rsi_{self.rsi_period}"
243
+ self.rsi_overbought_threshold = rsi_overbought_threshold
244
+ self.rsi_oversold_threshold = rsi_oversold_threshold
245
+ self.ema_time_frame = ema_time_frame
246
+ self.ema_short_result_column = f"ema_{ema_short_period}"
247
+ self.ema_long_result_column = f"ema_{ema_long_period}"
248
+ self.ema_crossunder_result_column = "ema_crossunder"
249
+ self.ema_crossover_result_column = "ema_crossover"
250
+ self.ema_short_period = ema_short_period
251
+ self.ema_long_period = ema_long_period
252
+ self.ema_cross_lookback_window = ema_cross_lookback_window
253
+ data_sources = []
254
+
255
+ for symbol in self.symbols:
256
+ full_symbol = f"{symbol}/EUR"
257
+ data_sources.append(
258
+ DataSource(
259
+ identifier=f"{symbol}_rsi_data",
260
+ data_type=DataType.OHLCV,
261
+ time_frame=self.rsi_time_frame,
262
+ market=market,
263
+ symbol=full_symbol,
264
+ pandas=True,
265
+ window_size=800
266
+ )
267
+ )
268
+ data_sources.append(
269
+ DataSource(
270
+ identifier=f"{symbol}_ema_data",
271
+ data_type=DataType.OHLCV,
272
+ time_frame=self.ema_time_frame,
273
+ market=market,
274
+ symbol=full_symbol,
275
+ pandas=True,
276
+ window_size=800
277
+ )
278
+ )
279
+
280
+ super().__init__(
281
+ data_sources=data_sources, time_unit=time_unit, interval=interval
282
+ )
283
+
284
+ def _prepare_indicators(
285
+ self,
286
+ rsi_data,
287
+ ema_data
288
+ ):
289
+ """
290
+ Helper function to prepare the indicators
291
+ for the strategy. The indicators are calculated
292
+ using the pyindicators library: https://github.com/coding-kitties/PyIndicators
293
+ """
294
+ ema_data = ema(
295
+ ema_data,
296
+ period=self.ema_short_period,
297
+ source_column="Close",
298
+ result_column=self.ema_short_result_column
299
+ )
300
+ ema_data = ema(
301
+ ema_data,
302
+ period=self.ema_long_period,
303
+ source_column="Close",
304
+ result_column=self.ema_long_result_column
305
+ )
306
+ # Detect crossover (short EMA crosses above long EMA)
307
+ ema_data = crossover(
308
+ ema_data,
309
+ first_column=self.ema_short_result_column,
310
+ second_column=self.ema_long_result_column,
311
+ result_column=self.ema_crossover_result_column
312
+ )
313
+ # Detect crossunder (short EMA crosses below long EMA)
314
+ ema_data = crossunder(
315
+ ema_data,
316
+ first_column=self.ema_short_result_column,
317
+ second_column=self.ema_long_result_column,
318
+ result_column=self.ema_crossunder_result_column
319
+ )
320
+ rsi_data = rsi(
321
+ rsi_data,
322
+ period=self.rsi_period,
323
+ source_column="Close",
324
+ result_column=self.rsi_result_column
325
+ )
326
+
327
+ return ema_data, rsi_data
328
+
329
+ def generate_buy_signals(self, data: Dict[str, Any]) -> Dict[str, pd.Series]:
330
+ """
331
+ Generate buy signals based on the moving average crossover.
332
+
333
+ data (Dict[str, Any]): Dictionary containing all the data for
334
+ the strategy data sources.
335
+
336
+ Returns:
337
+ Dict[str, pd.Series]: A dictionary where keys are symbols and values
338
+ are pandas Series indicating buy signals (True/False).
339
+ """
340
+
341
+ signals = {}
342
+
343
+ for symbol in self.symbols:
344
+ ema_data_identifier = f"{symbol}_ema_data"
345
+ rsi_data_identifier = f"{symbol}_rsi_data"
346
+ ema_data, rsi_data = self._prepare_indicators(
347
+ data[ema_data_identifier].copy(),
348
+ data[rsi_data_identifier].copy()
349
+ )
350
+
351
+ # crossover confirmed
352
+ ema_crossover_lookback = ema_data[
353
+ self.ema_crossover_result_column].rolling(
354
+ window=self.ema_cross_lookback_window
355
+ ).max().astype(bool)
356
+
357
+ # use only RSI column
358
+ rsi_oversold = rsi_data[self.rsi_result_column] \
359
+ < self.rsi_oversold_threshold
360
+
361
+ buy_signal = rsi_oversold & ema_crossover_lookback
362
+ buy_signals = buy_signal.fillna(False).astype(bool)
363
+ signals[symbol] = buy_signals
364
+ return signals
365
+
366
+ def generate_sell_signals(self, data: Dict[str, Any]) -> Dict[str, pd.Series]:
367
+ """
368
+ Generate sell signals based on the moving average crossover.
369
+
370
+ Args:
371
+ data (Dict[str, Any]): Dictionary containing all the data for
372
+ the strategy data sources.
373
+
374
+ Returns:
375
+ Dict[str, pd.Series]: A dictionary where keys are symbols and values
376
+ are pandas Series indicating sell signals (True/False).
377
+ """
378
+
379
+ signals = {}
380
+ for symbol in self.symbols:
381
+ ema_data_identifier = f"{symbol}_ema_data"
382
+ rsi_data_identifier = f"{symbol}_rsi_data"
383
+ ema_data, rsi_data = self._prepare_indicators(
384
+ data[ema_data_identifier].copy(),
385
+ data[rsi_data_identifier].copy()
386
+ )
387
+
388
+ # Confirmed by crossover between short-term EMA and long-term EMA
389
+ # within a given lookback window
390
+ ema_crossunder_lookback = ema_data[
391
+ self.ema_crossunder_result_column].rolling(
392
+ window=self.ema_cross_lookback_window
393
+ ).max().astype(bool)
394
+
395
+ # use only RSI column
396
+ rsi_overbought = rsi_data[self.rsi_result_column] \
397
+ >= self.rsi_overbought_threshold
398
+
399
+ # Combine both conditions
400
+ sell_signal = rsi_overbought & ema_crossunder_lookback
401
+ sell_signal = sell_signal.fillna(False).astype(bool)
402
+ signals[symbol] = sell_signal
403
+ return signals
404
+
405
+
406
+ if __name__ == "__main__":
407
+ app = create_app()
408
+ app.add_strategy(
409
+ RSIEMACrossoverStrategy(
410
+ time_unit=TimeUnit.HOUR,
411
+ interval=2,
412
+ market="bitvavo",
413
+ rsi_time_frame="2h",
414
+ rsi_period=14,
415
+ rsi_overbought_threshold=70,
416
+ rsi_oversold_threshold=30,
417
+ ema_time_frame="2h",
418
+ ema_short_period=12,
419
+ ema_long_period=26,
420
+ ema_cross_lookback_window=10
421
+ )
422
+ )
423
+
424
+ # Market credentials for coinbase for both the portfolio connection and data sources will
425
+ # be read from .env file, when not registering a market credential object in the app.
426
+ app.add_market(
427
+ market="bitvavo",
428
+ trading_symbol="EUR",
429
+ )
430
+ backtest_range = BacktestDateRange(
431
+ start_date=datetime(2023, 1, 1, tzinfo=timezone.utc),
432
+ end_date=datetime(2024, 6, 1, tzinfo=timezone.utc)
433
+ )
434
+ backtest = app.run_backtest(
435
+ backtest_date_range=backtest_range, initial_amount=1000
436
+ )
437
+ report = BacktestReport(backtest)
438
+ report.show(backtest_date_range=backtest_range, browser=True)
439
+ ```
440
+
441
+ > You can find more examples [here](./examples) folder.
442
+
443
+ ## 📚 Documentation
444
+ Comprehensive documentation is available at [github pages](https://coding-kitties.github.io/investing-algorithm-framework/).
445
+
446
+ ## 🛠️ Development
447
+
448
+ ### Setup
449
+
450
+ Clone the repository and install dependencies using Poetry:
451
+
452
+ > Make sure you have [Poetry](https://python-poetry.org/docs/#installation) installed.
453
+
454
+ ```bash
455
+ git clone https://github.com/coding-kitties/investing-algorithm-framework.git
456
+ cd investing-algorithm-framework
457
+ poetry install
458
+ ```
459
+
460
+ ### Running Tests
461
+
462
+ ```bash
463
+ # Run all tests
464
+ python -m unittest discover -s tests
465
+
466
+ # Run specific test
467
+ python -m unittest tests.services.test_trade_service.TestTradeService
468
+ ```
469
+
470
+ ## ⚠️ Risk Disclaimer
471
+
472
+ 🚨 **Use at Your Own Risk**
473
+
474
+ If you use this framework for your investments, **do not risk money which you are afraid to lose** until you have a clear understanding of how the framework works.
475
+
476
+ **BEFORE YOU START USING MONEY WITH THE FRAMEWORK:**
477
+ - ✅ Test your strategies thoroughly with backtesting
478
+ - ✅ Review the source code of any plugins you use
479
+ - ✅ Start with small amounts on paper trading first
480
+ - ✅ Understand the risks involved
481
+
482
+ **We assume no responsibility for your investment results. The authors and all affiliates disclaim any liability for losses.**
483
+
484
+ ---
485
+
486
+ ## 🤝 Contributing
487
+
488
+ The investing algorithm framework is a **community-driven project**. We welcome contributions at all levels:
489
+
490
+ - 🐛 **Found a bug?** [Open an issue](https://github.com/coding-kitties/investing-algorithm-framework/issues/new)
491
+ - 💡 **Have an idea?** [Share it with us](https://github.com/coding-kitties/investing-algorithm-framework/issues/new)
492
+ - 🔧 **Want to code?** Check the [project board](https://github.com/coding-kitties/investing-algorithm-framework/projects?query=is%3Aopen)
493
+
494
+ **Guidelines:**
495
+ - Read the [Contributing Guide](https://coding-kitties.github.io/investing-algorithm-framework/Contributing%20Guide/contributing)
496
+ - Always create PRs against the `develop` branch, not `main`
497
+ - Open an issue before starting major feature work
498
+
499
+ ---
500
+
501
+ ## 📚 Documentation
502
+
503
+ Comprehensive documentation is available at [GitHub Pages](https://coding-kitties.github.io/investing-algorithm-framework/)
504
+
505
+ ---
506
+
507
+ ## 📬 Community
508
+
509
+ Join us and connect with other traders and developers:
510
+
511
+ * 💬 [Discord Community](https://discord.gg/dQsRmGZP) — Real-time chat and support
512
+ * 🔗 [Reddit Community](https://www.reddit.com/r/InvestingBots/) — Share strategies and discuss
513
+ * 📖 [Documentation](https://coding-kitties.github.io/investing-algorithm-framework/) — Guides and API references
514
+
515
+ ---
516
+
517
+ ## 🏆 Acknowledgements
518
+
519
+ We want to thank all contributors to this project. A full list can be found in [AUTHORS.md](https://github.com/coding-kitties/investing-algorithm-framework/blob/master/AUTHORS.md)
520
+
521
+ ### Report Issues
522
+
523
+ If you discover a bug in the framework, please [search our issue tracker](https://github.com/coding-kitties/investing-algorithm-framework/issues?q=is%3Aissue) first. If it hasn't been reported, please [create a new issue](https://github.com/coding-kitties/investing-algorithm-framework/issues/new).
524
+
525
+ ---
526
+
527
+ <div align="center">
528
+ <p>
529
+ <a href="https://github.com/coding-kitties/investing-algorithm-framework/stargazers">⭐ Star us on GitHub</a> ·
530
+ <a href="https://discord.gg/dQsRmGZP">💬 Join Discord</a> ·
531
+ <a href="https://github.com/coding-kitties/investing-algorithm-framework/issues/new">🐛 Report Bug</a>
532
+ </p>
533
+ </div>
534
+