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.
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/PKG-INFO +104 -92
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/README.md +101 -89
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/__init__.py +6 -2
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/algorithm.py +1 -1
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/app.py +132 -45
- investing_algorithm_framework-6.3.1/investing_algorithm_framework/cli/templates/app-web.py.template +17 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/app.py.template +1 -1
- investing_algorithm_framework-6.3.1/investing_algorithm_framework/cli/templates/market_data_providers.py.template +9 -0
- investing_algorithm_framework-6.3.1/investing_algorithm_framework/cli/templates/requirements.txt.template +2 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/run_backtest.py.template +1 -1
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/create_app.py +8 -2
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/__init__.py +13 -8
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/constants.py +1 -2
- investing_algorithm_framework-6.3.1/investing_algorithm_framework/domain/data_provider.py +172 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/exceptions.py +17 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/backtesting/backtest_report.py +129 -12
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/order/order.py +22 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trading_data_types.py +1 -0
- investing_algorithm_framework-6.3.1/investing_algorithm_framework/domain/order_executor.py +63 -0
- investing_algorithm_framework-6.3.1/investing_algorithm_framework/domain/portfolio_provider.py +62 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/__init__.py +6 -2
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/backtesting.py +180 -14
- investing_algorithm_framework-6.3.1/investing_algorithm_framework/download_data.py +70 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/__init__.py +4 -1
- investing_algorithm_framework-6.3.1/investing_algorithm_framework/infrastructure/data_providers/__init__.py +19 -0
- investing_algorithm_framework-6.3.1/investing_algorithm_framework/infrastructure/data_providers/ccxt.py +313 -0
- {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
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/__init__.py +2 -1
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/backtesting/backtest_service.py +234 -42
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/market_credential_service.py +8 -1
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/market_data_source_service/__init__.py +3 -1
- investing_algorithm_framework-6.3.1/investing_algorithm_framework/services/market_data_source_service/data_provider_service.py +179 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/trade_service/trade_service.py +22 -6
- investing_algorithm_framework-6.3.1/investing_algorithm_framework/test.py +16 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/pyproject.toml +3 -3
- investing_algorithm_framework-6.2.1/investing_algorithm_framework/cli/templates/requirements.txt.template +0 -2
- investing_algorithm_framework-6.2.1/investing_algorithm_framework/domain/singleton.py +0 -9
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/LICENSE +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/context.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/stateless/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/stateless/action_handlers/__init__.py +0 -0
- {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
- {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
- {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
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/stateless/exception_handler.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/strategy.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/task.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/controllers/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/controllers/orders.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/controllers/portfolio.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/controllers/positions.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/create_app.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/error_handler.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/responses.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/run_strategies.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/schemas/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/schemas/order.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/schemas/portfolio.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/schemas/position.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/setup_cors.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/cli.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/deploy_to_azure_function.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/initialize_app.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/.gitignore.template +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/app_azure_function.py.template +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/app_web.py.template +0 -0
- {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
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/azure_function_host.json.template +0 -0
- {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
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/data_providers.py.template +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/env.example.template +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/env_azure_function.example.template +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/readme.md.template +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/requirements_azure_function.txt.template +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/strategy.py.template +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/dependency_container.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/config.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/data_structures.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/decimal_parsing.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/metrics/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/metrics/price_efficiency.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/app_mode.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/backtesting/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/backtesting/backtest_date_range.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/backtesting/backtest_position.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/backtesting/backtest_reports_evaluation.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/base_model.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/date_range.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/market/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/market/market_credential.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/market_data_type.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/order/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/order/order_side.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/order/order_status.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/order/order_type.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/portfolio/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/portfolio/portfolio.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/portfolio/portfolio_configuration.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/portfolio/portfolio_snapshot.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/position/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/position/position.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/position/position_snapshot.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/strategy_profile.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/time_frame.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/time_interval.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/time_unit.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/tracing/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/tracing/trace.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/trade.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/trade_risk_type.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/trade_status.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/trade_stop_loss.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/trade_take_profit.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trading_time_frame.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/market_credential_service.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/market_data_sources.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/market_service.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/portfolios/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/portfolios/portfolio_sync_service.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/rounding_service.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/state_handler.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/stateless_actions.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/strategy.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/csv.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/polars.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/random.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/signatures.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/stoppable_thread.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/synchronized.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/database/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/database/sql_alchemy.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/decimal_parser.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/market_data_sources/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/market_data_sources/ccxt.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/market_data_sources/csv.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/market_data_sources/pandas.py +0 -0
- {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
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/model_extension.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/order/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/order/order.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/order/order_metadata.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/order_trade_association.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/portfolio/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/portfolio/portfolio_snapshot.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/portfolio/sql_portfolio.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/position/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/position/position.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/position/position_snapshot.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/trades/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/trades/trade.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/trades/trade_stop_loss.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/trades/trade_take_profit.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/order_metadata_repository.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/order_repository.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/portfolio_repository.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/portfolio_snapshot_repository.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/position_repository.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/position_snapshot_repository.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/repository.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/trade_repository.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/trade_stop_loss_repository.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/trade_take_profit_repository.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/azure/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/azure/state_handler.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/market_service/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/performance_service/__init__.py +0 -0
- {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
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/performance_service/performance_service.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/backtesting/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/configuration_service.py +0 -0
- {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
- {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
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/order_service/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/order_service/order_backtest_service.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/order_service/order_service.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/__init__.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/backtest_portfolio_service.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/portfolio_configuration_service.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/portfolio_service.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/portfolio_snapshot_service.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/portfolio_sync_service.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/position_service.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/position_snapshot_service.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/repository_service.py +0 -0
- {investing_algorithm_framework-6.2.1 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/strategy_orchestrator_service.py +0 -0
- {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.
|
|
3
|
+
Version: 6.3.1
|
|
4
4
|
Summary: A framework for creating trading bots
|
|
5
5
|
Author: MDUYN
|
|
6
|
-
Requires-Python: >=3.
|
|
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 (>=
|
|
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><
|
|
35
|
-
[](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/publish.yml)
|
|
36
|
-
[](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/test.yml)
|
|
37
|
-
[](https://pepy.tech/badge/investing-algorithm-framework)
|
|
38
|
-
[](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
|
-
[](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
|
-
|
|
35
|
+
---
|
|
43
36
|
|
|
44
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
- [x]
|
|
60
|
-
- [x]
|
|
61
|
-
- [x]
|
|
62
|
-
- [x]
|
|
63
|
-
- [x]
|
|
64
|
-
- [x]
|
|
65
|
-
- [x]
|
|
66
|
-
- [x]
|
|
67
|
-
- [x]
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
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
|
|
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
|
-
|
|
278
|
+
## 🌐 Deployment to Azure
|
|
261
279
|
|
|
262
|
-
|
|
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
|
-
|
|
282
|
+
Ensure Azure Functions Core Tools are installed:
|
|
269
283
|
|
|
270
|
-
|
|
271
|
-
|
|
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
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
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
|
-
|
|
296
|
+
This script:
|
|
294
297
|
|
|
295
|
-
|
|
296
|
-
|
|
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
|
-
##
|
|
302
|
+
## 📚 Documentation
|
|
303
|
+
Comprehensive documentation is available at [investing-algorithm-framework.com](https://investing-algorithm-framework.com).
|
|
299
304
|
|
|
300
|
-
|
|
305
|
+
## 🛠️ Development
|
|
301
306
|
|
|
302
|
-
|
|
303
|
-
pip install investing-algorithm-framework
|
|
304
|
-
```
|
|
307
|
+
Local Development
|
|
305
308
|
|
|
306
|
-
|
|
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
|
-
##
|
|
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><
|
|
2
|
-
[](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/publish.yml)
|
|
3
|
-
[](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/test.yml)
|
|
4
|
-
[](https://pepy.tech/badge/investing-algorithm-framework)
|
|
5
|
-
[](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
|
-
[](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
|
-
|
|
3
|
+
---
|
|
10
4
|
|
|
11
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- [x]
|
|
27
|
-
- [x]
|
|
28
|
-
- [x]
|
|
29
|
-
- [x]
|
|
30
|
-
- [x]
|
|
31
|
-
- [x]
|
|
32
|
-
- [x]
|
|
33
|
-
- [x]
|
|
34
|
-
- [x]
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
|
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
|
-
|
|
246
|
+
## 🌐 Deployment to Azure
|
|
228
247
|
|
|
229
|
-
|
|
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
|
-
|
|
250
|
+
Ensure Azure Functions Core Tools are installed:
|
|
236
251
|
|
|
237
|
-
|
|
238
|
-
|
|
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
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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
|
-
|
|
264
|
+
This script:
|
|
261
265
|
|
|
262
|
-
|
|
263
|
-
|
|
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
|
-
##
|
|
270
|
+
## 📚 Documentation
|
|
271
|
+
Comprehensive documentation is available at [investing-algorithm-framework.com](https://investing-algorithm-framework.com).
|
|
266
272
|
|
|
267
|
-
|
|
273
|
+
## 🛠️ Development
|
|
268
274
|
|
|
269
|
-
|
|
270
|
-
pip install investing-algorithm-framework
|
|
271
|
-
```
|
|
275
|
+
Local Development
|
|
272
276
|
|
|
273
|
-
|
|
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
|
-
##
|
|
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
|