investing-algorithm-framework 8.1.1__tar.gz → 8.2.0__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-8.1.1 → investing_algorithm_framework-8.2.0}/PKG-INFO +8 -2
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/README.md +7 -1
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/context.py +284 -2
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/backtest_report.py +3 -3
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/templates/dashboard.css +0 -8
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/templates/dashboard.js +57 -14
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/templates/dashboard_template.html.j2 +0 -8
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/strategy.py +66 -1
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/order/order.py +19 -3
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/order/order_type.py +1 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/order_executors/ccxt_order_executor.py +23 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/order_service/order_backtest_service.py +5 -1
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/order_service/order_service.py +60 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/trade_order_evaluator/backtest_trade_oder_evaluator.py +70 -1
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/pyproject.toml +1 -1
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/LICENSE +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/analysis/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/analysis/backtest_data_ranges.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/analysis/markdown.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/analysis/ranking.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/algorithm/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/algorithm/algorithm.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/algorithm/algorithm_factory.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/app.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/app_hook.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/eventloop.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/ascii.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/backtest_report_old.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/charts/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/charts/entry_exist_signals.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/charts/equity_curve.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/charts/equity_curve_drawdown.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/charts/line_chart.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/charts/monthly_returns_heatmap.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/charts/ohlcv_data_completeness.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/charts/rolling_sharp_ratio.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/charts/yearly_returns_barchart.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/generate.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/tables/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/tables/key_metrics_table.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/tables/stop_loss_table.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/tables/time_metrics_table.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/tables/trade_metrics_table.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/tables/trades_table.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/tables/utils.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/reporting/templates/report_template.html.j2 +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/stateless/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/stateless/action_handlers/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/stateless/action_handlers/action_handler_strategy.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/stateless/action_handlers/check_online_handler.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/stateless/action_handlers/run_strategy_handler.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/stateless/exception_handler.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/task.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/web/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/web/controllers/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/web/controllers/orders.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/web/controllers/portfolio.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/web/controllers/positions.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/web/create_app.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/web/error_handler.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/web/responses.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/web/run_strategies.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/web/schemas/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/web/schemas/order.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/web/schemas/portfolio.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/web/schemas/position.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/app/web/setup_cors.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/cli.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/deploy_to_aws_lambda.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/deploy_to_azure_function.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/initialize_app.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/mcp_server.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/.gitignore.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/app.py.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/app_aws_lambda_function.py.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/app_azure_function.py.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/app_web.py.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/aws_lambda_dockerfile.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/aws_lambda_dockerignore.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/aws_lambda_readme.md.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/aws_lambda_requirements.txt.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/azure_function_function_app.py.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/azure_function_host.json.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/azure_function_local.settings.json.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/azure_function_requirements.txt.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/data_providers.py.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/env.example.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/env_azure_function.example.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/market_data_providers.py.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/readme.md.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/requirements.txt.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/run_backtest.py.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/templates/strategy.py.template +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/cli/validate_backtest_checkpoints.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/create_app.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/dependency_container.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/algorithm_id.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/backtesting/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/backtesting/backtest.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/backtesting/backtest_date_range.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/backtesting/backtest_evaluation_focuss.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/backtesting/backtest_metrics.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/backtesting/backtest_permutation_test.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/backtesting/backtest_run.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/backtesting/backtest_summary_metrics.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/backtesting/backtest_utils.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/backtesting/combine_backtests.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/backtesting/templates/backtest.html +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/backtesting/templates/finterion-dark.png +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/backtesting/templates/finterion-light.png +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/config.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/constants.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/data_provider.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/data_structures.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/decimal_parsing.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/exceptions.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/app_mode.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/base_model.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/data/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/data/data_source.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/data/data_type.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/event.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/market/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/market/market_credential.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/order/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/order/order_side.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/order/order_status.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/portfolio/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/portfolio/portfolio.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/portfolio/portfolio_configuration.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/portfolio/portfolio_snapshot.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/position/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/position/position.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/position/position_size.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/position/position_snapshot.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/risk_rules/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/risk_rules/scaling_rule.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/risk_rules/stop_loss_rule.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/risk_rules/take_profit_rule.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/risk_rules/trading_cost.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/snapshot_interval.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/strategy_profile.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/time_frame.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/time_interval.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/time_unit.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/tracing/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/tracing/trace.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/trade/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/trade/trade.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/trade/trade_status.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/trade/trade_stop_loss.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/models/trade/trade_take_profit.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/order_executor.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/portfolio_provider.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/services/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/services/market_credential_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/services/portfolios/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/services/portfolios/portfolio_sync_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/services/rounding_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/services/state_handler.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/stateless_actions.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/strategy.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/utils/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/utils/csv.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/utils/custom_tqdm.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/utils/dates.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/utils/jupyter_notebook_detection.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/utils/polars.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/utils/random.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/utils/signatures.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/utils/stoppable_thread.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/domain/utils/synchronized.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/download_data.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/data_providers/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/data_providers/ccxt.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/data_providers/csv.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/data_providers/pandas.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/database/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/database/sql_alchemy.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/decimal_parser.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/model_extension.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/order/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/order/order.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/order/trade_allocation.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/order_trade_association.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/portfolio/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/portfolio/portfolio_snapshot.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/portfolio/sql_portfolio.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/position/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/position/position.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/position/position_snapshot.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/trades/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/trades/trade.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/trades/trade_stop_loss.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/models/trades/trade_take_profit.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/order_executors/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/order_executors/backtest_oder_executor.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/portfolio_providers/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/portfolio_providers/ccxt_portfolio_provider.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/repositories/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/repositories/order_repository.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/repositories/portfolio_repository.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/repositories/portfolio_snapshot_repository.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/repositories/position_repository.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/repositories/position_snapshot_repository.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/repositories/repository.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/repositories/trade_allocation_repository.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/repositories/trade_repository.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/repositories/trade_stop_loss_repository.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/repositories/trade_take_profit_repository.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/services/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/services/aws/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/services/aws/state_handler.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/services/azure/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/services/azure/state_handler.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/services/backtesting/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/services/backtesting/backtest_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/services/backtesting/event_backtest_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/infrastructure/services/backtesting/vector_backtest_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/configuration_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/data_providers/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/data_providers/data.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/data_providers/data_provider_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/market_credential_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/alpha.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/beta.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/cagr.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/calmar_ratio.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/drawdown.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/equity_curve.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/exposure.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/generate.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/mean_daily_return.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/price_efficiency.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/profit_factor.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/recovery.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/returns.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/risk_free_rate.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/sharpe_ratio.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/sortino_ratio.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/standard_deviation.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/trades.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/treynor_ratio.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/ulcer.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/value_at_risk.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/volatility.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/metrics/win_rate.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/order_service/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/order_service/order_executor_lookup.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/portfolios/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/portfolios/backtest_portfolio_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/portfolios/portfolio_configuration_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/portfolios/portfolio_provider_lookup.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/portfolios/portfolio_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/portfolios/portfolio_snapshot_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/portfolios/portfolio_sync_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/positions/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/positions/position_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/positions/position_snapshot_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/repository_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/trade_order_evaluator/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/trade_order_evaluator/default_trade_order_evaluator.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/trade_order_evaluator/trade_order_evaluator.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/trade_service/__init__.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/trade_service/trade_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/trade_service/trade_stop_loss_service.py +0 -0
- {investing_algorithm_framework-8.1.1 → investing_algorithm_framework-8.2.0}/investing_algorithm_framework/services/trade_service/trade_take_profit_service.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: investing-algorithm-framework
|
|
3
|
-
Version: 8.
|
|
3
|
+
Version: 8.2.0
|
|
4
4
|
Summary: A framework for creating trading bots
|
|
5
5
|
Author: MDUYN
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -55,7 +55,7 @@ Description-Content-Type: text/markdown
|
|
|
55
55
|
<img src="https://img.shields.io/badge/apache%202.0-blue.svg?style=flat-square&label=license" alt="license" style="height: 20px;">
|
|
56
56
|
</a>
|
|
57
57
|
<br>
|
|
58
|
-
<a href="https://discord.gg/
|
|
58
|
+
<a href="https://discord.gg/jQsnnYZgzR">
|
|
59
59
|
<img src="https://img.shields.io/badge/discord-7289da.svg?style=flat-square&logo=discord" alt="discord" style="height: 20px;">
|
|
60
60
|
</a>
|
|
61
61
|
<a href="https://www.reddit.com/r/InvestingBots/">
|
|
@@ -70,6 +70,12 @@ Description-Content-Type: text/markdown
|
|
|
70
70
|
<img src="static/showcase.svg" alt="dashboard" style="max-width: 100%;">
|
|
71
71
|
</p>
|
|
72
72
|
|
|
73
|
+
<p align="center">
|
|
74
|
+
<a href="https://discord.gg/jQsnnYZgzR">
|
|
75
|
+
<img src="https://img.shields.io/badge/Join%20our%20Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white" alt="Join our Discord">
|
|
76
|
+
</a>
|
|
77
|
+
</p>
|
|
78
|
+
|
|
73
79
|
<p align="center">
|
|
74
80
|
<sub><b>Sponsored by</b></sub>
|
|
75
81
|
<br>
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
<img src="https://img.shields.io/badge/apache%202.0-blue.svg?style=flat-square&label=license" alt="license" style="height: 20px;">
|
|
21
21
|
</a>
|
|
22
22
|
<br>
|
|
23
|
-
<a href="https://discord.gg/
|
|
23
|
+
<a href="https://discord.gg/jQsnnYZgzR">
|
|
24
24
|
<img src="https://img.shields.io/badge/discord-7289da.svg?style=flat-square&logo=discord" alt="discord" style="height: 20px;">
|
|
25
25
|
</a>
|
|
26
26
|
<a href="https://www.reddit.com/r/InvestingBots/">
|
|
@@ -35,6 +35,12 @@
|
|
|
35
35
|
<img src="static/showcase.svg" alt="dashboard" style="max-width: 100%;">
|
|
36
36
|
</p>
|
|
37
37
|
|
|
38
|
+
<p align="center">
|
|
39
|
+
<a href="https://discord.gg/jQsnnYZgzR">
|
|
40
|
+
<img src="https://img.shields.io/badge/Join%20our%20Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white" alt="Join our Discord">
|
|
41
|
+
</a>
|
|
42
|
+
</p>
|
|
43
|
+
|
|
38
44
|
<p align="center">
|
|
39
45
|
<sub><b>Sponsored by</b></sub>
|
|
40
46
|
<br>
|
|
@@ -51,6 +51,57 @@ class Context:
|
|
|
51
51
|
self.trade_take_profit_service: TradeTakeProfitService = \
|
|
52
52
|
trade_take_profit_service
|
|
53
53
|
|
|
54
|
+
def _validate_target_symbol(self, target_symbol, market=None):
|
|
55
|
+
"""
|
|
56
|
+
Validate the target_symbol for order creation:
|
|
57
|
+
1. Prevents orders where target_symbol equals trading_symbol
|
|
58
|
+
(e.g. EUR/EUR).
|
|
59
|
+
2. Checks that a data source exists for the
|
|
60
|
+
target_symbol/trading_symbol combination (e.g. BTC/EUR).
|
|
61
|
+
|
|
62
|
+
Args:
|
|
63
|
+
target_symbol: The symbol of the asset to trade
|
|
64
|
+
market: The market to check against
|
|
65
|
+
|
|
66
|
+
Raises:
|
|
67
|
+
OperationalException: If validation fails
|
|
68
|
+
"""
|
|
69
|
+
portfolio = self.portfolio_service.find({"market": market})
|
|
70
|
+
trading_symbol = portfolio.trading_symbol
|
|
71
|
+
|
|
72
|
+
# Check target_symbol != trading_symbol
|
|
73
|
+
if target_symbol.upper() == trading_symbol.upper():
|
|
74
|
+
raise OperationalException(
|
|
75
|
+
f"target_symbol '{target_symbol}' is the same as "
|
|
76
|
+
f"the trading_symbol '{trading_symbol}'. "
|
|
77
|
+
f"This would result in a "
|
|
78
|
+
f"'{trading_symbol}/{trading_symbol}' "
|
|
79
|
+
f"order which is not valid. "
|
|
80
|
+
f"To skip this check, set validate_symbol=False "
|
|
81
|
+
f"or omit the parameter."
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
# Check that a data source is registered for this pair
|
|
85
|
+
expected_symbol = f"{target_symbol}/{trading_symbol}".upper()
|
|
86
|
+
known_symbols = set()
|
|
87
|
+
|
|
88
|
+
if self.data_provider_service.data_provider_index is not None:
|
|
89
|
+
for data_source, _ in \
|
|
90
|
+
self.data_provider_service \
|
|
91
|
+
.data_provider_index.get_all():
|
|
92
|
+
if data_source.symbol is not None:
|
|
93
|
+
known_symbols.add(data_source.symbol.upper())
|
|
94
|
+
|
|
95
|
+
if expected_symbol not in known_symbols:
|
|
96
|
+
sorted_symbols = sorted(known_symbols)
|
|
97
|
+
raise OperationalException(
|
|
98
|
+
f"No data source registered for '{expected_symbol}'. "
|
|
99
|
+
f"A data source is required to track price history. "
|
|
100
|
+
f"Registered data source symbols: {sorted_symbols}. "
|
|
101
|
+
f"To skip this check, set validate_symbol=False "
|
|
102
|
+
f"or omit the parameter."
|
|
103
|
+
)
|
|
104
|
+
|
|
54
105
|
@property
|
|
55
106
|
def config(self):
|
|
56
107
|
"""
|
|
@@ -78,7 +129,8 @@ class Context:
|
|
|
78
129
|
market=None,
|
|
79
130
|
execute=True,
|
|
80
131
|
validate=True,
|
|
81
|
-
sync=True
|
|
132
|
+
sync=True,
|
|
133
|
+
validate_symbol=False
|
|
82
134
|
) -> Order:
|
|
83
135
|
"""
|
|
84
136
|
Function to create an order. This function will create an order
|
|
@@ -96,10 +148,15 @@ class Context:
|
|
|
96
148
|
validate: If set to True, the order will be validated
|
|
97
149
|
sync: If set to True, the created order will be synced
|
|
98
150
|
with the portfolio of the algorithm.
|
|
151
|
+
validate_symbol: Default False. If set to True,
|
|
152
|
+
validates that target_symbol is not the trading_symbol.
|
|
99
153
|
|
|
100
154
|
Returns:
|
|
101
155
|
The order created
|
|
102
156
|
"""
|
|
157
|
+
if validate_symbol:
|
|
158
|
+
self._validate_target_symbol(target_symbol, market=market)
|
|
159
|
+
|
|
103
160
|
portfolio = self.portfolio_service.find({"market": market})
|
|
104
161
|
order_data = {
|
|
105
162
|
"target_symbol": target_symbol,
|
|
@@ -162,7 +219,8 @@ class Context:
|
|
|
162
219
|
execute=True,
|
|
163
220
|
validate=True,
|
|
164
221
|
sync=True,
|
|
165
|
-
metadata=None
|
|
222
|
+
metadata=None,
|
|
223
|
+
validate_symbol=False
|
|
166
224
|
) -> Order:
|
|
167
225
|
"""
|
|
168
226
|
Function to create a limit order. This function will create a limit
|
|
@@ -193,10 +251,15 @@ class Context:
|
|
|
193
251
|
sync (optional): Default True. If set to True,
|
|
194
252
|
the created order will be synced with the
|
|
195
253
|
portfolio of the algorithm
|
|
254
|
+
validate_symbol (optional): Default False. If set to True,
|
|
255
|
+
validates that target_symbol is not the trading_symbol.
|
|
196
256
|
|
|
197
257
|
Returns:
|
|
198
258
|
Order: Instance of the order created
|
|
199
259
|
"""
|
|
260
|
+
if validate_symbol:
|
|
261
|
+
self._validate_target_symbol(target_symbol, market=market)
|
|
262
|
+
|
|
200
263
|
portfolio = self.portfolio_service.find({"market": market})
|
|
201
264
|
|
|
202
265
|
if percentage_of_portfolio is not None:
|
|
@@ -270,6 +333,225 @@ class Context:
|
|
|
270
333
|
order_data, execute=execute, validate=validate, sync=sync
|
|
271
334
|
)
|
|
272
335
|
|
|
336
|
+
def create_market_order(
|
|
337
|
+
self,
|
|
338
|
+
target_symbol,
|
|
339
|
+
order_side,
|
|
340
|
+
amount=None,
|
|
341
|
+
amount_trading_symbol=None,
|
|
342
|
+
percentage=None,
|
|
343
|
+
percentage_of_portfolio=None,
|
|
344
|
+
percentage_of_position=None,
|
|
345
|
+
precision=None,
|
|
346
|
+
market=None,
|
|
347
|
+
execute=True,
|
|
348
|
+
validate=True,
|
|
349
|
+
sync=True,
|
|
350
|
+
metadata=None
|
|
351
|
+
) -> Order:
|
|
352
|
+
"""
|
|
353
|
+
Function to create a market order. Market orders execute at
|
|
354
|
+
the best available price. In backtesting, this means the
|
|
355
|
+
open price of the next candle (+ slippage).
|
|
356
|
+
|
|
357
|
+
An estimated price (current latest price) is used for amount
|
|
358
|
+
calculation and cash reservation. The actual fill price is
|
|
359
|
+
determined at fill time and the portfolio is reconciled.
|
|
360
|
+
|
|
361
|
+
Args:
|
|
362
|
+
target_symbol: The symbol of the asset to trade
|
|
363
|
+
order_side: The side of the order (BUY or SELL)
|
|
364
|
+
amount (optional): The amount of the asset to trade
|
|
365
|
+
amount_trading_symbol (optional): The amount of the
|
|
366
|
+
trading symbol to trade
|
|
367
|
+
percentage (optional): The percentage of the portfolio
|
|
368
|
+
to allocate to the order
|
|
369
|
+
percentage_of_portfolio (optional): The percentage
|
|
370
|
+
of the portfolio to allocate to the order
|
|
371
|
+
percentage_of_position (optional): The percentage
|
|
372
|
+
of the position to allocate to the
|
|
373
|
+
order. (Only supported for SELL orders)
|
|
374
|
+
precision (optional): The precision of the amount
|
|
375
|
+
market (optional): The market to trade the asset
|
|
376
|
+
execute (optional): Default True. If set to True,
|
|
377
|
+
the order will be executed
|
|
378
|
+
validate (optional): Default True. If set to
|
|
379
|
+
True, the order will be validated
|
|
380
|
+
sync (optional): Default True. If set to True,
|
|
381
|
+
the created order will be synced with the
|
|
382
|
+
portfolio of the algorithm
|
|
383
|
+
metadata (optional): Additional metadata for the order
|
|
384
|
+
|
|
385
|
+
Returns:
|
|
386
|
+
Order: Instance of the order created
|
|
387
|
+
"""
|
|
388
|
+
portfolio = self.portfolio_service.find({"market": market})
|
|
389
|
+
full_symbol = (f"{target_symbol}/{portfolio.trading_symbol}")
|
|
390
|
+
estimated_price = self.get_latest_price(full_symbol, market=market)
|
|
391
|
+
|
|
392
|
+
if estimated_price is None:
|
|
393
|
+
raise OperationalException(
|
|
394
|
+
f"Cannot create market order for {target_symbol}: "
|
|
395
|
+
f"no price data available to estimate order size."
|
|
396
|
+
)
|
|
397
|
+
|
|
398
|
+
if percentage_of_portfolio is not None:
|
|
399
|
+
if not OrderSide.BUY.equals(order_side):
|
|
400
|
+
raise OperationalException(
|
|
401
|
+
"Percentage of portfolio is only supported for BUY orders."
|
|
402
|
+
)
|
|
403
|
+
|
|
404
|
+
net_size = portfolio.get_net_size()
|
|
405
|
+
size = net_size * (percentage_of_portfolio / 100)
|
|
406
|
+
amount = size / estimated_price
|
|
407
|
+
|
|
408
|
+
elif percentage_of_position is not None:
|
|
409
|
+
|
|
410
|
+
if not OrderSide.SELL.equals(order_side):
|
|
411
|
+
raise OperationalException(
|
|
412
|
+
"Percentage of position is only supported for SELL orders."
|
|
413
|
+
)
|
|
414
|
+
|
|
415
|
+
position = self.position_service.find(
|
|
416
|
+
{
|
|
417
|
+
"symbol": target_symbol,
|
|
418
|
+
"portfolio": portfolio.id
|
|
419
|
+
}
|
|
420
|
+
)
|
|
421
|
+
amount = position.get_amount() * (percentage_of_position / 100)
|
|
422
|
+
|
|
423
|
+
elif percentage is not None:
|
|
424
|
+
net_size = portfolio.get_net_size()
|
|
425
|
+
size = net_size * (percentage / 100)
|
|
426
|
+
amount = size / estimated_price
|
|
427
|
+
|
|
428
|
+
if precision is not None:
|
|
429
|
+
amount = RoundingService.round_down(amount, precision)
|
|
430
|
+
|
|
431
|
+
if amount_trading_symbol is not None:
|
|
432
|
+
amount = amount_trading_symbol / estimated_price
|
|
433
|
+
|
|
434
|
+
if amount is None:
|
|
435
|
+
raise OperationalException(
|
|
436
|
+
"The amount parameter is required to create a market order. "
|
|
437
|
+
"Either the amount, amount_trading_symbol, percentage, "
|
|
438
|
+
"percentage_of_portfolio or percentage_of_position "
|
|
439
|
+
"parameter must be specified."
|
|
440
|
+
)
|
|
441
|
+
|
|
442
|
+
logger.info(
|
|
443
|
+
f"Creating market order: {target_symbol} "
|
|
444
|
+
f"{order_side} {amount} @ estimated {estimated_price}"
|
|
445
|
+
)
|
|
446
|
+
|
|
447
|
+
order_metadata = metadata if metadata is not None else {}
|
|
448
|
+
order_metadata["estimated_price"] = estimated_price
|
|
449
|
+
|
|
450
|
+
order_data = {
|
|
451
|
+
"target_symbol": target_symbol,
|
|
452
|
+
"price": estimated_price,
|
|
453
|
+
"amount": amount,
|
|
454
|
+
"order_type": OrderType.MARKET.value,
|
|
455
|
+
"order_side": OrderSide.from_value(order_side).value,
|
|
456
|
+
"portfolio_id": portfolio.id,
|
|
457
|
+
"status": OrderStatus.CREATED.value,
|
|
458
|
+
"trading_symbol": portfolio.trading_symbol,
|
|
459
|
+
"metadata": order_metadata,
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
if BACKTESTING_FLAG in self.configuration_service.config \
|
|
463
|
+
and self.configuration_service.config[BACKTESTING_FLAG]:
|
|
464
|
+
order_data["created_at"] = \
|
|
465
|
+
self.configuration_service.config[INDEX_DATETIME]
|
|
466
|
+
|
|
467
|
+
return self.order_service.create(
|
|
468
|
+
order_data, execute=execute, validate=validate, sync=sync
|
|
469
|
+
)
|
|
470
|
+
|
|
471
|
+
def create_market_buy_order(
|
|
472
|
+
self,
|
|
473
|
+
target_symbol,
|
|
474
|
+
amount=None,
|
|
475
|
+
percentage_of_portfolio=None,
|
|
476
|
+
market=None,
|
|
477
|
+
portfolio_id=None,
|
|
478
|
+
metadata=None
|
|
479
|
+
) -> Order:
|
|
480
|
+
"""
|
|
481
|
+
Function to create a market buy order.
|
|
482
|
+
|
|
483
|
+
Args:
|
|
484
|
+
target_symbol (str): The symbol of the asset to buy
|
|
485
|
+
amount (float, optional): The amount of the asset to buy
|
|
486
|
+
percentage_of_portfolio (float, optional): The percentage of the
|
|
487
|
+
portfolio to buy.
|
|
488
|
+
market (str, optional): the portfolio corresponding to the market
|
|
489
|
+
to buy the asset
|
|
490
|
+
portfolio_id (str, optional): The ID of the portfolio to buy
|
|
491
|
+
the asset from.
|
|
492
|
+
metadata (dict, optional): Additional metadata for the order
|
|
493
|
+
|
|
494
|
+
Returns:
|
|
495
|
+
Order: The order created
|
|
496
|
+
"""
|
|
497
|
+
|
|
498
|
+
if amount is None and percentage_of_portfolio is None:
|
|
499
|
+
raise OperationalException(
|
|
500
|
+
"Either amount or percentage_of_portfolio must be specified "
|
|
501
|
+
"to create a market buy order."
|
|
502
|
+
)
|
|
503
|
+
|
|
504
|
+
return self.create_market_order(
|
|
505
|
+
target_symbol=target_symbol,
|
|
506
|
+
order_side=OrderSide.BUY,
|
|
507
|
+
amount=amount,
|
|
508
|
+
percentage_of_portfolio=percentage_of_portfolio,
|
|
509
|
+
market=market,
|
|
510
|
+
metadata=metadata
|
|
511
|
+
)
|
|
512
|
+
|
|
513
|
+
def create_market_sell_order(
|
|
514
|
+
self,
|
|
515
|
+
target_symbol,
|
|
516
|
+
amount=None,
|
|
517
|
+
percentage_of_position=None,
|
|
518
|
+
market=None,
|
|
519
|
+
portfolio_id=None,
|
|
520
|
+
metadata=None
|
|
521
|
+
) -> Order:
|
|
522
|
+
"""
|
|
523
|
+
Function to create a market sell order.
|
|
524
|
+
|
|
525
|
+
Args:
|
|
526
|
+
target_symbol (str): The symbol of the asset to sell
|
|
527
|
+
amount (float, optional): The amount of the asset to sell
|
|
528
|
+
percentage_of_position (float, optional): The percentage of the
|
|
529
|
+
position to sell.
|
|
530
|
+
market (str, optional): the portfolio corresponding to the market
|
|
531
|
+
to sell the asset
|
|
532
|
+
portfolio_id (str, optional): The ID of the portfolio to sell
|
|
533
|
+
the asset from.
|
|
534
|
+
metadata (dict, optional): Additional metadata for the order
|
|
535
|
+
|
|
536
|
+
Returns:
|
|
537
|
+
Order: The order created
|
|
538
|
+
"""
|
|
539
|
+
|
|
540
|
+
if amount is None and percentage_of_position is None:
|
|
541
|
+
raise OperationalException(
|
|
542
|
+
"Either amount or percentage_of_position must be specified "
|
|
543
|
+
"to create a market sell order."
|
|
544
|
+
)
|
|
545
|
+
|
|
546
|
+
return self.create_market_order(
|
|
547
|
+
target_symbol=target_symbol,
|
|
548
|
+
order_side=OrderSide.SELL,
|
|
549
|
+
amount=amount,
|
|
550
|
+
percentage_of_position=percentage_of_position,
|
|
551
|
+
market=market,
|
|
552
|
+
metadata=metadata
|
|
553
|
+
)
|
|
554
|
+
|
|
273
555
|
def create_limit_sell_order(
|
|
274
556
|
self,
|
|
275
557
|
target_symbol,
|
|
@@ -34,7 +34,7 @@ _TEMPLATE_DIR = os.path.join(os.path.dirname(__file__), 'templates')
|
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
def _read_template(filename):
|
|
37
|
-
with open(os.path.join(_TEMPLATE_DIR, filename), 'r') as f:
|
|
37
|
+
with open(os.path.join(_TEMPLATE_DIR, filename), 'r', encoding='utf-8') as f:
|
|
38
38
|
return f.read()
|
|
39
39
|
|
|
40
40
|
|
|
@@ -186,7 +186,7 @@ class BacktestReport:
|
|
|
186
186
|
self.html_report = self._build_html()
|
|
187
187
|
|
|
188
188
|
path = "/tmp/backtest_report.html"
|
|
189
|
-
with open(path, "w") as f:
|
|
189
|
+
with open(path, "w", encoding="utf-8") as f:
|
|
190
190
|
f.write(self.html_report)
|
|
191
191
|
|
|
192
192
|
if browser:
|
|
@@ -208,7 +208,7 @@ class BacktestReport:
|
|
|
208
208
|
def save(self, path):
|
|
209
209
|
if not self.html_report:
|
|
210
210
|
self.html_report = self._build_html()
|
|
211
|
-
with open(path, "w") as f:
|
|
211
|
+
with open(path, "w", encoding="utf-8") as f:
|
|
212
212
|
f.write(self.html_report)
|
|
213
213
|
|
|
214
214
|
@staticmethod
|
|
@@ -288,10 +288,6 @@ body { font-family:'Inter',-apple-system,sans-serif; background:var(--bg); color
|
|
|
288
288
|
.fin-bottom-cta p { font-size:0.85rem; color:var(--text-secondary); margin-bottom:0; }
|
|
289
289
|
.dot { width:8px; height:8px; border-radius:50%; display:inline-block; }
|
|
290
290
|
|
|
291
|
-
/* gen-note */
|
|
292
|
-
.gen-note { text-align:center; padding:2rem 0 1rem; color:var(--text-dim); font-size:0.72rem; position:fixed; bottom:0; left:260px; right:0; background:var(--bg); border-top:1px solid var(--border); z-index:5; }
|
|
293
|
-
.gen-note a { color:var(--accent); text-decoration:none; }
|
|
294
|
-
|
|
295
291
|
/* compare */
|
|
296
292
|
.compare-btn { display:none; align-items:center; gap:0.4rem; font-family:'Inter',sans-serif; font-size:0.85rem; font-weight:600; padding:0.65rem 1.5rem; border-radius:10px; border:none; background:var(--accent); color:#000; cursor:pointer; position:fixed; bottom:2rem; left:50%; transform:translateX(-50%); z-index:1000; box-shadow:0 4px 20px rgba(0,0,0,0.4); transition:all 0.25s ease; }
|
|
297
293
|
.compare-btn:hover { opacity:0.9; transform:translateX(-50%) scale(1.03); }
|
|
@@ -321,8 +317,6 @@ body { font-family:'Inter',-apple-system,sans-serif; background:var(--bg); color
|
|
|
321
317
|
.notes-pane.expanded.open { right:0; }
|
|
322
318
|
body.notes-open .main { width:calc(100vw - 260px - 420px); }
|
|
323
319
|
body.notes-open.notes-expanded .main { width:calc(100vw - 260px - 50vw); }
|
|
324
|
-
body.notes-open .gen-note { right:420px; }
|
|
325
|
-
body.notes-open.notes-expanded .gen-note { right:50vw; }
|
|
326
320
|
body.notes-open .top-controls { right:calc(420px + 1.25rem); }
|
|
327
321
|
body.notes-open.notes-expanded .top-controls { right:calc(50vw + 1.25rem); }
|
|
328
322
|
|
|
@@ -511,11 +505,9 @@ body.notes-open.notes-expanded .top-controls { right:calc(50vw + 1.25rem); }
|
|
|
511
505
|
@media (max-width:900px) {
|
|
512
506
|
.sidebar { display:none; }
|
|
513
507
|
.main { margin-left:0; padding:1.5rem 1rem 4rem; }
|
|
514
|
-
.gen-note { left:0; }
|
|
515
508
|
.grid-2x2 { grid-template-columns:1fr; }
|
|
516
509
|
.grid-2x3 { grid-template-columns:1fr; }
|
|
517
510
|
.notes-pane { width:100%; right:-100%; }
|
|
518
511
|
body.notes-open .main { width:100%; }
|
|
519
|
-
body.notes-open .gen-note { right:0; }
|
|
520
512
|
body.notes-open .top-controls { right:1.25rem; }
|
|
521
513
|
}
|
|
@@ -3171,17 +3171,66 @@ function buildComparePage() {
|
|
|
3171
3171
|
// Monthly Returns (rows / heatmap / growth)
|
|
3172
3172
|
buildCompareMonthlyReturns(indices);
|
|
3173
3173
|
|
|
3174
|
-
// Yearly returns
|
|
3174
|
+
// Yearly returns (comparison table)
|
|
3175
3175
|
const yrEl = document.getElementById('compare-yearly');
|
|
3176
3176
|
if (yrEl) {
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
indices.forEach(i
|
|
3180
|
-
var
|
|
3181
|
-
|
|
3177
|
+
// Collect all years across all strategies
|
|
3178
|
+
var allYears = new Set();
|
|
3179
|
+
indices.forEach(function(i) {
|
|
3180
|
+
var rd = getViewRunData(i);
|
|
3181
|
+
if (rd && rd.YR) rd.YR.forEach(function(d) { allYears.add(d[1]); });
|
|
3182
3182
|
});
|
|
3183
|
-
|
|
3184
|
-
|
|
3183
|
+
var years = Array.from(allYears).sort();
|
|
3184
|
+
|
|
3185
|
+
if (years.length === 0) {
|
|
3186
|
+
yrEl.innerHTML = '';
|
|
3187
|
+
} else {
|
|
3188
|
+
var html = '<div class="chart-card">';
|
|
3189
|
+
html += '<div class="chart-title">Yearly Returns</div>';
|
|
3190
|
+
html += '<div class="table-wrap"><table class="comp-table"><thead><tr>';
|
|
3191
|
+
html += '<th class="sticky-col">Strategy</th>';
|
|
3192
|
+
years.forEach(function(y) { html += '<th>' + y + '</th>'; });
|
|
3193
|
+
html += '</tr></thead><tbody>';
|
|
3194
|
+
|
|
3195
|
+
// Find best per year for highlighting
|
|
3196
|
+
var bestPerYear = {};
|
|
3197
|
+
years.forEach(function(y) {
|
|
3198
|
+
var bestVal = -Infinity, bestIdx = -1;
|
|
3199
|
+
indices.forEach(function(i) {
|
|
3200
|
+
var rd = getViewRunData(i);
|
|
3201
|
+
if (!rd || !rd.YR) return;
|
|
3202
|
+
var match = rd.YR.find(function(d) { return d[1] === y; });
|
|
3203
|
+
if (match && match[0] > bestVal) { bestVal = match[0]; bestIdx = i; }
|
|
3204
|
+
});
|
|
3205
|
+
if (bestIdx >= 0) bestPerYear[y] = bestIdx;
|
|
3206
|
+
});
|
|
3207
|
+
|
|
3208
|
+
indices.forEach(function(i) {
|
|
3209
|
+
var s = STRATEGIES[i];
|
|
3210
|
+
var rd = getViewRunData(i);
|
|
3211
|
+
var yrMap = {};
|
|
3212
|
+
if (rd && rd.YR) rd.YR.forEach(function(d) { yrMap[d[1]] = d[0]; });
|
|
3213
|
+
var isChal = challengerIdx === i;
|
|
3214
|
+
html += '<tr class="comp-row' + (isChal ? ' challenger-row' : '') + '">';
|
|
3215
|
+
html += '<td class="sticky-col"><span class="sb-dot" style="background:' + s.color + '"></span>' + s.name + (s.tag ? ' <span class="tag-badge">' + s.tag + '</span>' : '') + '</td>';
|
|
3216
|
+
years.forEach(function(y) {
|
|
3217
|
+
var v = yrMap[y];
|
|
3218
|
+
var isBest = bestPerYear[y] === i && indices.length > 1;
|
|
3219
|
+
var cls = isBest ? ' class="best-cell"' : '';
|
|
3220
|
+
if (v == null) {
|
|
3221
|
+
html += '<td' + cls + '>\u2014</td>';
|
|
3222
|
+
} else {
|
|
3223
|
+
var pct = (v * 100).toFixed(1);
|
|
3224
|
+
var color = v >= 0 ? 'var(--green)' : 'var(--red)';
|
|
3225
|
+
html += '<td' + cls + '><span style="color:' + color + ';font-weight:600">' + (v >= 0 ? '+' : '') + pct + '%</span></td>';
|
|
3226
|
+
}
|
|
3227
|
+
});
|
|
3228
|
+
html += '</tr>';
|
|
3229
|
+
});
|
|
3230
|
+
|
|
3231
|
+
html += '</tbody></table></div></div>';
|
|
3232
|
+
yrEl.innerHTML = html;
|
|
3233
|
+
}
|
|
3185
3234
|
}
|
|
3186
3235
|
}
|
|
3187
3236
|
|
|
@@ -3627,12 +3676,6 @@ function drawCompareExtras() {
|
|
|
3627
3676
|
|
|
3628
3677
|
// Relative Performance
|
|
3629
3678
|
drawRelativePerformance();
|
|
3630
|
-
|
|
3631
|
-
// Draw yearly bar charts
|
|
3632
|
-
indices.forEach(i => {
|
|
3633
|
-
const rd = getViewRunData(i);
|
|
3634
|
-
if (rd && rd.YR) drawBarChart('c-compare-yearly-'+i, rd.YR);
|
|
3635
|
-
});
|
|
3636
3679
|
}
|
|
3637
3680
|
|
|
3638
3681
|
function drawCompareDrawdown(indices) {
|
|
@@ -543,14 +543,6 @@
|
|
|
543
543
|
</div>
|
|
544
544
|
</div>
|
|
545
545
|
|
|
546
|
-
{# Footer #}
|
|
547
|
-
<div class="gen-note">
|
|
548
|
-
Generated by <a href="#">BacktestDashboard</a>
|
|
549
|
-
· {{ strat_names }}
|
|
550
|
-
· Sponsored by
|
|
551
|
-
<a href="https://finterion.com" target="_blank"
|
|
552
|
-
rel="noopener noreferrer">Finterion</a>
|
|
553
|
-
</div>
|
|
554
546
|
</div>{# /main #}
|
|
555
547
|
|
|
556
548
|
{# Placeholder for persisted notes data — MUST appear before main <script>
|
|
@@ -939,7 +939,8 @@ class TradingStrategy:
|
|
|
939
939
|
execute=True,
|
|
940
940
|
validate=True,
|
|
941
941
|
sync=True,
|
|
942
|
-
metadata=None
|
|
942
|
+
metadata=None,
|
|
943
|
+
validate_symbol=False
|
|
943
944
|
) -> Order:
|
|
944
945
|
"""
|
|
945
946
|
Function to create a limit order. This function will create
|
|
@@ -986,6 +987,70 @@ class TradingStrategy:
|
|
|
986
987
|
execute=execute,
|
|
987
988
|
validate=validate,
|
|
988
989
|
sync=sync,
|
|
990
|
+
metadata=metadata,
|
|
991
|
+
validate_symbol=validate_symbol
|
|
992
|
+
)
|
|
993
|
+
|
|
994
|
+
def create_market_order(
|
|
995
|
+
self,
|
|
996
|
+
target_symbol,
|
|
997
|
+
order_side,
|
|
998
|
+
amount=None,
|
|
999
|
+
amount_trading_symbol=None,
|
|
1000
|
+
percentage=None,
|
|
1001
|
+
percentage_of_portfolio=None,
|
|
1002
|
+
percentage_of_position=None,
|
|
1003
|
+
precision=None,
|
|
1004
|
+
market=None,
|
|
1005
|
+
execute=True,
|
|
1006
|
+
validate=True,
|
|
1007
|
+
sync=True,
|
|
1008
|
+
metadata=None
|
|
1009
|
+
) -> Order:
|
|
1010
|
+
"""
|
|
1011
|
+
Function to create a market order. Market orders execute at
|
|
1012
|
+
the best available price. In backtesting, this means the
|
|
1013
|
+
open price of the next candle (+ slippage).
|
|
1014
|
+
|
|
1015
|
+
Args:
|
|
1016
|
+
target_symbol: The symbol of the asset to trade
|
|
1017
|
+
order_side: The side of the order (BUY or SELL)
|
|
1018
|
+
amount (optional): The amount of the asset to trade
|
|
1019
|
+
amount_trading_symbol (optional): The amount of the trading
|
|
1020
|
+
symbol to trade
|
|
1021
|
+
percentage (optional): The percentage of the portfolio to
|
|
1022
|
+
allocate to the order
|
|
1023
|
+
percentage_of_portfolio (optional): The percentage of
|
|
1024
|
+
the portfolio to allocate to the order
|
|
1025
|
+
percentage_of_position (optional): The percentage of
|
|
1026
|
+
the position to allocate to the order.
|
|
1027
|
+
(Only supported for SELL orders)
|
|
1028
|
+
precision (optional): The precision of the amount
|
|
1029
|
+
market (optional): The market to trade the asset
|
|
1030
|
+
execute (optional): Default True. If set to True, the order
|
|
1031
|
+
will be executed
|
|
1032
|
+
validate (optional): Default True. If set to True, the order
|
|
1033
|
+
will be validated
|
|
1034
|
+
sync (optional): Default True. If set to True, the created
|
|
1035
|
+
order will be synced with the portfolio of the context
|
|
1036
|
+
metadata (optional): Additional metadata for the order
|
|
1037
|
+
|
|
1038
|
+
Returns:
|
|
1039
|
+
Order: Instance of the order created
|
|
1040
|
+
"""
|
|
1041
|
+
return self.context.create_market_order(
|
|
1042
|
+
target_symbol=target_symbol,
|
|
1043
|
+
order_side=order_side,
|
|
1044
|
+
amount=amount,
|
|
1045
|
+
amount_trading_symbol=amount_trading_symbol,
|
|
1046
|
+
percentage=percentage,
|
|
1047
|
+
percentage_of_portfolio=percentage_of_portfolio,
|
|
1048
|
+
percentage_of_position=percentage_of_position,
|
|
1049
|
+
precision=precision,
|
|
1050
|
+
market=market,
|
|
1051
|
+
execute=execute,
|
|
1052
|
+
validate=validate,
|
|
1053
|
+
sync=sync,
|
|
989
1054
|
metadata=metadata
|
|
990
1055
|
)
|
|
991
1056
|
|
|
@@ -377,12 +377,28 @@ class Order(BaseModel):
|
|
|
377
377
|
updated_at=self.get_updated_at(),
|
|
378
378
|
)
|
|
379
379
|
|
|
380
|
+
@property
|
|
381
|
+
def estimated_price(self):
|
|
382
|
+
"""Get the estimated price stored in metadata (used for market
|
|
383
|
+
orders to track the price estimate at creation time)."""
|
|
384
|
+
return self.metadata.get("estimated_price")
|
|
385
|
+
|
|
386
|
+
@estimated_price.setter
|
|
387
|
+
def estimated_price(self, value):
|
|
388
|
+
self.metadata["estimated_price"] = value
|
|
389
|
+
|
|
380
390
|
def get_size(self):
|
|
381
391
|
"""
|
|
382
|
-
Get the size of the order
|
|
392
|
+
Get the size of the order. For market orders with an estimated
|
|
393
|
+
price, uses the estimated price for size calculation.
|
|
383
394
|
|
|
384
395
|
Returns:
|
|
385
396
|
float: The size of the order
|
|
386
397
|
"""
|
|
387
|
-
|
|
388
|
-
|
|
398
|
+
price = self.get_price()
|
|
399
|
+
|
|
400
|
+
if price is None or price == 0:
|
|
401
|
+
# Fall back to estimated_price for market orders
|
|
402
|
+
price = self.estimated_price
|
|
403
|
+
|
|
404
|
+
return self.get_amount() * price if price is not None else 0
|