investing-algorithm-framework 6.3.0__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.3.0 → investing_algorithm_framework-6.3.1}/PKG-INFO +89 -114
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/README.md +87 -113
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/__init__.py +3 -1
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/app.py +69 -7
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/__init__.py +10 -5
- investing_algorithm_framework-6.3.1/investing_algorithm_framework/domain/data_provider.py +172 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/exceptions.py +17 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/backtesting/backtest_report.py +129 -12
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/order/order.py +22 -0
- {investing_algorithm_framework-6.3.0 → 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.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/__init__.py +6 -2
- {investing_algorithm_framework-6.3.0 → 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.3.0 → 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.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/market_service/ccxt_market_service.py +1 -1
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/__init__.py +2 -1
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/market_credential_service.py +8 -1
- {investing_algorithm_framework-6.3.0 → 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.3.0 → 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.3.0 → investing_algorithm_framework-6.3.1}/pyproject.toml +2 -2
- investing_algorithm_framework-6.3.0/investing_algorithm_framework/domain/singleton.py +0 -9
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/LICENSE +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/algorithm.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/context.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/stateless/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/stateless/action_handlers/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/stateless/action_handlers/action_handler_strategy.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/stateless/action_handlers/check_online_handler.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/stateless/action_handlers/run_strategy_handler.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/stateless/exception_handler.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/strategy.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/task.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/controllers/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/controllers/orders.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/controllers/portfolio.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/controllers/positions.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/create_app.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/error_handler.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/responses.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/run_strategies.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/schemas/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/schemas/order.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/schemas/portfolio.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/schemas/position.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/app/web/setup_cors.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/cli.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/deploy_to_azure_function.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/initialize_app.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/.gitignore.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/app-web.py.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/app.py.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/app_azure_function.py.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/app_web.py.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/azure_function_function_app.py.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/azure_function_host.json.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/azure_function_local.settings.json.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/data_providers.py.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/env.example.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/env_azure_function.example.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/market_data_providers.py.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/readme.md.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/requirements.txt.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/requirements_azure_function.txt.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/run_backtest.py.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/cli/templates/strategy.py.template +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/create_app.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/dependency_container.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/config.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/constants.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/data_structures.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/decimal_parsing.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/metrics/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/metrics/price_efficiency.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/app_mode.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/backtesting/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/backtesting/backtest_date_range.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/backtesting/backtest_position.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/backtesting/backtest_reports_evaluation.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/base_model.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/date_range.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/market/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/market/market_credential.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/market_data_type.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/order/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/order/order_side.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/order/order_status.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/order/order_type.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/portfolio/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/portfolio/portfolio.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/portfolio/portfolio_configuration.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/portfolio/portfolio_snapshot.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/position/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/position/position.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/position/position_snapshot.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/strategy_profile.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/time_frame.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/time_interval.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/time_unit.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/tracing/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/tracing/trace.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/trade.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/trade_risk_type.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/trade_status.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/trade_stop_loss.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trade/trade_take_profit.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/models/trading_time_frame.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/market_credential_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/market_data_sources.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/market_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/portfolios/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/portfolios/portfolio_sync_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/rounding_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/services/state_handler.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/stateless_actions.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/strategy.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/csv.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/polars.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/random.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/signatures.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/stoppable_thread.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/domain/utils/synchronized.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/database/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/database/sql_alchemy.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/decimal_parser.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/market_data_sources/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/market_data_sources/ccxt.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/market_data_sources/csv.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/market_data_sources/pandas.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/market_data_sources/us_treasury_yield.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/model_extension.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/order/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/order/order.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/order/order_metadata.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/order_trade_association.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/portfolio/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/portfolio/portfolio_snapshot.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/portfolio/sql_portfolio.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/position/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/position/position.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/position/position_snapshot.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/trades/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/trades/trade.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/trades/trade_stop_loss.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/models/trades/trade_take_profit.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/order_metadata_repository.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/order_repository.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/portfolio_repository.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/portfolio_snapshot_repository.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/position_repository.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/position_snapshot_repository.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/repository.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/trade_repository.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/trade_stop_loss_repository.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/repositories/trade_take_profit_repository.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/azure/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/azure/state_handler.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/market_service/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/performance_service/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/performance_service/backtest_performance_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/infrastructure/services/performance_service/performance_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/backtesting/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/backtesting/backtest_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/configuration_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → 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.3.0 → 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.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/order_service/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/order_service/order_backtest_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/order_service/order_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/__init__.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/backtest_portfolio_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/portfolio_configuration_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/portfolio_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/portfolio_snapshot_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/portfolios/portfolio_sync_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/position_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/position_snapshot_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/repository_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/strategy_orchestrator_service.py +0 -0
- {investing_algorithm_framework-6.3.0 → investing_algorithm_framework-6.3.1}/investing_algorithm_framework/services/trade_service/__init__.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: investing-algorithm-framework
|
|
3
|
-
Version: 6.3.
|
|
3
|
+
Version: 6.3.1
|
|
4
4
|
Summary: A framework for creating trading bots
|
|
5
5
|
Author: MDUYN
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -8,7 +8,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
8
8
|
Classifier: Programming Language :: Python :: 3.10
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.11
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.12
|
|
11
|
-
Requires-Dist: Flask (>=
|
|
11
|
+
Requires-Dist: Flask (>=3.1.0)
|
|
12
12
|
Requires-Dist: Flask-Cors (>=3.0.9,<5.0.0)
|
|
13
13
|
Requires-Dist: Flask-Migrate (>=2.6.0)
|
|
14
14
|
Requires-Dist: SQLAlchemy (>=2.0.18)
|
|
@@ -30,31 +30,16 @@ Requires-Dist: tqdm (>=4.66.1)
|
|
|
30
30
|
Requires-Dist: wrapt (>=1.16.0)
|
|
31
31
|
Description-Content-Type: text/markdown
|
|
32
32
|
|
|
33
|
-
<
|
|
34
|
-
<div align="center">
|
|
35
|
-
<h1><a href="https://investing-algorithm-framework.com" target="_blank">Investing Algorithm Framework</a></h4>
|
|
36
|
-
</div>
|
|
37
|
-
<br/>
|
|
38
|
-
|
|
39
|
-
<div align="center">
|
|
40
|
-
<b>Rapidly build and deploy quantitative strategies and trading bots</b>
|
|
41
|
-
</div>
|
|
42
|
-
<br/>
|
|
43
|
-
|
|
44
|
-
<p align="center">
|
|
45
|
-
<a target="_blank" href="https://investing-algorithm-framework.com">View Docs</a>
|
|
46
|
-
<a href="https://investing-algorithm-framework.com/Getting%20Started/installation)">Getting Started</a>
|
|
47
|
-
</p>
|
|
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>
|
|
48
34
|
|
|
49
35
|
---
|
|
50
36
|
|
|
51
|
-
<a href=https://investing-algorithm-framework.com
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
[](https://github.com/SeaQL/sea-orm/stargazers/) If you like what we do, consider starring, sharing and contributing!
|
|
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!
|
|
58
43
|
|
|
59
44
|
## Sponsors
|
|
60
45
|
|
|
@@ -66,66 +51,54 @@ Description-Content-Type: text/markdown
|
|
|
66
51
|
</picture>
|
|
67
52
|
</a>
|
|
68
53
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
- [x]
|
|
73
|
-
- [x]
|
|
74
|
-
- [x]
|
|
75
|
-
- [x]
|
|
76
|
-
- [x]
|
|
77
|
-
- [x]
|
|
78
|
-
- [x]
|
|
79
|
-
- [x]
|
|
80
|
-
- [x]
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
- [ ] **Performance status report via Web UI and telegram(Planned)**: Provide a performance status of your current trades.
|
|
89
|
-
- [ ] **CI/CD integration (Planned)**: Tools for continuous integration and deployment (version tracking, comparison of backtests, automatic deployments).
|
|
90
|
-
- [ ] **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.
|
|
91
|
-
- [ ] **AWS Lambda support (Planned)**: Stateless running for cloud function deployments in AWS.
|
|
92
|
-
- [ ] **Azure App services support (Planned)**: deployments in Azure app services with Web UI.
|
|
93
|
-
|
|
94
|
-
## Quickstart
|
|
95
|
-
|
|
96
|
-
1. First install the framework using `pip`. The Investing Algorithm Framework is hosted on [PyPi](https://pypi.org/project/Blankly/).
|
|
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].
|
|
97
73
|
|
|
98
74
|
```bash
|
|
99
|
-
|
|
75
|
+
pip install investing-algorithm-framework
|
|
100
76
|
```
|
|
101
77
|
|
|
102
|
-
|
|
78
|
+
Run the following command to set up your project:
|
|
103
79
|
|
|
104
80
|
```bash
|
|
105
|
-
|
|
81
|
+
investing-algorithm-framewor init
|
|
106
82
|
```
|
|
107
83
|
|
|
108
|
-
|
|
84
|
+
For a web-enabled version:
|
|
109
85
|
|
|
110
86
|
```bash
|
|
111
|
-
|
|
87
|
+
investing-algorithm-framework init --web
|
|
112
88
|
```
|
|
113
|
-
> You can always change the app to the web version by changing the `app.py` file.
|
|
114
|
-
|
|
115
|
-
The command will create the file `app.py` and an example script called `strategy.py`.
|
|
116
89
|
|
|
117
|
-
|
|
90
|
+
This will create:
|
|
118
91
|
|
|
119
|
-
|
|
92
|
+
* app.py: The entry point for your bot.
|
|
93
|
+
* strategy.py: A sample strategy file to get started.
|
|
120
94
|
|
|
121
|
-
>
|
|
122
|
-
> You can change the
|
|
123
|
-
> The framework will automatically pick up the files in the working directory.
|
|
124
|
-
```
|
|
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.
|
|
125
97
|
|
|
126
|
-
|
|
98
|
+
---
|
|
127
99
|
|
|
128
|
-
|
|
100
|
+
## 📈 Example: A Simple Trading Bot
|
|
101
|
+
The following example connects to Binance and buys BTC every 2 hours.
|
|
129
102
|
|
|
130
103
|
```python
|
|
131
104
|
import logging.config
|
|
@@ -189,7 +162,7 @@ if __name__ == "__main__":
|
|
|
189
162
|
|
|
190
163
|
> You can find more examples [here](./examples) folder.
|
|
191
164
|
|
|
192
|
-
## Backtesting
|
|
165
|
+
## 🔍 Backtesting
|
|
193
166
|
|
|
194
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.
|
|
195
168
|
|
|
@@ -302,45 +275,38 @@ Take profits overview
|
|
|
302
275
|
╰────────────────────┴───────────────┴──────────┴──────────┴─────────────────────────────────────┴──────────────┴────────────────┴─────────────────────────────────┴──────────────┴─────────────┴───────────────╯
|
|
303
276
|
```
|
|
304
277
|
|
|
305
|
-
|
|
278
|
+
## 🌐 Deployment to Azure
|
|
306
279
|
|
|
307
|
-
|
|
308
|
-
compare multiple algorithms and evaluate their performance. Ideally,
|
|
309
|
-
you would do this by parameterizing your strategy and creating a factory function that
|
|
310
|
-
creates the algorithm with the different parameters. You can find an example of this
|
|
311
|
-
in the [backtest experiments example](./examples/backtest_experiment).
|
|
280
|
+
Prerequisites
|
|
312
281
|
|
|
313
|
-
|
|
282
|
+
Ensure Azure Functions Core Tools are installed:
|
|
314
283
|
|
|
315
|
-
|
|
316
|
-
|
|
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:
|
|
317
289
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
app.add_market_credential(
|
|
323
|
-
MarketCredential(
|
|
324
|
-
market="<your market>",
|
|
325
|
-
api_key="<your api key>",
|
|
326
|
-
secret_key="<your secret key>",
|
|
327
|
-
)
|
|
328
|
-
)
|
|
329
|
-
app.add_portfolio_configuration(
|
|
330
|
-
PortfolioConfiguration(
|
|
331
|
-
market="<your market>",
|
|
332
|
-
initial_balance=400,
|
|
333
|
-
trading_symbol="EUR"
|
|
334
|
-
)
|
|
335
|
-
)
|
|
290
|
+
This script:
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
investing-algorithm-framework deploy
|
|
336
294
|
```
|
|
337
295
|
|
|
338
|
-
|
|
296
|
+
This script:
|
|
297
|
+
|
|
298
|
+
* Creates Azure resources (e.g., storage accounts, function apps).
|
|
299
|
+
* Sets environment variables for the Azure Function.
|
|
300
|
+
* Deploys your bot to Azure.
|
|
339
301
|
|
|
340
|
-
|
|
341
|
-
|
|
302
|
+
## 📚 Documentation
|
|
303
|
+
Comprehensive documentation is available at [investing-algorithm-framework.com](https://investing-algorithm-framework.com).
|
|
342
304
|
|
|
343
|
-
##
|
|
305
|
+
## 🛠️ Development
|
|
306
|
+
|
|
307
|
+
Local Development
|
|
308
|
+
|
|
309
|
+
Clone the repository and install dependencies using Poetry:
|
|
344
310
|
|
|
345
311
|
The framework is built with poetry. To install the framework for local development, you can run the following commands:
|
|
346
312
|
|
|
@@ -361,11 +327,11 @@ To run the tests, you can run the following command:
|
|
|
361
327
|
python -m unittest discover -s tests
|
|
362
328
|
```
|
|
363
329
|
|
|
364
|
-
## Disclaimer
|
|
330
|
+
## ⚠️ Disclaimer
|
|
331
|
+
|
|
365
332
|
|
|
366
333
|
If you use this framework for your investments, do not risk money
|
|
367
|
-
which you are afraid to lose, until you have clear understanding how
|
|
368
|
-
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:
|
|
369
335
|
|
|
370
336
|
BEFORE YOU START USING MONEY WITH THE FRAMEWORK, MAKE SURE THAT YOU TESTED
|
|
371
337
|
YOUR COMPONENTS THOROUGHLY. USE THE SOFTWARE AT YOUR OWN RISK.
|
|
@@ -374,6 +340,8 @@ THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR INVESTMENT RESU
|
|
|
374
340
|
Also, make sure that you read the source code of any plugin you use or
|
|
375
341
|
implementation of an algorithm made with this framework.
|
|
376
342
|
|
|
343
|
+
We welcome contributions! Check out the project board and issues to get started.
|
|
344
|
+
|
|
377
345
|
## Documentation
|
|
378
346
|
|
|
379
347
|
All the documentation can be found online
|
|
@@ -386,17 +354,7 @@ contributing page at the website.
|
|
|
386
354
|
If you'd like to chat with investing-algorithm-framework users
|
|
387
355
|
and developers, [join us on Slack](https://inv-algo-framework.slack.com) or [join us on reddit](https://www.reddit.com/r/InvestingBots/)
|
|
388
356
|
|
|
389
|
-
##
|
|
390
|
-
|
|
391
|
-
We want to thank all contributors to this project. A full list of all the people that contributed to the project can be
|
|
392
|
-
found [here](https://github.com/investing-algorithms/investing-algorithm-framework/blob/master/AUTHORS.md)
|
|
393
|
-
|
|
394
|
-
### [Bugs / Issues](https://github.com/investing-algorithms/investing-algorithm-framework/issues?q=is%3Aissue)
|
|
395
|
-
|
|
396
|
-
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)
|
|
397
|
-
first. If it hasn't been reported, please [create a new issue](https://github.com/investing-algorithms/investing-algorithm-framework/issues/new).
|
|
398
|
-
|
|
399
|
-
### Contributing
|
|
357
|
+
## 🤝 Contributing
|
|
400
358
|
|
|
401
359
|
The investing algorithm framework is a community driven project.
|
|
402
360
|
We welcome you to participate, contribute and together help build the future trading bots developed in python.
|
|
@@ -409,3 +367,20 @@ You can pick up a task by assigning yourself to it.
|
|
|
409
367
|
This will ensure that interested parties can give valuable feedback on the feature, and let others know that you are working on it.
|
|
410
368
|
|
|
411
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,28 +1,13 @@
|
|
|
1
|
-
<
|
|
2
|
-
<div align="center">
|
|
3
|
-
<h1><a href="https://investing-algorithm-framework.com" target="_blank">Investing Algorithm Framework</a></h4>
|
|
4
|
-
</div>
|
|
5
|
-
<br/>
|
|
6
|
-
|
|
7
|
-
<div align="center">
|
|
8
|
-
<b>Rapidly build and deploy quantitative strategies and trading bots</b>
|
|
9
|
-
</div>
|
|
10
|
-
<br/>
|
|
11
|
-
|
|
12
|
-
<p align="center">
|
|
13
|
-
<a target="_blank" href="https://investing-algorithm-framework.com">View Docs</a>
|
|
14
|
-
<a href="https://investing-algorithm-framework.com/Getting%20Started/installation)">Getting Started</a>
|
|
15
|
-
</p>
|
|
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>
|
|
16
2
|
|
|
17
3
|
---
|
|
18
4
|
|
|
19
|
-
<a href=https://investing-algorithm-framework.com
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
[](https://github.com/SeaQL/sea-orm/stargazers/) If you like what we do, consider starring, sharing and contributing!
|
|
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!
|
|
26
11
|
|
|
27
12
|
## Sponsors
|
|
28
13
|
|
|
@@ -34,66 +19,54 @@
|
|
|
34
19
|
</picture>
|
|
35
20
|
</a>
|
|
36
21
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- [x]
|
|
41
|
-
- [x]
|
|
42
|
-
- [x]
|
|
43
|
-
- [x]
|
|
44
|
-
- [x]
|
|
45
|
-
- [x]
|
|
46
|
-
- [x]
|
|
47
|
-
- [x]
|
|
48
|
-
- [x]
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- [ ] **Performance status report via Web UI and telegram(Planned)**: Provide a performance status of your current trades.
|
|
57
|
-
- [ ] **CI/CD integration (Planned)**: Tools for continuous integration and deployment (version tracking, comparison of backtests, automatic deployments).
|
|
58
|
-
- [ ] **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.
|
|
59
|
-
- [ ] **AWS Lambda support (Planned)**: Stateless running for cloud function deployments in AWS.
|
|
60
|
-
- [ ] **Azure App services support (Planned)**: deployments in Azure app services with Web UI.
|
|
61
|
-
|
|
62
|
-
## Quickstart
|
|
63
|
-
|
|
64
|
-
1. First install the framework using `pip`. The Investing Algorithm Framework is hosted on [PyPi](https://pypi.org/project/Blankly/).
|
|
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].
|
|
65
41
|
|
|
66
42
|
```bash
|
|
67
|
-
|
|
43
|
+
pip install investing-algorithm-framework
|
|
68
44
|
```
|
|
69
45
|
|
|
70
|
-
|
|
46
|
+
Run the following command to set up your project:
|
|
71
47
|
|
|
72
48
|
```bash
|
|
73
|
-
|
|
49
|
+
investing-algorithm-framewor init
|
|
74
50
|
```
|
|
75
51
|
|
|
76
|
-
|
|
52
|
+
For a web-enabled version:
|
|
77
53
|
|
|
78
54
|
```bash
|
|
79
|
-
|
|
55
|
+
investing-algorithm-framework init --web
|
|
80
56
|
```
|
|
81
|
-
> You can always change the app to the web version by changing the `app.py` file.
|
|
82
57
|
|
|
83
|
-
|
|
58
|
+
This will create:
|
|
84
59
|
|
|
85
|
-
|
|
60
|
+
* app.py: The entry point for your bot.
|
|
61
|
+
* strategy.py: A sample strategy file to get started.
|
|
86
62
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
> Make sure you leave the `app.py` file as is, as it is the entry point for the framework.
|
|
90
|
-
> You can change the `bot.py` file to your liking and add other files to the working directory.
|
|
91
|
-
> The framework will automatically pick up the files in the working directory.
|
|
92
|
-
```
|
|
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.
|
|
93
65
|
|
|
94
|
-
|
|
66
|
+
---
|
|
95
67
|
|
|
96
|
-
|
|
68
|
+
## 📈 Example: A Simple Trading Bot
|
|
69
|
+
The following example connects to Binance and buys BTC every 2 hours.
|
|
97
70
|
|
|
98
71
|
```python
|
|
99
72
|
import logging.config
|
|
@@ -157,7 +130,7 @@ if __name__ == "__main__":
|
|
|
157
130
|
|
|
158
131
|
> You can find more examples [here](./examples) folder.
|
|
159
132
|
|
|
160
|
-
## Backtesting
|
|
133
|
+
## 🔍 Backtesting
|
|
161
134
|
|
|
162
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.
|
|
163
136
|
|
|
@@ -270,45 +243,38 @@ Take profits overview
|
|
|
270
243
|
╰────────────────────┴───────────────┴──────────┴──────────┴─────────────────────────────────────┴──────────────┴────────────────┴─────────────────────────────────┴──────────────┴─────────────┴───────────────╯
|
|
271
244
|
```
|
|
272
245
|
|
|
273
|
-
|
|
246
|
+
## 🌐 Deployment to Azure
|
|
274
247
|
|
|
275
|
-
|
|
276
|
-
compare multiple algorithms and evaluate their performance. Ideally,
|
|
277
|
-
you would do this by parameterizing your strategy and creating a factory function that
|
|
278
|
-
creates the algorithm with the different parameters. You can find an example of this
|
|
279
|
-
in the [backtest experiments example](./examples/backtest_experiment).
|
|
248
|
+
Prerequisites
|
|
280
249
|
|
|
281
|
-
|
|
250
|
+
Ensure Azure Functions Core Tools are installed:
|
|
282
251
|
|
|
283
|
-
|
|
284
|
-
|
|
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:
|
|
257
|
+
|
|
258
|
+
This script:
|
|
285
259
|
|
|
286
|
-
```python
|
|
287
|
-
from investing_algorithm_framework import PortfolioConfiguration, \
|
|
288
|
-
MarketCredential, create_app
|
|
289
|
-
app = create_app()
|
|
290
|
-
app.add_market_credential(
|
|
291
|
-
MarketCredential(
|
|
292
|
-
market="<your market>",
|
|
293
|
-
api_key="<your api key>",
|
|
294
|
-
secret_key="<your secret key>",
|
|
295
|
-
)
|
|
296
|
-
)
|
|
297
|
-
app.add_portfolio_configuration(
|
|
298
|
-
PortfolioConfiguration(
|
|
299
|
-
market="<your market>",
|
|
300
|
-
initial_balance=400,
|
|
301
|
-
trading_symbol="EUR"
|
|
302
|
-
)
|
|
303
|
-
)
|
|
304
260
|
```
|
|
261
|
+
investing-algorithm-framework deploy
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
This script:
|
|
265
|
+
|
|
266
|
+
* Creates Azure resources (e.g., storage accounts, function apps).
|
|
267
|
+
* Sets environment variables for the Azure Function.
|
|
268
|
+
* Deploys your bot to Azure.
|
|
305
269
|
|
|
306
|
-
##
|
|
270
|
+
## 📚 Documentation
|
|
271
|
+
Comprehensive documentation is available at [investing-algorithm-framework.com](https://investing-algorithm-framework.com).
|
|
307
272
|
|
|
308
|
-
|
|
309
|
-
you have any suggestions, please let us know.
|
|
273
|
+
## 🛠️ Development
|
|
310
274
|
|
|
311
|
-
|
|
275
|
+
Local Development
|
|
276
|
+
|
|
277
|
+
Clone the repository and install dependencies using Poetry:
|
|
312
278
|
|
|
313
279
|
The framework is built with poetry. To install the framework for local development, you can run the following commands:
|
|
314
280
|
|
|
@@ -329,11 +295,11 @@ To run the tests, you can run the following command:
|
|
|
329
295
|
python -m unittest discover -s tests
|
|
330
296
|
```
|
|
331
297
|
|
|
332
|
-
## Disclaimer
|
|
298
|
+
## ⚠️ Disclaimer
|
|
299
|
+
|
|
333
300
|
|
|
334
301
|
If you use this framework for your investments, do not risk money
|
|
335
|
-
which you are afraid to lose, until you have clear understanding how
|
|
336
|
-
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:
|
|
337
303
|
|
|
338
304
|
BEFORE YOU START USING MONEY WITH THE FRAMEWORK, MAKE SURE THAT YOU TESTED
|
|
339
305
|
YOUR COMPONENTS THOROUGHLY. USE THE SOFTWARE AT YOUR OWN RISK.
|
|
@@ -342,6 +308,8 @@ THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR INVESTMENT RESU
|
|
|
342
308
|
Also, make sure that you read the source code of any plugin you use or
|
|
343
309
|
implementation of an algorithm made with this framework.
|
|
344
310
|
|
|
311
|
+
We welcome contributions! Check out the project board and issues to get started.
|
|
312
|
+
|
|
345
313
|
## Documentation
|
|
346
314
|
|
|
347
315
|
All the documentation can be found online
|
|
@@ -354,17 +322,7 @@ contributing page at the website.
|
|
|
354
322
|
If you'd like to chat with investing-algorithm-framework users
|
|
355
323
|
and developers, [join us on Slack](https://inv-algo-framework.slack.com) or [join us on reddit](https://www.reddit.com/r/InvestingBots/)
|
|
356
324
|
|
|
357
|
-
##
|
|
358
|
-
|
|
359
|
-
We want to thank all contributors to this project. A full list of all the people that contributed to the project can be
|
|
360
|
-
found [here](https://github.com/investing-algorithms/investing-algorithm-framework/blob/master/AUTHORS.md)
|
|
361
|
-
|
|
362
|
-
### [Bugs / Issues](https://github.com/investing-algorithms/investing-algorithm-framework/issues?q=is%3Aissue)
|
|
363
|
-
|
|
364
|
-
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)
|
|
365
|
-
first. If it hasn't been reported, please [create a new issue](https://github.com/investing-algorithms/investing-algorithm-framework/issues/new).
|
|
366
|
-
|
|
367
|
-
### Contributing
|
|
325
|
+
## 🤝 Contributing
|
|
368
326
|
|
|
369
327
|
The investing algorithm framework is a community driven project.
|
|
370
328
|
We welcome you to participate, contribute and together help build the future trading bots developed in python.
|
|
@@ -376,4 +334,20 @@ You can pick up a task by assigning yourself to it.
|
|
|
376
334
|
**Note** before starting any major new feature work, *please open an issue describing what you are planning to do*.
|
|
377
335
|
This will ensure that interested parties can give valuable feedback on the feature, and let others know that you are working on it.
|
|
378
336
|
|
|
379
|
-
**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).
|
|
@@ -18,6 +18,7 @@ from investing_algorithm_framework.infrastructure import \
|
|
|
18
18
|
CCXTTickerMarketDataSource, CSVOHLCVMarketDataSource, \
|
|
19
19
|
CSVTickerMarketDataSource, AzureBlobStorageStateHandler
|
|
20
20
|
from .create_app import create_app
|
|
21
|
+
from .download_data import download
|
|
21
22
|
|
|
22
23
|
__all__ = [
|
|
23
24
|
"Algorithm",
|
|
@@ -75,5 +76,6 @@ __all__ = [
|
|
|
75
76
|
"MarketDataType",
|
|
76
77
|
"TradeRiskType",
|
|
77
78
|
"Context",
|
|
78
|
-
"APPLICATION_DIRECTORY"
|
|
79
|
+
"APPLICATION_DIRECTORY",
|
|
80
|
+
"download"
|
|
79
81
|
]
|