investing-algorithm-framework 6.2.1__tar.gz → 6.3.1__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 (195) hide show
  1. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/PKG-INFO +104 -92
  2. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/README.md +101 -89
  3. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/__init__.py +6 -2
  4. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/algorithm.py +1 -1
  5. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/app.py +132 -45
  6. investing_algorithm_framework-6.3.1/investing_algorithm_framework/cli/templates/app-web.py.template +17 -0
  7. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/app.py.template +1 -1
  8. investing_algorithm_framework-6.3.1/investing_algorithm_framework/cli/templates/market_data_providers.py.template +9 -0
  9. investing_algorithm_framework-6.3.1/investing_algorithm_framework/cli/templates/requirements.txt.template +2 -0
  10. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/run_backtest.py.template +1 -1
  11. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/create_app.py +8 -2
  12. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/__init__.py +13 -8
  13. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/constants.py +1 -2
  14. investing_algorithm_framework-6.3.1/investing_algorithm_framework/domain/data_provider.py +172 -0
  15. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/exceptions.py +17 -0
  16. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/backtesting/backtest_report.py +129 -12
  17. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/order/order.py +22 -0
  18. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trading_data_types.py +1 -0
  19. investing_algorithm_framework-6.3.1/investing_algorithm_framework/domain/order_executor.py +63 -0
  20. investing_algorithm_framework-6.3.1/investing_algorithm_framework/domain/portfolio_provider.py +62 -0
  21. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/__init__.py +6 -2
  22. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/backtesting.py +180 -14
  23. investing_algorithm_framework-6.3.1/investing_algorithm_framework/download_data.py +70 -0
  24. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/__init__.py +4 -1
  25. investing_algorithm_framework-6.3.1/investing_algorithm_framework/infrastructure/data_providers/__init__.py +19 -0
  26. investing_algorithm_framework-6.3.1/investing_algorithm_framework/infrastructure/data_providers/ccxt.py +313 -0
  27. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/market_service/ccxt_market_service.py +1 -1
  28. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/__init__.py +2 -1
  29. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/backtesting/backtest_service.py +234 -42
  30. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/market_credential_service.py +8 -1
  31. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/market_data_source_service/__init__.py +3 -1
  32. investing_algorithm_framework-6.3.1/investing_algorithm_framework/services/market_data_source_service/data_provider_service.py +179 -0
  33. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/trade_service/trade_service.py +22 -6
  34. investing_algorithm_framework-6.3.1/investing_algorithm_framework/test.py +16 -0
  35. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/pyproject.toml +3 -3
  36. investing_algorithm_framework-6.2.1/investing_algorithm_framework/cli/templates/requirements.txt.template +0 -2
  37. investing_algorithm_framework-6.2.1/investing_algorithm_framework/domain/singleton.py +0 -9
  38. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/LICENSE +0 -0
  39. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/__init__.py +0 -0
  40. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/context.py +0 -0
  41. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/stateless/__init__.py +0 -0
  42. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/stateless/action_handlers/__init__.py +0 -0
  43. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/stateless/action_handlers/action_handler_strategy.py +0 -0
  44. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/stateless/action_handlers/check_online_handler.py +0 -0
  45. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/stateless/action_handlers/run_strategy_handler.py +0 -0
  46. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/stateless/exception_handler.py +0 -0
  47. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/strategy.py +0 -0
  48. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/task.py +0 -0
  49. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/__init__.py +0 -0
  50. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/controllers/__init__.py +0 -0
  51. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/controllers/orders.py +0 -0
  52. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/controllers/portfolio.py +0 -0
  53. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/controllers/positions.py +0 -0
  54. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/create_app.py +0 -0
  55. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/error_handler.py +0 -0
  56. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/responses.py +0 -0
  57. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/run_strategies.py +0 -0
  58. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/schemas/__init__.py +0 -0
  59. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/schemas/order.py +0 -0
  60. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/schemas/portfolio.py +0 -0
  61. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/schemas/position.py +0 -0
  62. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/setup_cors.py +0 -0
  63. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/__init__.py +0 -0
  64. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/cli.py +0 -0
  65. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/deploy_to_azure_function.py +0 -0
  66. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/initialize_app.py +0 -0
  67. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/.gitignore.template +0 -0
  68. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/app_azure_function.py.template +0 -0
  69. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/app_web.py.template +0 -0
  70. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/azure_function_function_app.py.template +0 -0
  71. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/azure_function_host.json.template +0 -0
  72. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/azure_function_local.settings.json.template +0 -0
  73. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/data_providers.py.template +0 -0
  74. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/env.example.template +0 -0
  75. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/env_azure_function.example.template +0 -0
  76. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/readme.md.template +0 -0
  77. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/requirements_azure_function.txt.template +0 -0
  78. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/strategy.py.template +0 -0
  79. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/dependency_container.py +0 -0
  80. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/config.py +0 -0
  81. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/data_structures.py +0 -0
  82. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/decimal_parsing.py +0 -0
  83. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/metrics/__init__.py +0 -0
  84. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/metrics/price_efficiency.py +0 -0
  85. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/__init__.py +0 -0
  86. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/app_mode.py +0 -0
  87. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/backtesting/__init__.py +0 -0
  88. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/backtesting/backtest_date_range.py +0 -0
  89. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/backtesting/backtest_position.py +0 -0
  90. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/backtesting/backtest_reports_evaluation.py +0 -0
  91. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/base_model.py +0 -0
  92. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/date_range.py +0 -0
  93. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/market/__init__.py +0 -0
  94. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/market/market_credential.py +0 -0
  95. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/market_data_type.py +0 -0
  96. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/order/__init__.py +0 -0
  97. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/order/order_side.py +0 -0
  98. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/order/order_status.py +0 -0
  99. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/order/order_type.py +0 -0
  100. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/portfolio/__init__.py +0 -0
  101. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/portfolio/portfolio.py +0 -0
  102. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/portfolio/portfolio_configuration.py +0 -0
  103. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/portfolio/portfolio_snapshot.py +0 -0
  104. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/position/__init__.py +0 -0
  105. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/position/position.py +0 -0
  106. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/position/position_snapshot.py +0 -0
  107. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/strategy_profile.py +0 -0
  108. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/time_frame.py +0 -0
  109. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/time_interval.py +0 -0
  110. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/time_unit.py +0 -0
  111. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/tracing/__init__.py +0 -0
  112. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/tracing/trace.py +0 -0
  113. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/__init__.py +0 -0
  114. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/trade.py +0 -0
  115. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/trade_risk_type.py +0 -0
  116. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/trade_status.py +0 -0
  117. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/trade_stop_loss.py +0 -0
  118. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/trade_take_profit.py +0 -0
  119. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trading_time_frame.py +0 -0
  120. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/__init__.py +0 -0
  121. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/market_credential_service.py +0 -0
  122. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/market_data_sources.py +0 -0
  123. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/market_service.py +0 -0
  124. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/portfolios/__init__.py +0 -0
  125. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/portfolios/portfolio_sync_service.py +0 -0
  126. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/rounding_service.py +0 -0
  127. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/state_handler.py +0 -0
  128. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/stateless_actions.py +0 -0
  129. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/strategy.py +0 -0
  130. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/csv.py +0 -0
  131. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/polars.py +0 -0
  132. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/random.py +0 -0
  133. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/signatures.py +0 -0
  134. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/stoppable_thread.py +0 -0
  135. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/synchronized.py +0 -0
  136. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/database/__init__.py +0 -0
  137. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/database/sql_alchemy.py +0 -0
  138. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/__init__.py +0 -0
  139. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/decimal_parser.py +0 -0
  140. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/market_data_sources/__init__.py +0 -0
  141. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/market_data_sources/ccxt.py +0 -0
  142. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/market_data_sources/csv.py +0 -0
  143. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/market_data_sources/pandas.py +0 -0
  144. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/market_data_sources/us_treasury_yield.py +0 -0
  145. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/model_extension.py +0 -0
  146. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/order/__init__.py +0 -0
  147. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/order/order.py +0 -0
  148. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/order/order_metadata.py +0 -0
  149. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/order_trade_association.py +0 -0
  150. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/portfolio/__init__.py +0 -0
  151. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/portfolio/portfolio_snapshot.py +0 -0
  152. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/portfolio/sql_portfolio.py +0 -0
  153. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/position/__init__.py +0 -0
  154. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/position/position.py +0 -0
  155. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/position/position_snapshot.py +0 -0
  156. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/trades/__init__.py +0 -0
  157. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/trades/trade.py +0 -0
  158. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/trades/trade_stop_loss.py +0 -0
  159. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/trades/trade_take_profit.py +0 -0
  160. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/__init__.py +0 -0
  161. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/order_metadata_repository.py +0 -0
  162. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/order_repository.py +0 -0
  163. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/portfolio_repository.py +0 -0
  164. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/portfolio_snapshot_repository.py +0 -0
  165. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/position_repository.py +0 -0
  166. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/position_snapshot_repository.py +0 -0
  167. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/repository.py +0 -0
  168. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/trade_repository.py +0 -0
  169. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/trade_stop_loss_repository.py +0 -0
  170. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/trade_take_profit_repository.py +0 -0
  171. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/__init__.py +0 -0
  172. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/azure/__init__.py +0 -0
  173. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/azure/state_handler.py +0 -0
  174. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/market_service/__init__.py +0 -0
  175. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/performance_service/__init__.py +0 -0
  176. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/performance_service/backtest_performance_service.py +0 -0
  177. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/performance_service/performance_service.py +0 -0
  178. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/backtesting/__init__.py +0 -0
  179. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/configuration_service.py +0 -0
  180. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/market_data_source_service/backtest_market_data_source_service.py +0 -0
  181. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/market_data_source_service/market_data_source_service.py +0 -0
  182. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/order_service/__init__.py +0 -0
  183. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/order_service/order_backtest_service.py +0 -0
  184. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/order_service/order_service.py +0 -0
  185. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/__init__.py +0 -0
  186. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/backtest_portfolio_service.py +0 -0
  187. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/portfolio_configuration_service.py +0 -0
  188. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/portfolio_service.py +0 -0
  189. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/portfolio_snapshot_service.py +0 -0
  190. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/portfolio_sync_service.py +0 -0
  191. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/position_service.py +0 -0
  192. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/position_snapshot_service.py +0 -0
  193. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/repository_service.py +0 -0
  194. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/strategy_orchestrator_service.py +0 -0
  195. {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/trade_service/__init__.py +0 -0
@@ -1,15 +1,14 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: investing-algorithm-framework
3
- Version: 6.2.1
3
+ Version: 6.3.1
4
4
  Summary: A framework for creating trading bots
5
5
  Author: MDUYN
6
- Requires-Python: >=3.9
6
+ Requires-Python: >=3.10
7
7
  Classifier: Programming Language :: Python :: 3
8
- Classifier: Programming Language :: Python :: 3.9
9
8
  Classifier: Programming Language :: Python :: 3.10
10
9
  Classifier: Programming Language :: Python :: 3.11
11
10
  Classifier: Programming Language :: Python :: 3.12
12
- Requires-Dist: Flask (>=2.3.2)
11
+ Requires-Dist: Flask (>=3.1.0)
13
12
  Requires-Dist: Flask-Cors (>=3.0.9,<5.0.0)
14
13
  Requires-Dist: Flask-Migrate (>=2.6.0)
15
14
  Requires-Dist: SQLAlchemy (>=2.0.18)
@@ -31,17 +30,16 @@ Requires-Dist: tqdm (>=4.66.1)
31
30
  Requires-Dist: wrapt (>=1.16.0)
32
31
  Description-Content-Type: text/markdown
33
32
 
34
- <a href=https://investing-algorithm-framework.com><img src="https://img.shields.io/badge/docs-website-brightgreen"></a>
35
- [![Build](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/publish.yml/badge.svg)](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/publish.yml)
36
- [![Tests](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/test.yml)
37
- [![Downloads](https://pepy.tech/badge/investing-algorithm-framework)](https://pepy.tech/badge/investing-algorithm-framework)
38
- [![Current Version](https://img.shields.io/pypi/v/investing_algorithm_framework.svg)](https://img.shields.io/pypi/v/investing_algorithm_framework.svg)
39
- <a href="https://www.reddit.com/r/InvestingBots/"><img src="https://img.shields.io/reddit/subreddit-subscribers/investingbots?style=social"></a> <br/>
40
- [![GitHub stars](https://img.shields.io/github/stars/coding-kitties/investing-algorithm-framework.svg?style=social&label=Star&maxAge=1)](https://github.com/SeaQL/sea-orm/stargazers/) If you like what we do, consider starring, sharing and contributing!
33
+ <div align="center"> <h1><a href="https://investing-algorithm-framework.com" target="_blank">Investing Algorithm Framework</a></h1> <p><b>Rapidly build, backtest, and deploy quantitative strategies and trading bots</b></p> <a target="_blank" href="https://investing-algorithm-framework.com">📖 View Documentation</a> | <a href="https://investing-algorithm-framework.com/Getting%20Started/installation">🚀 Getting Started</a> </div>
41
34
 
42
- # [Investing Algorithm Framework](https://github.com/coding-kitties/investing-algorithm-framework)
35
+ ---
43
36
 
44
- The Investing Algorithm Framework is a Python framework that enables swift and elegant development of trading bots.
37
+ <div align="center"> <a href="https://investing-algorithm-framework.com">
38
+ <a target="_blank" href="https://discord.gg/dQsRmGZP"><img src="https://img.shields.io/discord/1345358169777635410.svg?color=7289da&label=TradeBotLab%20Discord&logo=discord&style=flat"></a>
39
+ <img src="https://img.shields.io/badge/docs-website-brightgreen"></a> <a href="https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/publish.yml"><img src="https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/publish.yml/badge.svg"></a> <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"></a> <a href="https://pepy.tech/project/investing-algorithm-framework"><img src="https://pepy.tech/badge/investing-algorithm-framework"></a> <a href="https://pypi.org/project/investing-algorithm-framework/"><img src="https://img.shields.io/pypi/v/investing-algorithm-framework.svg"></a> <a href="https://www.reddit.com/r/InvestingBots/"><img src="https://img.shields.io/reddit/subreddit-subscribers/investingbots?style=social"></a> <a href="https://github.com/coding-kitties/investing-algorithm-framework/stargazers"><img src="https://img.shields.io/github/stars/coding-kitties/investing-algorithm-framework.svg?style=social&label=Star"></a>
40
+ </div>
41
+
42
+ > If you like what we do, consider starring, sharing and contributing!
45
43
 
46
44
  ## Sponsors
47
45
 
@@ -53,34 +51,54 @@ The Investing Algorithm Framework is a Python framework that enables swift and e
53
51
  </picture>
54
52
  </a>
55
53
 
56
- ## Features and planned features:
57
-
58
- - [x] **Based on Python 3.9+**: Windows, macOS and Linux.
59
- - [x] **Documentation**: [Documentation](https://investing-algorithm-framework.com)
60
- - [x] **Persistence of portfolios, orders, positions and trades**: Persistence is achieved through sqlite.
61
- - [x] **Limit orders**: Create limit orders for buying and selling.
62
- - [x] **Trade models**: Models and functionality for trades, trades stop losses (fixed and trailing) and take profits (fixed and trailing).
63
- - [x] **Market data sources**: Market data sources for OHLCV data and ticker data, and extendible with custom data and events.
64
- - [x] **Polars and Pandas dataframes support** Out of the box dataframes support for fast data processing ([pola.rs](https://pola.rs/), [pandas](https://pandas.pydata.org/)).
65
- - [x] **Azure Functions support**: Stateless running for cloud function deployments in Azure.
66
- - [x] **Live trading**: Live trading.
67
- - [x] **Backtesting and performance analysis reports** [example](./examples/backtest_example)
68
- - [x] **Backtesting multiple algorithms with different backtest date ranges** [example](./examples/backtests_example)
69
- - [x] **Backtest comparison and experiments**: Compare multiple backtests and run experiments.
70
- - [x] **Order execution**: Currently support for a wide range of crypto exchanges through [ccxt](https://github.com/ccxt/ccxt) (Support for traditional asset brokers is planned).
71
- - [x] **Web API**: Rest API for interacting with your deployed trading bot
72
- - [x] **PyIndicators**: Works natively with [PyIndicators](https://github.com/coding-kitties/PyIndicators) for technical analysis on your Pandas and Polars dataframes.
73
- - [ ] **Builtin WebUI (Planned)**: Builtin web UI to manage your bot and evaluate your backtests.
74
- - [ ] **Manageable via Telegram (Planned)**: Manage the bot with Telegram.
75
- - [ ] **Performance status report via Web UI and telegram(Planned)**: Provide a performance status of your current trades.
76
- - [ ] **CI/CD integration (Planned)**: Tools for continuous integration and deployment (version tracking, comparison of backtests, automatic deployments).
77
- - [ ] **Tracing and replaying of strategies in backtests (Planned)**: Tracing and replaying of strategies in backtests for specific dates and date ranges so you can evaluate your strategy step by step.
78
- - [ ] **AWS Lambda support (Planned)**: Stateless running for cloud function deployments in AWS.
79
- - [ ] **Azure App services support (Planned)**: deployments in Azure app services with Web UI.
80
-
81
- ## Example implementation
82
-
83
- The following algorithm connects to binance and buys BTC every 2 hours.
54
+
55
+ ## 🌟 Features
56
+
57
+ - [x] Python 3.10+: Cross-platform support for Windows, macOS, and Linux.
58
+ - [x] Backtesting: Simulate strategies with detailed performance reports.
59
+ - [x] Live Trading: Execute trades in real-time with support for multiple exchanges via ccxt.
60
+ - [x] Portfolio Management: Manage portfolios, trades, and positions with persistence via SQLite.
61
+ - [x] Market Data Sources: Fetch OHLCV, ticker, and custom data with support for Polars and Pandas.
62
+ - [x] Azure Functions Support: Deploy stateless trading bots to Azure.
63
+ - [x] Web API: Interact with your bot via REST API.
64
+ - [x] PyIndicators Integration: Perform technical analysis directly on your dataframes.
65
+ - [x] Extensibility: Add custom strategies, data providers, order executors so you can connect your trading bot to your favorite exchange or broker.
66
+
67
+ ## 🚀 Quickstart
68
+
69
+ Installation
70
+ Install the framework via [PyPI](https://pypi.org/project/investing-algorithm-framework/):
71
+
72
+ 1. First install the framework using `pip`. The Investing Algorithm Framework is hosted on [PyPi].
73
+
74
+ ```bash
75
+ pip install investing-algorithm-framework
76
+ ```
77
+
78
+ Run the following command to set up your project:
79
+
80
+ ```bash
81
+ investing-algorithm-framewor init
82
+ ```
83
+
84
+ For a web-enabled version:
85
+
86
+ ```bash
87
+ investing-algorithm-framework init --web
88
+ ```
89
+
90
+ This will create:
91
+
92
+ * app.py: The entry point for your bot.
93
+ * strategy.py: A sample strategy file to get started.
94
+
95
+ > Note: Keep the app.py file as is. You can modify strategy.py and add additional files to build your bot.
96
+ > You can always change the app to the web version by changing the `app.py` file.
97
+
98
+ ---
99
+
100
+ ## 📈 Example: A Simple Trading Bot
101
+ The following example connects to Binance and buys BTC every 2 hours.
84
102
 
85
103
  ```python
86
104
  import logging.config
@@ -144,7 +162,7 @@ if __name__ == "__main__":
144
162
 
145
163
  > You can find more examples [here](./examples) folder.
146
164
 
147
- ## Backtesting and experiments
165
+ ## 🔍 Backtesting
148
166
 
149
167
  The framework also supports backtesting and performing backtest experiments. After a backtest, you can print a report that shows the performance of your trading bot.
150
168
 
@@ -257,53 +275,38 @@ Take profits overview
257
275
  ╰────────────────────┴───────────────┴──────────┴──────────┴─────────────────────────────────────┴──────────────┴────────────────┴─────────────────────────────────┴──────────────┴─────────────┴───────────────╯
258
276
  ```
259
277
 
260
- ### Backtest experiments
278
+ ## 🌐 Deployment to Azure
261
279
 
262
- The framework also supports backtest experiments. Backtest experiments allows you to
263
- compare multiple algorithms and evaluate their performance. Ideally,
264
- you would do this by parameterizing your strategy and creating a factory function that
265
- creates the algorithm with the different parameters. You can find an example of this
266
- in the [backtest experiments example](./examples/backtest_experiment).
280
+ Prerequisites
267
281
 
268
- ## Broker/Exchange configuration
282
+ Ensure Azure Functions Core Tools are installed:
269
283
 
270
- The framework has by default support for [ccxt](https://github.com/ccxt/ccxt).
271
- This should allow you to connect to a lot of brokers/exchanges.
284
+ ```bash
285
+ npm install -g azure-functions-core-tools@4 --unsafe-perm true
286
+ ```
287
+ Deploying to Azure
288
+ Use the provided deployment script:
272
289
 
273
- ```python
274
- from investing_algorithm_framework import PortfolioConfiguration, \
275
- MarketCredential, create_app
276
- app = create_app()
277
- app.add_market_credential(
278
- MarketCredential(
279
- market="<your market>",
280
- api_key="<your api key>",
281
- secret_key="<your secret key>",
282
- )
283
- )
284
- app.add_portfolio_configuration(
285
- PortfolioConfiguration(
286
- market="<your market>",
287
- initial_balance=400,
288
- trading_symbol="EUR"
289
- )
290
- )
290
+ This script:
291
+
292
+ ```
293
+ investing-algorithm-framework deploy
291
294
  ```
292
295
 
293
- ## Performance
296
+ This script:
294
297
 
295
- We are continuously working on improving the performance of the framework. If
296
- you have any suggestions, please let us know.
298
+ * Creates Azure resources (e.g., storage accounts, function apps).
299
+ * Sets environment variables for the Azure Function.
300
+ * Deploys your bot to Azure.
297
301
 
298
- ## How to install
302
+ ## 📚 Documentation
303
+ Comprehensive documentation is available at [investing-algorithm-framework.com](https://investing-algorithm-framework.com).
299
304
 
300
- You can download the framework with pypi.
305
+ ## 🛠️ Development
301
306
 
302
- ```bash
303
- pip install investing-algorithm-framework
304
- ```
307
+ Local Development
305
308
 
306
- ## Installation for local development
309
+ Clone the repository and install dependencies using Poetry:
307
310
 
308
311
  The framework is built with poetry. To install the framework for local development, you can run the following commands:
309
312
 
@@ -324,11 +327,11 @@ To run the tests, you can run the following command:
324
327
  python -m unittest discover -s tests
325
328
  ```
326
329
 
327
- ## Disclaimer
330
+ ## ⚠️ Disclaimer
331
+
328
332
 
329
333
  If you use this framework for your investments, do not risk money
330
- which you are afraid to lose, until you have clear understanding how
331
- the framework works. We can't stress this enough:
334
+ which you are afraid to lose, until you have clear understanding how the framework works. We can't stress this enough:
332
335
 
333
336
  BEFORE YOU START USING MONEY WITH THE FRAMEWORK, MAKE SURE THAT YOU TESTED
334
337
  YOUR COMPONENTS THOROUGHLY. USE THE SOFTWARE AT YOUR OWN RISK.
@@ -337,6 +340,8 @@ THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR INVESTMENT RESU
337
340
  Also, make sure that you read the source code of any plugin you use or
338
341
  implementation of an algorithm made with this framework.
339
342
 
343
+ We welcome contributions! Check out the project board and issues to get started.
344
+
340
345
  ## Documentation
341
346
 
342
347
  All the documentation can be found online
@@ -349,17 +354,7 @@ contributing page at the website.
349
354
  If you'd like to chat with investing-algorithm-framework users
350
355
  and developers, [join us on Slack](https://inv-algo-framework.slack.com) or [join us on reddit](https://www.reddit.com/r/InvestingBots/)
351
356
 
352
- ## Acknowledgements
353
-
354
- We want to thank all contributors to this project. A full list of all the people that contributed to the project can be
355
- found [here](https://github.com/investing-algorithms/investing-algorithm-framework/blob/master/AUTHORS.md)
356
-
357
- ### [Bugs / Issues](https://github.com/investing-algorithms/investing-algorithm-framework/issues?q=is%3Aissue)
358
-
359
- If you discover a bug in the framework, please [search our issue tracker](https://github.com/investing-algorithms/investing-algorithm-framework/issues?q=is%3Aissue)
360
- first. If it hasn't been reported, please [create a new issue](https://github.com/investing-algorithms/investing-algorithm-framework/issues/new).
361
-
362
- ### Contributing
357
+ ## 🤝 Contributing
363
358
 
364
359
  The investing algorithm framework is a community driven project.
365
360
  We welcome you to participate, contribute and together help build the future trading bots developed in python.
@@ -372,3 +367,20 @@ You can pick up a task by assigning yourself to it.
372
367
  This will ensure that interested parties can give valuable feedback on the feature, and let others know that you are working on it.
373
368
 
374
369
  **Important:** Always create your feature or hotfix against the `develop` branch, not `main`.
370
+
371
+ ## 📬 Support
372
+
373
+ * Slack Community
374
+ * Reddit Community
375
+
376
+
377
+ ## 🏆 Acknowledgements
378
+
379
+ We want to thank all contributors to this project. A full list of all the people that contributed to the project can be
380
+ found [here](https://github.com/investing-algorithms/investing-algorithm-framework/blob/master/AUTHORS.md)
381
+
382
+ ### [Bugs / Issues](https://github.com/investing-algorithms/investing-algorithm-framework/issues?q=is%3Aissue)
383
+
384
+ If you discover a bug in the framework, please [search our issue tracker](https://github.com/investing-algorithms/investing-algorithm-framework/issues?q=is%3Aissue)
385
+ first. If it hasn't been reported, please [create a new issue](https://github.com/investing-algorithms/investing-algorithm-framework/issues/new).
386
+
@@ -1,14 +1,13 @@
1
- <a href=https://investing-algorithm-framework.com><img src="https://img.shields.io/badge/docs-website-brightgreen"></a>
2
- [![Build](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/publish.yml/badge.svg)](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/publish.yml)
3
- [![Tests](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/test.yml)
4
- [![Downloads](https://pepy.tech/badge/investing-algorithm-framework)](https://pepy.tech/badge/investing-algorithm-framework)
5
- [![Current Version](https://img.shields.io/pypi/v/investing_algorithm_framework.svg)](https://img.shields.io/pypi/v/investing_algorithm_framework.svg)
6
- <a href="https://www.reddit.com/r/InvestingBots/"><img src="https://img.shields.io/reddit/subreddit-subscribers/investingbots?style=social"></a> <br/>
7
- [![GitHub stars](https://img.shields.io/github/stars/coding-kitties/investing-algorithm-framework.svg?style=social&label=Star&maxAge=1)](https://github.com/SeaQL/sea-orm/stargazers/) If you like what we do, consider starring, sharing and contributing!
1
+ <div align="center"> <h1><a href="https://investing-algorithm-framework.com" target="_blank">Investing Algorithm Framework</a></h1> <p><b>Rapidly build, backtest, and deploy quantitative strategies and trading bots</b></p> <a target="_blank" href="https://investing-algorithm-framework.com">📖 View Documentation</a> | <a href="https://investing-algorithm-framework.com/Getting%20Started/installation">🚀 Getting Started</a> </div>
8
2
 
9
- # [Investing Algorithm Framework](https://github.com/coding-kitties/investing-algorithm-framework)
3
+ ---
10
4
 
11
- The Investing Algorithm Framework is a Python framework that enables swift and elegant development of trading bots.
5
+ <div align="center"> <a href="https://investing-algorithm-framework.com">
6
+ <a target="_blank" href="https://discord.gg/dQsRmGZP"><img src="https://img.shields.io/discord/1345358169777635410.svg?color=7289da&label=TradeBotLab%20Discord&logo=discord&style=flat"></a>
7
+ <img src="https://img.shields.io/badge/docs-website-brightgreen"></a> <a href="https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/publish.yml"><img src="https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/publish.yml/badge.svg"></a> <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"></a> <a href="https://pepy.tech/project/investing-algorithm-framework"><img src="https://pepy.tech/badge/investing-algorithm-framework"></a> <a href="https://pypi.org/project/investing-algorithm-framework/"><img src="https://img.shields.io/pypi/v/investing-algorithm-framework.svg"></a> <a href="https://www.reddit.com/r/InvestingBots/"><img src="https://img.shields.io/reddit/subreddit-subscribers/investingbots?style=social"></a> <a href="https://github.com/coding-kitties/investing-algorithm-framework/stargazers"><img src="https://img.shields.io/github/stars/coding-kitties/investing-algorithm-framework.svg?style=social&label=Star"></a>
8
+ </div>
9
+
10
+ > If you like what we do, consider starring, sharing and contributing!
12
11
 
13
12
  ## Sponsors
14
13
 
@@ -20,34 +19,54 @@ The Investing Algorithm Framework is a Python framework that enables swift and e
20
19
  </picture>
21
20
  </a>
22
21
 
23
- ## Features and planned features:
24
-
25
- - [x] **Based on Python 3.9+**: Windows, macOS and Linux.
26
- - [x] **Documentation**: [Documentation](https://investing-algorithm-framework.com)
27
- - [x] **Persistence of portfolios, orders, positions and trades**: Persistence is achieved through sqlite.
28
- - [x] **Limit orders**: Create limit orders for buying and selling.
29
- - [x] **Trade models**: Models and functionality for trades, trades stop losses (fixed and trailing) and take profits (fixed and trailing).
30
- - [x] **Market data sources**: Market data sources for OHLCV data and ticker data, and extendible with custom data and events.
31
- - [x] **Polars and Pandas dataframes support** Out of the box dataframes support for fast data processing ([pola.rs](https://pola.rs/), [pandas](https://pandas.pydata.org/)).
32
- - [x] **Azure Functions support**: Stateless running for cloud function deployments in Azure.
33
- - [x] **Live trading**: Live trading.
34
- - [x] **Backtesting and performance analysis reports** [example](./examples/backtest_example)
35
- - [x] **Backtesting multiple algorithms with different backtest date ranges** [example](./examples/backtests_example)
36
- - [x] **Backtest comparison and experiments**: Compare multiple backtests and run experiments.
37
- - [x] **Order execution**: Currently support for a wide range of crypto exchanges through [ccxt](https://github.com/ccxt/ccxt) (Support for traditional asset brokers is planned).
38
- - [x] **Web API**: Rest API for interacting with your deployed trading bot
39
- - [x] **PyIndicators**: Works natively with [PyIndicators](https://github.com/coding-kitties/PyIndicators) for technical analysis on your Pandas and Polars dataframes.
40
- - [ ] **Builtin WebUI (Planned)**: Builtin web UI to manage your bot and evaluate your backtests.
41
- - [ ] **Manageable via Telegram (Planned)**: Manage the bot with Telegram.
42
- - [ ] **Performance status report via Web UI and telegram(Planned)**: Provide a performance status of your current trades.
43
- - [ ] **CI/CD integration (Planned)**: Tools for continuous integration and deployment (version tracking, comparison of backtests, automatic deployments).
44
- - [ ] **Tracing and replaying of strategies in backtests (Planned)**: Tracing and replaying of strategies in backtests for specific dates and date ranges so you can evaluate your strategy step by step.
45
- - [ ] **AWS Lambda support (Planned)**: Stateless running for cloud function deployments in AWS.
46
- - [ ] **Azure App services support (Planned)**: deployments in Azure app services with Web UI.
47
-
48
- ## Example implementation
49
-
50
- The following algorithm connects to binance and buys BTC every 2 hours.
22
+
23
+ ## 🌟 Features
24
+
25
+ - [x] Python 3.10+: Cross-platform support for Windows, macOS, and Linux.
26
+ - [x] Backtesting: Simulate strategies with detailed performance reports.
27
+ - [x] Live Trading: Execute trades in real-time with support for multiple exchanges via ccxt.
28
+ - [x] Portfolio Management: Manage portfolios, trades, and positions with persistence via SQLite.
29
+ - [x] Market Data Sources: Fetch OHLCV, ticker, and custom data with support for Polars and Pandas.
30
+ - [x] Azure Functions Support: Deploy stateless trading bots to Azure.
31
+ - [x] Web API: Interact with your bot via REST API.
32
+ - [x] PyIndicators Integration: Perform technical analysis directly on your dataframes.
33
+ - [x] Extensibility: Add custom strategies, data providers, order executors so you can connect your trading bot to your favorite exchange or broker.
34
+
35
+ ## 🚀 Quickstart
36
+
37
+ Installation
38
+ Install the framework via [PyPI](https://pypi.org/project/investing-algorithm-framework/):
39
+
40
+ 1. First install the framework using `pip`. The Investing Algorithm Framework is hosted on [PyPi].
41
+
42
+ ```bash
43
+ pip install investing-algorithm-framework
44
+ ```
45
+
46
+ Run the following command to set up your project:
47
+
48
+ ```bash
49
+ investing-algorithm-framewor init
50
+ ```
51
+
52
+ For a web-enabled version:
53
+
54
+ ```bash
55
+ investing-algorithm-framework init --web
56
+ ```
57
+
58
+ This will create:
59
+
60
+ * app.py: The entry point for your bot.
61
+ * strategy.py: A sample strategy file to get started.
62
+
63
+ > Note: Keep the app.py file as is. You can modify strategy.py and add additional files to build your bot.
64
+ > You can always change the app to the web version by changing the `app.py` file.
65
+
66
+ ---
67
+
68
+ ## 📈 Example: A Simple Trading Bot
69
+ The following example connects to Binance and buys BTC every 2 hours.
51
70
 
52
71
  ```python
53
72
  import logging.config
@@ -111,7 +130,7 @@ if __name__ == "__main__":
111
130
 
112
131
  > You can find more examples [here](./examples) folder.
113
132
 
114
- ## Backtesting and experiments
133
+ ## 🔍 Backtesting
115
134
 
116
135
  The framework also supports backtesting and performing backtest experiments. After a backtest, you can print a report that shows the performance of your trading bot.
117
136
 
@@ -224,53 +243,38 @@ Take profits overview
224
243
  ╰────────────────────┴───────────────┴──────────┴──────────┴─────────────────────────────────────┴──────────────┴────────────────┴─────────────────────────────────┴──────────────┴─────────────┴───────────────╯
225
244
  ```
226
245
 
227
- ### Backtest experiments
246
+ ## 🌐 Deployment to Azure
228
247
 
229
- The framework also supports backtest experiments. Backtest experiments allows you to
230
- compare multiple algorithms and evaluate their performance. Ideally,
231
- you would do this by parameterizing your strategy and creating a factory function that
232
- creates the algorithm with the different parameters. You can find an example of this
233
- in the [backtest experiments example](./examples/backtest_experiment).
248
+ Prerequisites
234
249
 
235
- ## Broker/Exchange configuration
250
+ Ensure Azure Functions Core Tools are installed:
236
251
 
237
- The framework has by default support for [ccxt](https://github.com/ccxt/ccxt).
238
- This should allow you to connect to a lot of brokers/exchanges.
252
+ ```bash
253
+ npm install -g azure-functions-core-tools@4 --unsafe-perm true
254
+ ```
255
+ Deploying to Azure
256
+ Use the provided deployment script:
239
257
 
240
- ```python
241
- from investing_algorithm_framework import PortfolioConfiguration, \
242
- MarketCredential, create_app
243
- app = create_app()
244
- app.add_market_credential(
245
- MarketCredential(
246
- market="<your market>",
247
- api_key="<your api key>",
248
- secret_key="<your secret key>",
249
- )
250
- )
251
- app.add_portfolio_configuration(
252
- PortfolioConfiguration(
253
- market="<your market>",
254
- initial_balance=400,
255
- trading_symbol="EUR"
256
- )
257
- )
258
+ This script:
259
+
260
+ ```
261
+ investing-algorithm-framework deploy
258
262
  ```
259
263
 
260
- ## Performance
264
+ This script:
261
265
 
262
- We are continuously working on improving the performance of the framework. If
263
- you have any suggestions, please let us know.
266
+ * Creates Azure resources (e.g., storage accounts, function apps).
267
+ * Sets environment variables for the Azure Function.
268
+ * Deploys your bot to Azure.
264
269
 
265
- ## How to install
270
+ ## 📚 Documentation
271
+ Comprehensive documentation is available at [investing-algorithm-framework.com](https://investing-algorithm-framework.com).
266
272
 
267
- You can download the framework with pypi.
273
+ ## 🛠️ Development
268
274
 
269
- ```bash
270
- pip install investing-algorithm-framework
271
- ```
275
+ Local Development
272
276
 
273
- ## Installation for local development
277
+ Clone the repository and install dependencies using Poetry:
274
278
 
275
279
  The framework is built with poetry. To install the framework for local development, you can run the following commands:
276
280
 
@@ -291,11 +295,11 @@ To run the tests, you can run the following command:
291
295
  python -m unittest discover -s tests
292
296
  ```
293
297
 
294
- ## Disclaimer
298
+ ## ⚠️ Disclaimer
299
+
295
300
 
296
301
  If you use this framework for your investments, do not risk money
297
- which you are afraid to lose, until you have clear understanding how
298
- the framework works. We can't stress this enough:
302
+ which you are afraid to lose, until you have clear understanding how the framework works. We can't stress this enough:
299
303
 
300
304
  BEFORE YOU START USING MONEY WITH THE FRAMEWORK, MAKE SURE THAT YOU TESTED
301
305
  YOUR COMPONENTS THOROUGHLY. USE THE SOFTWARE AT YOUR OWN RISK.
@@ -304,6 +308,8 @@ THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR INVESTMENT RESU
304
308
  Also, make sure that you read the source code of any plugin you use or
305
309
  implementation of an algorithm made with this framework.
306
310
 
311
+ We welcome contributions! Check out the project board and issues to get started.
312
+
307
313
  ## Documentation
308
314
 
309
315
  All the documentation can be found online
@@ -316,17 +322,7 @@ contributing page at the website.
316
322
  If you'd like to chat with investing-algorithm-framework users
317
323
  and developers, [join us on Slack](https://inv-algo-framework.slack.com) or [join us on reddit](https://www.reddit.com/r/InvestingBots/)
318
324
 
319
- ## Acknowledgements
320
-
321
- We want to thank all contributors to this project. A full list of all the people that contributed to the project can be
322
- found [here](https://github.com/investing-algorithms/investing-algorithm-framework/blob/master/AUTHORS.md)
323
-
324
- ### [Bugs / Issues](https://github.com/investing-algorithms/investing-algorithm-framework/issues?q=is%3Aissue)
325
-
326
- If you discover a bug in the framework, please [search our issue tracker](https://github.com/investing-algorithms/investing-algorithm-framework/issues?q=is%3Aissue)
327
- first. If it hasn't been reported, please [create a new issue](https://github.com/investing-algorithms/investing-algorithm-framework/issues/new).
328
-
329
- ### Contributing
325
+ ## 🤝 Contributing
330
326
 
331
327
  The investing algorithm framework is a community driven project.
332
328
  We welcome you to participate, contribute and together help build the future trading bots developed in python.
@@ -338,4 +334,20 @@ You can pick up a task by assigning yourself to it.
338
334
  **Note** before starting any major new feature work, *please open an issue describing what you are planning to do*.
339
335
  This will ensure that interested parties can give valuable feedback on the feature, and let others know that you are working on it.
340
336
 
341
- **Important:** Always create your feature or hotfix against the `develop` branch, not `main`.
337
+ **Important:** Always create your feature or hotfix against the `develop` branch, not `main`.
338
+
339
+ ## 📬 Support
340
+
341
+ * Slack Community
342
+ * Reddit Community
343
+
344
+
345
+ ## 🏆 Acknowledgements
346
+
347
+ We want to thank all contributors to this project. A full list of all the people that contributed to the project can be
348
+ found [here](https://github.com/investing-algorithms/investing-algorithm-framework/blob/master/AUTHORS.md)
349
+
350
+ ### [Bugs / Issues](https://github.com/investing-algorithms/investing-algorithm-framework/issues?q=is%3Aissue)
351
+
352
+ If you discover a bug in the framework, please [search our issue tracker](https://github.com/investing-algorithms/investing-algorithm-framework/issues?q=is%3Aissue)
353
+ first. If it hasn't been reported, please [create a new issue](https://github.com/investing-algorithms/investing-algorithm-framework/issues/new).
@@ -11,12 +11,14 @@ from investing_algorithm_framework.domain import ApiException, \
11
11
  RESERVED_BALANCES, APP_MODE, AppMode, DATETIME_FORMAT, \
12
12
  load_backtest_report, BacktestDateRange, convert_polars_to_pandas, \
13
13
  DateRange, get_backtest_report, DEFAULT_LOGGING_CONFIG, \
14
- BacktestReport, TradeStatus, MarketDataType, TradeRiskType
14
+ BacktestReport, TradeStatus, MarketDataType, TradeRiskType, \
15
+ APPLICATION_DIRECTORY
15
16
  from investing_algorithm_framework.infrastructure import \
16
17
  CCXTOrderBookMarketDataSource, CCXTOHLCVMarketDataSource, \
17
18
  CCXTTickerMarketDataSource, CSVOHLCVMarketDataSource, \
18
19
  CSVTickerMarketDataSource, AzureBlobStorageStateHandler
19
20
  from .create_app import create_app
21
+ from .download_data import download
20
22
 
21
23
  __all__ = [
22
24
  "Algorithm",
@@ -73,5 +75,7 @@ __all__ = [
73
75
  "TradeStatus",
74
76
  "MarketDataType",
75
77
  "TradeRiskType",
76
- "Context"
78
+ "Context",
79
+ "APPLICATION_DIRECTORY",
80
+ "download"
77
81
  ]
@@ -22,7 +22,7 @@ class Algorithm:
22
22
  them in the correct order.
23
23
 
24
24
  Args:
25
- name (str): The name of the algorithm
25
+ name (str): (Optional) The name of the algorithm
26
26
  description (str): The description of the algorithm
27
27
  context (dict): The context of the algorithm, for backtest
28
28
  references