investing-algorithm-framework 7.25.2__tar.gz → 7.25.4__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-7.25.2 → investing_algorithm_framework-7.25.4}/PKG-INFO +1 -1
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/__init__.py +15 -7
- investing_algorithm_framework-7.25.4/investing_algorithm_framework/analysis/__init__.py +16 -0
- {investing_algorithm_framework-7.25.2/investing_algorithm_framework/app → investing_algorithm_framework-7.25.4/investing_algorithm_framework}/analysis/backtest_data_ranges.py +16 -107
- investing_algorithm_framework-7.25.4/investing_algorithm_framework/analysis/data.py +161 -0
- investing_algorithm_framework-7.25.4/investing_algorithm_framework/analysis/markdown.py +91 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/__init__.py +0 -6
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/app.py +4 -3
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/strategy.py +83 -39
- investing_algorithm_framework-7.25.4/investing_algorithm_framework/download_data.py +245 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/services/backtesting/backtest_service.py +179 -17
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/pyproject.toml +1 -1
- investing_algorithm_framework-7.25.2/investing_algorithm_framework/app/analysis/__init__.py +0 -13
- investing_algorithm_framework-7.25.2/investing_algorithm_framework/app/analysis/permutation.py +0 -135
- investing_algorithm_framework-7.25.2/investing_algorithm_framework/download_data.py +0 -108
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/LICENSE +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/README.md +0 -0
- {investing_algorithm_framework-7.25.2/investing_algorithm_framework/app → investing_algorithm_framework-7.25.4/investing_algorithm_framework}/analysis/ranking.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/algorithm/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/algorithm/algorithm.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/algorithm/algorithm_factory.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/app_hook.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/context.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/eventloop.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/ascii.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/backtest_report.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/charts/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/charts/entry_exist_signals.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/charts/equity_curve.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/charts/equity_curve_drawdown.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/charts/line_chart.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/charts/monthly_returns_heatmap.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/charts/ohlcv_data_completeness.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/charts/rolling_sharp_ratio.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/charts/yearly_returns_barchart.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/generate.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/tables/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/tables/key_metrics_table.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/tables/stop_loss_table.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/tables/time_metrics_table.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/tables/trade_metrics_table.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/tables/trades_table.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/tables/utils.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/reporting/templates/report_template.html.j2 +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/stateless/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/stateless/action_handlers/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/stateless/action_handlers/action_handler_strategy.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/stateless/action_handlers/check_online_handler.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/stateless/action_handlers/run_strategy_handler.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/stateless/exception_handler.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/task.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/web/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/web/controllers/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/web/controllers/orders.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/web/controllers/portfolio.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/web/controllers/positions.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/web/create_app.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/web/error_handler.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/web/responses.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/web/run_strategies.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/web/schemas/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/web/schemas/order.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/web/schemas/portfolio.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/web/schemas/position.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/app/web/setup_cors.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/cli.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/deploy_to_aws_lambda.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/deploy_to_azure_function.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/initialize_app.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/.gitignore.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/app.py.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/app_aws_lambda_function.py.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/app_azure_function.py.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/app_web.py.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/aws_lambda_dockerfile.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/aws_lambda_dockerignore.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/aws_lambda_readme.md.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/aws_lambda_requirements.txt.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/azure_function_function_app.py.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/azure_function_host.json.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/azure_function_local.settings.json.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/azure_function_requirements.txt.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/data_providers.py.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/env.example.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/env_azure_function.example.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/market_data_providers.py.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/readme.md.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/requirements.txt.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/run_backtest.py.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/templates/strategy.py.template +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/cli/validate_backtest_checkpoints.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/create_app.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/dependency_container.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/algorithm_id.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/backtesting/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/backtesting/backtest.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/backtesting/backtest_date_range.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/backtesting/backtest_evaluation_focuss.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/backtesting/backtest_metrics.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/backtesting/backtest_permutation_test.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/backtesting/backtest_run.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/backtesting/backtest_summary_metrics.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/backtesting/backtest_utils.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/backtesting/combine_backtests.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/config.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/constants.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/data_provider.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/data_structures.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/decimal_parsing.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/exceptions.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/app_mode.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/base_model.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/data/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/data/data_source.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/data/data_type.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/event.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/market/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/market/market_credential.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/order/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/order/order.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/order/order_side.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/order/order_status.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/order/order_type.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/portfolio/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/portfolio/portfolio.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/portfolio/portfolio_configuration.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/portfolio/portfolio_snapshot.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/position/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/position/position.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/position/position_size.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/position/position_snapshot.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/risk_rules/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/risk_rules/stop_loss_rule.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/risk_rules/take_profit_rule.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/snapshot_interval.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/strategy_profile.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/time_frame.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/time_interval.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/time_unit.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/tracing/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/tracing/trace.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/trade/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/trade/trade.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/trade/trade_status.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/trade/trade_stop_loss.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/models/trade/trade_take_profit.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/order_executor.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/portfolio_provider.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/services/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/services/market_credential_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/services/portfolios/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/services/portfolios/portfolio_sync_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/services/rounding_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/services/state_handler.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/stateless_actions.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/strategy.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/utils/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/utils/csv.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/utils/custom_tqdm.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/utils/dates.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/utils/jupyter_notebook_detection.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/utils/polars.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/utils/random.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/utils/signatures.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/utils/stoppable_thread.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/domain/utils/synchronized.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/data_providers/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/data_providers/ccxt.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/data_providers/csv.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/data_providers/pandas.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/database/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/database/sql_alchemy.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/decimal_parser.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/model_extension.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/order/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/order/order.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/order/order_metadata.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/order_trade_association.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/portfolio/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/portfolio/portfolio_snapshot.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/portfolio/sql_portfolio.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/position/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/position/position.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/position/position_snapshot.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/trades/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/trades/trade.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/trades/trade_stop_loss.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/models/trades/trade_take_profit.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/order_executors/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/order_executors/backtest_oder_executor.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/order_executors/ccxt_order_executor.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/portfolio_providers/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/portfolio_providers/ccxt_portfolio_provider.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/repositories/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/repositories/order_metadata_repository.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/repositories/order_repository.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/repositories/portfolio_repository.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/repositories/portfolio_snapshot_repository.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/repositories/position_repository.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/repositories/position_snapshot_repository.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/repositories/repository.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/repositories/trade_repository.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/repositories/trade_stop_loss_repository.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/repositories/trade_take_profit_repository.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/services/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/services/aws/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/services/aws/state_handler.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/services/azure/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/services/azure/state_handler.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/services/backtesting/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/services/backtesting/event_backtest_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/infrastructure/services/backtesting/vector_backtest_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/configuration_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/data_providers/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/data_providers/data_provider_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/market_credential_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/alpha.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/beta.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/cagr.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/calmar_ratio.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/drawdown.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/equity_curve.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/exposure.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/generate.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/mean_daily_return.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/price_efficiency.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/profit_factor.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/recovery.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/returns.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/risk_free_rate.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/sharpe_ratio.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/sortino_ratio.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/standard_deviation.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/trades.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/treynor_ratio.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/ulcer.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/value_at_risk.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/volatility.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/metrics/win_rate.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/order_service/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/order_service/order_backtest_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/order_service/order_executor_lookup.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/order_service/order_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/portfolios/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/portfolios/backtest_portfolio_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/portfolios/portfolio_configuration_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/portfolios/portfolio_provider_lookup.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/portfolios/portfolio_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/portfolios/portfolio_snapshot_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/portfolios/portfolio_sync_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/positions/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/positions/position_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/positions/position_snapshot_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/repository_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/trade_order_evaluator/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/trade_order_evaluator/backtest_trade_oder_evaluator.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/trade_order_evaluator/default_trade_order_evaluator.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/trade_order_evaluator/trade_order_evaluator.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/trade_service/__init__.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/trade_service/trade_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/trade_service/trade_stop_loss_service.py +0 -0
- {investing_algorithm_framework-7.25.2 → investing_algorithm_framework-7.25.4}/investing_algorithm_framework/services/trade_service/trade_take_profit_service.py +0 -0
|
@@ -1,15 +1,18 @@
|
|
|
1
|
+
from .analysis import generate_rolling_backtest_windows, \
|
|
2
|
+
select_backtest_date_ranges, rank_results, create_weights, \
|
|
3
|
+
get_missing_timeseries_data_entries, fill_missing_timeseries_data, \
|
|
4
|
+
create_markdown_table
|
|
1
5
|
from .app import App, Algorithm, \
|
|
2
6
|
TradingStrategy, StatelessAction, Task, AppHook, Context, \
|
|
3
|
-
add_html_report, BacktestReport,
|
|
7
|
+
add_html_report, BacktestReport, \
|
|
4
8
|
pretty_print_trades, pretty_print_positions, \
|
|
5
|
-
pretty_print_orders, pretty_print_backtest,
|
|
9
|
+
pretty_print_orders, pretty_print_backtest, \
|
|
6
10
|
get_equity_curve_with_drawdown_chart, \
|
|
7
|
-
get_rolling_sharpe_ratio_chart,
|
|
8
|
-
get_monthly_returns_heatmap_chart, create_weights, \
|
|
11
|
+
get_rolling_sharpe_ratio_chart, get_monthly_returns_heatmap_chart, \
|
|
9
12
|
get_yearly_returns_bar_chart, get_entry_and_exit_signals, \
|
|
10
13
|
get_ohlcv_data_completeness_chart, get_equity_curve_chart
|
|
11
14
|
from .domain import ApiException, combine_backtests, PositionSize, \
|
|
12
|
-
OrderType, OperationalException, OrderStatus, OrderSide, \
|
|
15
|
+
OrderType, OperationalException, OrderStatus, OrderSide, tqdm, \
|
|
13
16
|
TimeUnit, TimeInterval, Order, Portfolio, Backtest, DataError, \
|
|
14
17
|
Position, TimeFrame, INDEX_DATETIME, MarketCredential, TakeProfitRule, \
|
|
15
18
|
PortfolioConfiguration, RESOURCE_DIRECTORY, AWS_LAMBDA_LOGGING_CONFIG, \
|
|
@@ -24,7 +27,8 @@ from .infrastructure import AzureBlobStorageStateHandler, \
|
|
|
24
27
|
CSVOHLCVDataProvider, CCXTOHLCVDataProvider, PandasOHLCVDataProvider, \
|
|
25
28
|
AWSS3StorageStateHandler
|
|
26
29
|
from .create_app import create_app
|
|
27
|
-
from .download_data import download
|
|
30
|
+
from .download_data import download, download_v2, DownloadResult, \
|
|
31
|
+
create_data_storage_path
|
|
28
32
|
from .services import get_annual_volatility, get_sortino_ratio, \
|
|
29
33
|
get_drawdown_series, get_max_drawdown, get_equity_curve, \
|
|
30
34
|
get_price_efficiency_ratio, get_sharpe_ratio, \
|
|
@@ -199,5 +203,9 @@ __all__ = [
|
|
|
199
203
|
"TradeTakeProfitService",
|
|
200
204
|
"generate_algorithm_id",
|
|
201
205
|
"BacktestMetrics",
|
|
202
|
-
"generate_rolling_backtest_windows"
|
|
206
|
+
"generate_rolling_backtest_windows",
|
|
207
|
+
"tqdm",
|
|
208
|
+
"get_missing_timeseries_data_entries",
|
|
209
|
+
"fill_missing_timeseries_data",
|
|
210
|
+
"create_markdown_table"
|
|
203
211
|
]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from .markdown import create_markdown_table
|
|
2
|
+
from .backtest_data_ranges import select_backtest_date_ranges, \
|
|
3
|
+
generate_rolling_backtest_windows
|
|
4
|
+
from .ranking import create_weights, rank_results
|
|
5
|
+
from .data import fill_missing_timeseries_data, \
|
|
6
|
+
get_missing_timeseries_data_entries
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"create_markdown_table",
|
|
10
|
+
"select_backtest_date_ranges",
|
|
11
|
+
"generate_rolling_backtest_windows",
|
|
12
|
+
"create_weights",
|
|
13
|
+
"rank_results",
|
|
14
|
+
"fill_missing_timeseries_data",
|
|
15
|
+
"get_missing_timeseries_data_entries",
|
|
16
|
+
]
|
|
@@ -126,68 +126,47 @@ def select_backtest_date_ranges(
|
|
|
126
126
|
|
|
127
127
|
|
|
128
128
|
def generate_rolling_backtest_windows(
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
start_date: datetime = None,
|
|
132
|
-
end_date: datetime = None,
|
|
129
|
+
start_date: datetime,
|
|
130
|
+
end_date: datetime,
|
|
133
131
|
train_days: int = 365,
|
|
134
132
|
test_days: int = 90,
|
|
135
133
|
step_days: int = 90,
|
|
136
134
|
gap_days: int = 0,
|
|
137
|
-
|
|
138
|
-
) -> List[Dict[str, any]]:
|
|
135
|
+
) -> List[Dict[str, BacktestDateRange]]:
|
|
139
136
|
"""
|
|
140
|
-
Generate rolling
|
|
137
|
+
Generate rolling windows for walk-forward backtesting.
|
|
141
138
|
|
|
142
|
-
This function creates training and testing
|
|
143
|
-
time-series backtesting,
|
|
144
|
-
|
|
145
|
-
performance estimates.
|
|
139
|
+
This function creates training and testing date ranges for
|
|
140
|
+
time-series backtesting, avoiding look-ahead bias and providing
|
|
141
|
+
realistic out-of-sample performance estimates.
|
|
146
142
|
|
|
147
143
|
Args:
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
start_date (datetime, optional): The starting date for the first
|
|
153
|
-
training window. Defaults to the earliest date in the data.
|
|
154
|
-
end_date (datetime, optional): The ending date for the last
|
|
155
|
-
testing window. Defaults to the latest date in the data.
|
|
144
|
+
start_date (datetime): The starting date for the first
|
|
145
|
+
training window.
|
|
146
|
+
end_date (datetime): The ending date for the last
|
|
147
|
+
testing window.
|
|
156
148
|
train_days (int): Number of days in the training window.
|
|
157
149
|
test_days (int): Number of days in the testing window.
|
|
158
150
|
step_days (int): Number of days to step forward for the next window.
|
|
159
151
|
gap_days (int): Number of days to skip between train and test windows.
|
|
160
152
|
Useful to avoid look-ahead bias in indicators
|
|
161
153
|
with lag (e.g., 26 for MACD). Default is 0 (no gap).
|
|
162
|
-
min_data_threshold (float): Minimum fraction of expected data required.
|
|
163
|
-
Windows with less data than (train_days * threshold)
|
|
164
|
-
or (test_days * threshold) will be skipped. Default is 0.8 (80%).
|
|
165
154
|
|
|
166
155
|
Returns:
|
|
167
|
-
List[Dict[str,
|
|
156
|
+
List[Dict[str, BacktestDateRange]]: A list of dictionaries containing:
|
|
168
157
|
- "train_range": BacktestDateRange for training period
|
|
169
158
|
- "test_range": BacktestDateRange for testing period
|
|
170
|
-
- "train_data": DataFrame for training period
|
|
171
|
-
- "test_data": DataFrame for testing period
|
|
172
|
-
- "metadata": Dictionary with window statistics
|
|
173
159
|
|
|
174
160
|
Example:
|
|
175
161
|
>>> windows = generate_rolling_backtest_windows(
|
|
176
|
-
...
|
|
177
|
-
...
|
|
178
|
-
... end_date=datetime(2024, 12, 31),
|
|
162
|
+
... start_date=datetime(2021, 1, 1, tzinfo=timezone.utc),
|
|
163
|
+
... end_date=datetime(2024, 12, 31, tzinfo=timezone.utc),
|
|
179
164
|
... train_days=365,
|
|
180
165
|
... test_days=90,
|
|
181
166
|
... step_days=90,
|
|
182
|
-
... window_type="expanding",
|
|
183
167
|
... gap_days=30
|
|
184
168
|
... )
|
|
185
169
|
"""
|
|
186
|
-
if start_date is None:
|
|
187
|
-
start_date = data.index.min()
|
|
188
|
-
if end_date is None:
|
|
189
|
-
end_date = data.index.max()
|
|
190
|
-
|
|
191
170
|
windows = []
|
|
192
171
|
current_start = start_date
|
|
193
172
|
max_iterations = 10000 # Safety limit to prevent infinite loops
|
|
@@ -203,89 +182,19 @@ def generate_rolling_backtest_windows(
|
|
|
203
182
|
if test_end > end_date:
|
|
204
183
|
break
|
|
205
184
|
|
|
206
|
-
if window_type == "expanding":
|
|
207
|
-
# Train on ALL data from start_date to train_end (growing window)
|
|
208
|
-
train_data = data[(data.index >= start_date)
|
|
209
|
-
& (data.index < train_end)]
|
|
210
|
-
else:
|
|
211
|
-
# Current implementation (fixed window)
|
|
212
|
-
train_data = data[(data.index >= train_start)
|
|
213
|
-
& (data.index < train_end)]
|
|
214
|
-
|
|
215
|
-
test_data = data[(data.index >= test_start) & (data.index < test_end)]
|
|
216
|
-
|
|
217
|
-
# Validate minimum data threshold
|
|
218
|
-
min_train_records = int(train_days * min_data_threshold)
|
|
219
|
-
min_test_records = int(test_days * min_data_threshold)
|
|
220
|
-
|
|
221
|
-
if len(train_data) < min_train_records:
|
|
222
|
-
logger.warning(
|
|
223
|
-
f"Skipping window starting {train_start.date()}: "
|
|
224
|
-
f"train data ({len(train_data)} records) "
|
|
225
|
-
f"below threshold ({min_train_records})"
|
|
226
|
-
)
|
|
227
|
-
current_start += pd.Timedelta(days=step_days)
|
|
228
|
-
continue
|
|
229
|
-
|
|
230
|
-
if len(test_data) < min_test_records:
|
|
231
|
-
logger.warning(
|
|
232
|
-
f"Skipping window starting {train_start.date()}: "
|
|
233
|
-
f"test data ({len(test_data)} records) "
|
|
234
|
-
f"below threshold ({min_test_records})"
|
|
235
|
-
)
|
|
236
|
-
current_start += pd.Timedelta(days=step_days)
|
|
237
|
-
continue
|
|
238
|
-
|
|
239
|
-
# Calculate metadata
|
|
240
|
-
train_actual_start = train_data.index.min() \
|
|
241
|
-
if len(train_data) > 0 else train_start
|
|
242
|
-
train_actual_end = train_data.index.max() \
|
|
243
|
-
if len(train_data) > 0 else train_end
|
|
244
|
-
test_actual_start = test_data.index.min() \
|
|
245
|
-
if len(test_data) > 0 else test_start
|
|
246
|
-
test_actual_end = test_data.index.max() \
|
|
247
|
-
if len(test_data) > 0 else test_end
|
|
248
|
-
|
|
249
|
-
metadata = {
|
|
250
|
-
"train_days_actual": len(train_data),
|
|
251
|
-
"test_days_actual": len(test_data),
|
|
252
|
-
"train_days_expected": train_days,
|
|
253
|
-
"test_days_expected": test_days,
|
|
254
|
-
"gap_days": gap_days,
|
|
255
|
-
"train_actual_start": train_actual_start,
|
|
256
|
-
"train_actual_end": train_actual_end,
|
|
257
|
-
"test_actual_start": test_actual_start,
|
|
258
|
-
"test_actual_end": test_actual_end,
|
|
259
|
-
"window_type": window_type
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
# Calculate returns if close price exists
|
|
263
|
-
if 'close' in train_data.columns and len(train_data) > 1:
|
|
264
|
-
metadata["train_return"] = (train_data['close'].iloc[-1]
|
|
265
|
-
/ train_data['close'].iloc[0]) - 1
|
|
266
|
-
else:
|
|
267
|
-
metadata["train_return"] = None
|
|
268
|
-
|
|
269
|
-
if 'close' in test_data.columns and len(test_data) > 1:
|
|
270
|
-
metadata["test_return"] = (test_data['close'].iloc[-1]
|
|
271
|
-
/ test_data['close'].iloc[0]) - 1
|
|
272
|
-
else:
|
|
273
|
-
metadata["test_return"] = None
|
|
274
|
-
|
|
275
185
|
train_backtest_date_range = BacktestDateRange(
|
|
276
|
-
name=f"
|
|
186
|
+
name=f"train_window_{iteration}",
|
|
277
187
|
start_date=train_start,
|
|
278
188
|
end_date=train_end
|
|
279
189
|
)
|
|
280
190
|
test_backtest_date_range = BacktestDateRange(
|
|
281
|
-
name=f"
|
|
191
|
+
name=f"test_window_{iteration}",
|
|
282
192
|
start_date=test_start,
|
|
283
193
|
end_date=test_end
|
|
284
194
|
)
|
|
285
195
|
windows.append({
|
|
286
196
|
"train_range": train_backtest_date_range,
|
|
287
197
|
"test_range": test_backtest_date_range,
|
|
288
|
-
"metadata": metadata
|
|
289
198
|
})
|
|
290
199
|
|
|
291
200
|
current_start += pd.Timedelta(days=step_days)
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import pandas as pd
|
|
2
|
+
import polars as pl
|
|
3
|
+
from typing import Union
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def fill_missing_timeseries_data(
|
|
7
|
+
data: Union[pd.DataFrame, pl.DataFrame, str],
|
|
8
|
+
missing_dates: list = None,
|
|
9
|
+
start_date=None,
|
|
10
|
+
end_date=None,
|
|
11
|
+
save_to_file: bool = False,
|
|
12
|
+
file_path: str = None
|
|
13
|
+
) -> Union[pd.DataFrame, pl.DataFrame]:
|
|
14
|
+
"""
|
|
15
|
+
Fill missing dates in time-series data using a hybrid approach:
|
|
16
|
+
forward-fill by default, backward-fill only when missing dates
|
|
17
|
+
are at the start of the data.
|
|
18
|
+
|
|
19
|
+
This function handles missing rows (dates) in time-series data,
|
|
20
|
+
not just missing values within existing rows. All columns are
|
|
21
|
+
duplicated from the adjacent row.
|
|
22
|
+
|
|
23
|
+
Args:
|
|
24
|
+
data (pd.DataFrame | pl.DataFrame | str): Time-series data as a
|
|
25
|
+
DataFrame or path to a CSV file. Index should be datetime.
|
|
26
|
+
missing_dates (list, optional): List of datetime objects representing
|
|
27
|
+
specific missing dates to fill. If None and start_date/end_date
|
|
28
|
+
are provided, missing dates will be auto-detected.
|
|
29
|
+
start_date (datetime, optional): Start date to check for missing dates.
|
|
30
|
+
end_date (datetime, optional): End date to check for missing dates.
|
|
31
|
+
save_to_file (bool): If True, save the result back to the CSV file.
|
|
32
|
+
file_path (str, optional): Path to save/load the CSV file.
|
|
33
|
+
|
|
34
|
+
Returns:
|
|
35
|
+
pd.DataFrame | pl.DataFrame: DataFrame with missing dates filled.
|
|
36
|
+
"""
|
|
37
|
+
is_polars = False
|
|
38
|
+
|
|
39
|
+
# Load data if file path is provided
|
|
40
|
+
if isinstance(data, str):
|
|
41
|
+
file_path = data
|
|
42
|
+
df = pd.read_csv(file_path, index_col=0, parse_dates=True)
|
|
43
|
+
elif isinstance(data, pl.DataFrame):
|
|
44
|
+
is_polars = True
|
|
45
|
+
# Convert polars to pandas for processing
|
|
46
|
+
df = data.to_pandas()
|
|
47
|
+
if 'Datetime' in df.columns:
|
|
48
|
+
df = df.set_index('Datetime')
|
|
49
|
+
df.index = pd.to_datetime(df.index)
|
|
50
|
+
else:
|
|
51
|
+
df = data.copy()
|
|
52
|
+
|
|
53
|
+
# Store the index name
|
|
54
|
+
index_name = df.index.name if df.index.name else 'Datetime'
|
|
55
|
+
|
|
56
|
+
rows_to_add = []
|
|
57
|
+
|
|
58
|
+
# Determine which dates need to be filled
|
|
59
|
+
if missing_dates is not None and len(missing_dates) > 0:
|
|
60
|
+
dates_to_fill = [d for d in missing_dates if d not in df.index]
|
|
61
|
+
elif start_date is not None and end_date is not None:
|
|
62
|
+
dates_to_fill = get_missing_timeseries_data_entries(
|
|
63
|
+
df, start=start_date, end=end_date
|
|
64
|
+
)
|
|
65
|
+
else:
|
|
66
|
+
dates_to_fill = []
|
|
67
|
+
|
|
68
|
+
# Fill missing dates
|
|
69
|
+
for missing_timestamp in dates_to_fill:
|
|
70
|
+
# Find the index position where this timestamp should be inserted
|
|
71
|
+
position = df[df.index < missing_timestamp].shape[0]
|
|
72
|
+
|
|
73
|
+
# Edge case: missing timestamp is BEFORE all existing data
|
|
74
|
+
if position == 0:
|
|
75
|
+
# Use the FIRST row (backward fill)
|
|
76
|
+
if len(df) > 0:
|
|
77
|
+
next_row = df.iloc[0]
|
|
78
|
+
new_row = next_row.to_dict()
|
|
79
|
+
else:
|
|
80
|
+
continue # No data to fill from
|
|
81
|
+
else:
|
|
82
|
+
# Normal case: use previous row (forward fill)
|
|
83
|
+
prev_row = df.iloc[position - 1]
|
|
84
|
+
new_row = prev_row.to_dict()
|
|
85
|
+
|
|
86
|
+
rows_to_add.append({index_name: missing_timestamp, **new_row})
|
|
87
|
+
|
|
88
|
+
# Add new rows if any
|
|
89
|
+
if rows_to_add:
|
|
90
|
+
new_df = pd.DataFrame(rows_to_add).set_index(index_name)
|
|
91
|
+
df = pd.concat([df, new_df]).sort_index()
|
|
92
|
+
|
|
93
|
+
# Save to file if requested
|
|
94
|
+
if save_to_file and file_path:
|
|
95
|
+
df.to_csv(file_path)
|
|
96
|
+
|
|
97
|
+
# Convert back to polars if input was polars
|
|
98
|
+
if is_polars:
|
|
99
|
+
df = df.reset_index()
|
|
100
|
+
return pl.from_pandas(df)
|
|
101
|
+
|
|
102
|
+
return df
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def get_missing_timeseries_data_entries(
|
|
106
|
+
data: Union[pd.DataFrame, pl.DataFrame, str],
|
|
107
|
+
start=None,
|
|
108
|
+
end=None,
|
|
109
|
+
freq: str = None
|
|
110
|
+
):
|
|
111
|
+
"""
|
|
112
|
+
Identify missing timestamps in a time series.
|
|
113
|
+
|
|
114
|
+
Args:
|
|
115
|
+
data (pd.DataFrame | pl.DataFrame | str): Time-series data as a
|
|
116
|
+
DataFrame or path to a CSV file. Index should be datetime.
|
|
117
|
+
start (datetime, optional): The start datetime for the expected range.
|
|
118
|
+
If None, uses the first timestamp in the data.
|
|
119
|
+
end (datetime, optional): The end datetime for the expected range.
|
|
120
|
+
If None, uses the last timestamp in the data.
|
|
121
|
+
freq (str, optional): Frequency string (e.g., 'D' for daily, 'H' for
|
|
122
|
+
hourly). If None, will be inferred from the data.
|
|
123
|
+
|
|
124
|
+
Returns:
|
|
125
|
+
list: A list of missing timestamps within the specified range.
|
|
126
|
+
"""
|
|
127
|
+
# Load data if file path is provided
|
|
128
|
+
if isinstance(data, str):
|
|
129
|
+
df = pd.read_csv(data, index_col=0, parse_dates=True)
|
|
130
|
+
elif isinstance(data, pl.DataFrame):
|
|
131
|
+
df = data.to_pandas()
|
|
132
|
+
if 'Datetime' in df.columns:
|
|
133
|
+
df = df.set_index('Datetime')
|
|
134
|
+
df.index = pd.to_datetime(df.index)
|
|
135
|
+
else:
|
|
136
|
+
df = data
|
|
137
|
+
|
|
138
|
+
# Get existing timestamps from the index
|
|
139
|
+
existing_timestamps = pd.to_datetime(df.index)
|
|
140
|
+
|
|
141
|
+
# Use data bounds if start/end not provided
|
|
142
|
+
if start is None:
|
|
143
|
+
start = existing_timestamps.min()
|
|
144
|
+
if end is None:
|
|
145
|
+
end = existing_timestamps.max()
|
|
146
|
+
|
|
147
|
+
# Infer frequency if not provided
|
|
148
|
+
if freq is None:
|
|
149
|
+
freq = df.index.inferred_freq
|
|
150
|
+
if freq is None and len(df) >= 2:
|
|
151
|
+
diff = df.index[1] - df.index[0]
|
|
152
|
+
freq = diff
|
|
153
|
+
elif freq is None:
|
|
154
|
+
freq = 'D' # Default to daily
|
|
155
|
+
|
|
156
|
+
expected_timestamps = pd.date_range(start=start, end=end, freq=freq)
|
|
157
|
+
|
|
158
|
+
# Find missing by checking which expected timestamps are not in existing
|
|
159
|
+
missing_mask = ~expected_timestamps.isin(existing_timestamps)
|
|
160
|
+
missing_timestamps = expected_timestamps[missing_mask].tolist()
|
|
161
|
+
return missing_timestamps
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
from typing import Dict, List, Any, Union
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def create_markdown_table(data: List[Union[Dict[str, Any], Any]]):
|
|
5
|
+
"""
|
|
6
|
+
Create a markdown table with evenly spaced columns for nice display
|
|
7
|
+
in notebook output cells.
|
|
8
|
+
|
|
9
|
+
Args:
|
|
10
|
+
data (List[dict] or List[object]): List of dictionaries or objects
|
|
11
|
+
containing data.
|
|
12
|
+
|
|
13
|
+
Returns:
|
|
14
|
+
str: Markdown formatted table with evenly spaced columns.
|
|
15
|
+
"""
|
|
16
|
+
if not data or len(data) == 0:
|
|
17
|
+
return ("| No Data Available |\n"
|
|
18
|
+
"|-------------------|\n"
|
|
19
|
+
"| No records found |\n")
|
|
20
|
+
|
|
21
|
+
# Determine if data contains dicts or objects
|
|
22
|
+
is_dict = isinstance(data[0], dict)
|
|
23
|
+
|
|
24
|
+
# Get columns from data
|
|
25
|
+
if is_dict:
|
|
26
|
+
columns = list(data[0].keys())
|
|
27
|
+
else:
|
|
28
|
+
# For objects, get all attributes (excluding private ones)
|
|
29
|
+
columns = [
|
|
30
|
+
attr for attr in dir(data[0])
|
|
31
|
+
if not attr.startswith('_')
|
|
32
|
+
and not callable(getattr(data[0], attr))
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
# Generate header titles
|
|
36
|
+
header_titles = [col.replace("_", " ").title() for col in columns]
|
|
37
|
+
|
|
38
|
+
# Collect and format all row data
|
|
39
|
+
all_rows_data = []
|
|
40
|
+
for item in data:
|
|
41
|
+
row_values = []
|
|
42
|
+
for col in columns:
|
|
43
|
+
# Get value
|
|
44
|
+
if is_dict:
|
|
45
|
+
value = item.get(col)
|
|
46
|
+
else:
|
|
47
|
+
value = getattr(item, col, None)
|
|
48
|
+
|
|
49
|
+
# Format value
|
|
50
|
+
if value is None:
|
|
51
|
+
formatted_value = "N/A"
|
|
52
|
+
elif isinstance(value, float):
|
|
53
|
+
formatted_value = f"{value:.2f}"
|
|
54
|
+
else:
|
|
55
|
+
formatted_value = str(value)
|
|
56
|
+
|
|
57
|
+
row_values.append(formatted_value)
|
|
58
|
+
all_rows_data.append(row_values)
|
|
59
|
+
|
|
60
|
+
# Calculate column widths based on both headers and data
|
|
61
|
+
col_widths = []
|
|
62
|
+
for i, header in enumerate(header_titles):
|
|
63
|
+
max_width = len(header)
|
|
64
|
+
for row in all_rows_data:
|
|
65
|
+
if i < len(row):
|
|
66
|
+
max_width = max(max_width, len(row[i]))
|
|
67
|
+
col_widths.append(max_width)
|
|
68
|
+
|
|
69
|
+
# Build markdown table
|
|
70
|
+
markdown = ""
|
|
71
|
+
|
|
72
|
+
# Header with padding
|
|
73
|
+
header_parts = [
|
|
74
|
+
title.ljust(width)
|
|
75
|
+
for title, width in zip(header_titles, col_widths)
|
|
76
|
+
]
|
|
77
|
+
markdown += "| " + " | ".join(header_parts) + " |\n"
|
|
78
|
+
|
|
79
|
+
# Separator
|
|
80
|
+
separator_parts = ["-" * width for width in col_widths]
|
|
81
|
+
markdown += "| " + " | ".join(separator_parts) + " |\n"
|
|
82
|
+
|
|
83
|
+
# Data rows
|
|
84
|
+
for row_values in all_rows_data:
|
|
85
|
+
row_parts = [
|
|
86
|
+
value.ljust(width)
|
|
87
|
+
for value, width in zip(row_values, col_widths)
|
|
88
|
+
]
|
|
89
|
+
markdown += "| " + " | ".join(row_parts) + " |\n"
|
|
90
|
+
|
|
91
|
+
return markdown
|
|
@@ -13,8 +13,6 @@ from .reporting import add_html_report, \
|
|
|
13
13
|
get_monthly_returns_heatmap_chart, \
|
|
14
14
|
get_yearly_returns_bar_chart, get_equity_curve_chart, \
|
|
15
15
|
get_ohlcv_data_completeness_chart, get_entry_and_exit_signals
|
|
16
|
-
from .analysis import select_backtest_date_ranges, rank_results, \
|
|
17
|
-
create_weights, generate_rolling_backtest_windows
|
|
18
16
|
|
|
19
17
|
|
|
20
18
|
__all__ = [
|
|
@@ -32,15 +30,11 @@ __all__ = [
|
|
|
32
30
|
"pretty_print_trades",
|
|
33
31
|
"pretty_print_positions",
|
|
34
32
|
"pretty_print_orders",
|
|
35
|
-
"select_backtest_date_ranges",
|
|
36
33
|
"get_equity_curve_with_drawdown_chart",
|
|
37
34
|
"get_rolling_sharpe_ratio_chart",
|
|
38
35
|
"get_monthly_returns_heatmap_chart",
|
|
39
36
|
"get_yearly_returns_bar_chart",
|
|
40
37
|
"get_ohlcv_data_completeness_chart",
|
|
41
|
-
"rank_results",
|
|
42
|
-
"create_weights",
|
|
43
38
|
"get_entry_and_exit_signals",
|
|
44
39
|
"get_equity_curve_chart",
|
|
45
|
-
"generate_rolling_backtest_windows"
|
|
46
40
|
]
|
|
@@ -25,12 +25,11 @@ from investing_algorithm_framework.domain import DATABASE_NAME, TimeUnit, \
|
|
|
25
25
|
from investing_algorithm_framework.infrastructure import setup_sqlalchemy, \
|
|
26
26
|
create_all_tables, CCXTOrderExecutor, CCXTPortfolioProvider, \
|
|
27
27
|
BacktestOrderExecutor, CCXTOHLCVDataProvider, clear_db, \
|
|
28
|
-
PandasOHLCVDataProvider
|
|
28
|
+
PandasOHLCVDataProvider, BacktestService
|
|
29
29
|
from investing_algorithm_framework.services import OrderBacktestService, \
|
|
30
30
|
BacktestPortfolioService, DefaultTradeOrderEvaluator, get_risk_free_rate_us
|
|
31
31
|
from .app_hook import AppHook
|
|
32
32
|
from .eventloop import EventLoopService
|
|
33
|
-
from .analysis import create_ohlcv_permutation
|
|
34
33
|
|
|
35
34
|
logger = logging.getLogger("investing_algorithm_framework")
|
|
36
35
|
COLOR_RESET = '\033[0m'
|
|
@@ -1638,6 +1637,7 @@ class App:
|
|
|
1638
1637
|
"connection"
|
|
1639
1638
|
)
|
|
1640
1639
|
|
|
1640
|
+
backtest_service = self.container.backtest_service()
|
|
1641
1641
|
data_provider_service = self.container.data_provider_service()
|
|
1642
1642
|
backtest = self.run_vector_backtest(
|
|
1643
1643
|
backtest_date_range=backtest_date_range,
|
|
@@ -1690,7 +1690,8 @@ class App:
|
|
|
1690
1690
|
|
|
1691
1691
|
for combi in original_data_combinations:
|
|
1692
1692
|
# Permute the data for the data source
|
|
1693
|
-
permutated_data =
|
|
1693
|
+
permutated_data = backtest_service\
|
|
1694
|
+
.create_ohlcv_permutation(data=combi[1])
|
|
1694
1695
|
permutated_datasets.append((combi[0], permutated_data))
|
|
1695
1696
|
|
|
1696
1697
|
if combi[0].symbol not in permuted_datasets_ordered_by_symbol:
|