investing-algorithm-framework 3.7.0__py3-none-any.whl → 7.19.15__py3-none-any.whl
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.
Potentially problematic release.
This version of investing-algorithm-framework might be problematic. Click here for more details.
- investing_algorithm_framework/__init__.py +168 -45
- investing_algorithm_framework/app/__init__.py +32 -1
- investing_algorithm_framework/app/algorithm/__init__.py +7 -0
- investing_algorithm_framework/app/algorithm/algorithm.py +239 -0
- investing_algorithm_framework/app/algorithm/algorithm_factory.py +114 -0
- investing_algorithm_framework/app/analysis/__init__.py +15 -0
- investing_algorithm_framework/app/analysis/backtest_data_ranges.py +121 -0
- investing_algorithm_framework/app/analysis/backtest_utils.py +107 -0
- investing_algorithm_framework/app/analysis/permutation.py +116 -0
- investing_algorithm_framework/app/analysis/ranking.py +297 -0
- investing_algorithm_framework/app/app.py +1933 -589
- investing_algorithm_framework/app/app_hook.py +28 -0
- investing_algorithm_framework/app/context.py +1725 -0
- investing_algorithm_framework/app/eventloop.py +590 -0
- investing_algorithm_framework/app/reporting/__init__.py +27 -0
- investing_algorithm_framework/app/reporting/ascii.py +921 -0
- investing_algorithm_framework/app/reporting/backtest_report.py +349 -0
- investing_algorithm_framework/app/reporting/charts/__init__.py +19 -0
- investing_algorithm_framework/app/reporting/charts/entry_exist_signals.py +66 -0
- investing_algorithm_framework/app/reporting/charts/equity_curve.py +37 -0
- investing_algorithm_framework/app/reporting/charts/equity_curve_drawdown.py +74 -0
- investing_algorithm_framework/app/reporting/charts/line_chart.py +11 -0
- investing_algorithm_framework/app/reporting/charts/monthly_returns_heatmap.py +70 -0
- investing_algorithm_framework/app/reporting/charts/ohlcv_data_completeness.py +51 -0
- investing_algorithm_framework/app/reporting/charts/rolling_sharp_ratio.py +79 -0
- investing_algorithm_framework/app/reporting/charts/yearly_returns_barchart.py +55 -0
- investing_algorithm_framework/app/reporting/generate.py +185 -0
- investing_algorithm_framework/app/reporting/tables/__init__.py +11 -0
- investing_algorithm_framework/app/reporting/tables/key_metrics_table.py +217 -0
- investing_algorithm_framework/app/reporting/tables/stop_loss_table.py +0 -0
- investing_algorithm_framework/app/reporting/tables/time_metrics_table.py +80 -0
- investing_algorithm_framework/app/reporting/tables/trade_metrics_table.py +147 -0
- investing_algorithm_framework/app/reporting/tables/trades_table.py +75 -0
- investing_algorithm_framework/app/reporting/tables/utils.py +29 -0
- investing_algorithm_framework/app/reporting/templates/report_template.html.j2 +154 -0
- investing_algorithm_framework/app/stateless/action_handlers/__init__.py +4 -2
- investing_algorithm_framework/app/stateless/action_handlers/action_handler_strategy.py +1 -1
- investing_algorithm_framework/app/stateless/action_handlers/check_online_handler.py +1 -1
- investing_algorithm_framework/app/stateless/action_handlers/run_strategy_handler.py +14 -7
- investing_algorithm_framework/app/strategy.py +664 -84
- investing_algorithm_framework/app/task.py +5 -3
- investing_algorithm_framework/app/web/__init__.py +2 -1
- investing_algorithm_framework/app/web/create_app.py +4 -2
- investing_algorithm_framework/cli/__init__.py +0 -0
- investing_algorithm_framework/cli/cli.py +226 -0
- investing_algorithm_framework/cli/deploy_to_aws_lambda.py +501 -0
- investing_algorithm_framework/cli/deploy_to_azure_function.py +718 -0
- investing_algorithm_framework/cli/initialize_app.py +603 -0
- investing_algorithm_framework/cli/templates/.gitignore.template +178 -0
- investing_algorithm_framework/cli/templates/app.py.template +18 -0
- investing_algorithm_framework/cli/templates/app_aws_lambda_function.py.template +48 -0
- investing_algorithm_framework/cli/templates/app_azure_function.py.template +14 -0
- investing_algorithm_framework/cli/templates/app_web.py.template +18 -0
- investing_algorithm_framework/cli/templates/aws_lambda_dockerfile.template +22 -0
- investing_algorithm_framework/cli/templates/aws_lambda_dockerignore.template +92 -0
- investing_algorithm_framework/cli/templates/aws_lambda_readme.md.template +110 -0
- investing_algorithm_framework/cli/templates/aws_lambda_requirements.txt.template +2 -0
- investing_algorithm_framework/cli/templates/azure_function_function_app.py.template +65 -0
- investing_algorithm_framework/cli/templates/azure_function_host.json.template +15 -0
- investing_algorithm_framework/cli/templates/azure_function_local.settings.json.template +8 -0
- investing_algorithm_framework/cli/templates/azure_function_requirements.txt.template +3 -0
- investing_algorithm_framework/cli/templates/data_providers.py.template +17 -0
- investing_algorithm_framework/cli/templates/env.example.template +2 -0
- investing_algorithm_framework/cli/templates/env_azure_function.example.template +4 -0
- investing_algorithm_framework/cli/templates/market_data_providers.py.template +9 -0
- investing_algorithm_framework/cli/templates/readme.md.template +135 -0
- investing_algorithm_framework/cli/templates/requirements.txt.template +2 -0
- investing_algorithm_framework/cli/templates/run_backtest.py.template +20 -0
- investing_algorithm_framework/cli/templates/strategy.py.template +124 -0
- investing_algorithm_framework/create_app.py +40 -6
- investing_algorithm_framework/dependency_container.py +72 -56
- investing_algorithm_framework/domain/__init__.py +71 -47
- investing_algorithm_framework/domain/backtesting/__init__.py +21 -0
- investing_algorithm_framework/domain/backtesting/backtest.py +503 -0
- investing_algorithm_framework/domain/backtesting/backtest_date_range.py +96 -0
- investing_algorithm_framework/domain/backtesting/backtest_evaluation_focuss.py +242 -0
- investing_algorithm_framework/domain/backtesting/backtest_metrics.py +459 -0
- investing_algorithm_framework/domain/backtesting/backtest_permutation_test.py +275 -0
- investing_algorithm_framework/domain/backtesting/backtest_run.py +605 -0
- investing_algorithm_framework/domain/backtesting/backtest_summary_metrics.py +162 -0
- investing_algorithm_framework/domain/backtesting/combine_backtests.py +280 -0
- investing_algorithm_framework/domain/config.py +59 -91
- investing_algorithm_framework/domain/constants.py +13 -38
- investing_algorithm_framework/domain/data_provider.py +334 -0
- investing_algorithm_framework/domain/data_structures.py +3 -2
- investing_algorithm_framework/domain/exceptions.py +51 -1
- investing_algorithm_framework/domain/models/__init__.py +17 -12
- investing_algorithm_framework/domain/models/data/__init__.py +7 -0
- investing_algorithm_framework/domain/models/data/data_source.py +214 -0
- investing_algorithm_framework/domain/models/data/data_type.py +46 -0
- investing_algorithm_framework/domain/models/event.py +35 -0
- investing_algorithm_framework/domain/models/market/market_credential.py +55 -1
- investing_algorithm_framework/domain/models/order/order.py +77 -83
- investing_algorithm_framework/domain/models/order/order_status.py +2 -2
- investing_algorithm_framework/domain/models/order/order_type.py +1 -3
- investing_algorithm_framework/domain/models/portfolio/portfolio.py +81 -3
- investing_algorithm_framework/domain/models/portfolio/portfolio_configuration.py +26 -3
- investing_algorithm_framework/domain/models/portfolio/portfolio_snapshot.py +108 -11
- investing_algorithm_framework/domain/models/position/__init__.py +2 -1
- investing_algorithm_framework/domain/models/position/position.py +12 -0
- investing_algorithm_framework/domain/models/position/position_size.py +41 -0
- investing_algorithm_framework/domain/models/risk_rules/__init__.py +7 -0
- investing_algorithm_framework/domain/models/risk_rules/stop_loss_rule.py +51 -0
- investing_algorithm_framework/domain/models/risk_rules/take_profit_rule.py +55 -0
- investing_algorithm_framework/domain/models/snapshot_interval.py +45 -0
- investing_algorithm_framework/domain/models/strategy_profile.py +19 -151
- investing_algorithm_framework/domain/models/time_frame.py +37 -0
- investing_algorithm_framework/domain/models/time_interval.py +33 -0
- investing_algorithm_framework/domain/models/time_unit.py +66 -2
- investing_algorithm_framework/domain/models/trade/__init__.py +8 -1
- investing_algorithm_framework/domain/models/trade/trade.py +295 -171
- investing_algorithm_framework/domain/models/trade/trade_status.py +9 -2
- investing_algorithm_framework/domain/models/trade/trade_stop_loss.py +332 -0
- investing_algorithm_framework/domain/models/trade/trade_take_profit.py +365 -0
- investing_algorithm_framework/domain/order_executor.py +112 -0
- investing_algorithm_framework/domain/portfolio_provider.py +118 -0
- investing_algorithm_framework/domain/services/__init__.py +2 -9
- investing_algorithm_framework/domain/services/portfolios/portfolio_sync_service.py +0 -6
- investing_algorithm_framework/domain/services/state_handler.py +38 -0
- investing_algorithm_framework/domain/strategy.py +1 -29
- investing_algorithm_framework/domain/utils/__init__.py +12 -7
- investing_algorithm_framework/domain/utils/custom_tqdm.py +22 -0
- investing_algorithm_framework/domain/utils/dates.py +57 -0
- investing_algorithm_framework/domain/utils/jupyter_notebook_detection.py +19 -0
- investing_algorithm_framework/domain/utils/polars.py +53 -0
- investing_algorithm_framework/domain/utils/random.py +29 -0
- investing_algorithm_framework/download_data.py +108 -0
- investing_algorithm_framework/infrastructure/__init__.py +31 -18
- investing_algorithm_framework/infrastructure/data_providers/__init__.py +36 -0
- investing_algorithm_framework/infrastructure/data_providers/ccxt.py +1143 -0
- investing_algorithm_framework/infrastructure/data_providers/csv.py +568 -0
- investing_algorithm_framework/infrastructure/data_providers/pandas.py +599 -0
- investing_algorithm_framework/infrastructure/database/__init__.py +6 -2
- investing_algorithm_framework/infrastructure/database/sql_alchemy.py +86 -12
- investing_algorithm_framework/infrastructure/models/__init__.py +6 -11
- investing_algorithm_framework/infrastructure/models/order/__init__.py +2 -1
- investing_algorithm_framework/infrastructure/models/order/order.py +35 -49
- investing_algorithm_framework/infrastructure/models/order/order_metadata.py +44 -0
- investing_algorithm_framework/infrastructure/models/order_trade_association.py +10 -0
- investing_algorithm_framework/infrastructure/models/portfolio/__init__.py +1 -1
- investing_algorithm_framework/infrastructure/models/portfolio/portfolio_snapshot.py +8 -0
- investing_algorithm_framework/infrastructure/models/portfolio/{portfolio.py → sql_portfolio.py} +17 -5
- investing_algorithm_framework/infrastructure/models/trades/__init__.py +9 -0
- investing_algorithm_framework/infrastructure/models/trades/trade.py +130 -0
- investing_algorithm_framework/infrastructure/models/trades/trade_stop_loss.py +59 -0
- investing_algorithm_framework/infrastructure/models/trades/trade_take_profit.py +55 -0
- investing_algorithm_framework/infrastructure/order_executors/__init__.py +21 -0
- investing_algorithm_framework/infrastructure/order_executors/backtest_oder_executor.py +28 -0
- investing_algorithm_framework/infrastructure/order_executors/ccxt_order_executor.py +200 -0
- investing_algorithm_framework/infrastructure/portfolio_providers/__init__.py +19 -0
- investing_algorithm_framework/infrastructure/portfolio_providers/ccxt_portfolio_provider.py +199 -0
- investing_algorithm_framework/infrastructure/repositories/__init__.py +8 -0
- investing_algorithm_framework/infrastructure/repositories/order_metadata_repository.py +17 -0
- investing_algorithm_framework/infrastructure/repositories/order_repository.py +5 -0
- investing_algorithm_framework/infrastructure/repositories/portfolio_repository.py +1 -1
- investing_algorithm_framework/infrastructure/repositories/position_repository.py +11 -0
- investing_algorithm_framework/infrastructure/repositories/repository.py +81 -27
- investing_algorithm_framework/infrastructure/repositories/trade_repository.py +71 -0
- investing_algorithm_framework/infrastructure/repositories/trade_stop_loss_repository.py +29 -0
- investing_algorithm_framework/infrastructure/repositories/trade_take_profit_repository.py +29 -0
- investing_algorithm_framework/infrastructure/services/__init__.py +4 -4
- investing_algorithm_framework/infrastructure/services/aws/__init__.py +6 -0
- investing_algorithm_framework/infrastructure/services/aws/state_handler.py +113 -0
- investing_algorithm_framework/infrastructure/services/azure/__init__.py +5 -0
- investing_algorithm_framework/infrastructure/services/azure/state_handler.py +158 -0
- investing_algorithm_framework/services/__init__.py +113 -16
- investing_algorithm_framework/services/backtesting/__init__.py +0 -7
- investing_algorithm_framework/services/backtesting/backtest_service.py +566 -359
- investing_algorithm_framework/services/configuration_service.py +77 -11
- investing_algorithm_framework/services/data_providers/__init__.py +5 -0
- investing_algorithm_framework/services/data_providers/data_provider_service.py +850 -0
- investing_algorithm_framework/services/market_credential_service.py +16 -1
- investing_algorithm_framework/services/metrics/__init__.py +114 -0
- investing_algorithm_framework/services/metrics/alpha.py +0 -0
- investing_algorithm_framework/services/metrics/beta.py +0 -0
- investing_algorithm_framework/services/metrics/cagr.py +60 -0
- investing_algorithm_framework/services/metrics/calmar_ratio.py +40 -0
- investing_algorithm_framework/services/metrics/drawdown.py +181 -0
- investing_algorithm_framework/services/metrics/equity_curve.py +24 -0
- investing_algorithm_framework/services/metrics/exposure.py +210 -0
- investing_algorithm_framework/services/metrics/generate.py +358 -0
- investing_algorithm_framework/services/metrics/mean_daily_return.py +83 -0
- investing_algorithm_framework/services/metrics/profit_factor.py +165 -0
- investing_algorithm_framework/services/metrics/recovery.py +113 -0
- investing_algorithm_framework/services/metrics/returns.py +452 -0
- investing_algorithm_framework/services/metrics/risk_free_rate.py +28 -0
- investing_algorithm_framework/services/metrics/sharpe_ratio.py +137 -0
- investing_algorithm_framework/services/metrics/sortino_ratio.py +74 -0
- investing_algorithm_framework/services/metrics/standard_deviation.py +157 -0
- investing_algorithm_framework/services/metrics/trades.py +500 -0
- investing_algorithm_framework/services/metrics/treynor_ratio.py +0 -0
- investing_algorithm_framework/services/metrics/ulcer.py +0 -0
- investing_algorithm_framework/services/metrics/value_at_risk.py +0 -0
- investing_algorithm_framework/services/metrics/volatility.py +97 -0
- investing_algorithm_framework/services/metrics/win_rate.py +177 -0
- investing_algorithm_framework/services/order_service/__init__.py +3 -1
- investing_algorithm_framework/services/order_service/order_backtest_service.py +76 -89
- investing_algorithm_framework/services/order_service/order_executor_lookup.py +110 -0
- investing_algorithm_framework/services/order_service/order_service.py +407 -326
- investing_algorithm_framework/services/portfolios/__init__.py +3 -1
- investing_algorithm_framework/services/portfolios/backtest_portfolio_service.py +37 -3
- investing_algorithm_framework/services/portfolios/portfolio_configuration_service.py +22 -8
- investing_algorithm_framework/services/portfolios/portfolio_provider_lookup.py +106 -0
- investing_algorithm_framework/services/portfolios/portfolio_service.py +96 -28
- investing_algorithm_framework/services/portfolios/portfolio_snapshot_service.py +97 -28
- investing_algorithm_framework/services/portfolios/portfolio_sync_service.py +116 -313
- investing_algorithm_framework/services/positions/__init__.py +7 -0
- investing_algorithm_framework/services/positions/position_service.py +210 -0
- investing_algorithm_framework/services/repository_service.py +8 -2
- investing_algorithm_framework/services/trade_order_evaluator/__init__.py +9 -0
- investing_algorithm_framework/services/trade_order_evaluator/backtest_trade_oder_evaluator.py +113 -0
- investing_algorithm_framework/services/trade_order_evaluator/default_trade_order_evaluator.py +51 -0
- investing_algorithm_framework/services/trade_order_evaluator/trade_order_evaluator.py +80 -0
- investing_algorithm_framework/services/trade_service/__init__.py +7 -1
- investing_algorithm_framework/services/trade_service/trade_service.py +1013 -315
- investing_algorithm_framework/services/trade_service/trade_stop_loss_service.py +39 -0
- investing_algorithm_framework/services/trade_service/trade_take_profit_service.py +41 -0
- investing_algorithm_framework-7.19.15.dist-info/METADATA +537 -0
- investing_algorithm_framework-7.19.15.dist-info/RECORD +263 -0
- investing_algorithm_framework-7.19.15.dist-info/entry_points.txt +3 -0
- investing_algorithm_framework/app/algorithm.py +0 -1105
- investing_algorithm_framework/domain/graphs.py +0 -382
- investing_algorithm_framework/domain/metrics/__init__.py +0 -6
- investing_algorithm_framework/domain/models/backtesting/__init__.py +0 -11
- investing_algorithm_framework/domain/models/backtesting/backtest_date_range.py +0 -43
- investing_algorithm_framework/domain/models/backtesting/backtest_position.py +0 -120
- investing_algorithm_framework/domain/models/backtesting/backtest_report.py +0 -580
- investing_algorithm_framework/domain/models/backtesting/backtest_reports_evaluation.py +0 -243
- investing_algorithm_framework/domain/models/trading_data_types.py +0 -47
- investing_algorithm_framework/domain/models/trading_time_frame.py +0 -223
- investing_algorithm_framework/domain/services/market_data_sources.py +0 -344
- investing_algorithm_framework/domain/services/market_service.py +0 -153
- investing_algorithm_framework/domain/singleton.py +0 -9
- investing_algorithm_framework/domain/utils/backtesting.py +0 -472
- investing_algorithm_framework/infrastructure/models/market_data_sources/__init__.py +0 -12
- investing_algorithm_framework/infrastructure/models/market_data_sources/ccxt.py +0 -559
- investing_algorithm_framework/infrastructure/models/market_data_sources/csv.py +0 -254
- investing_algorithm_framework/infrastructure/models/market_data_sources/us_treasury_yield.py +0 -47
- investing_algorithm_framework/infrastructure/services/market_service/__init__.py +0 -5
- investing_algorithm_framework/infrastructure/services/market_service/ccxt_market_service.py +0 -455
- investing_algorithm_framework/infrastructure/services/performance_service/__init__.py +0 -7
- investing_algorithm_framework/infrastructure/services/performance_service/backtest_performance_service.py +0 -2
- investing_algorithm_framework/infrastructure/services/performance_service/performance_service.py +0 -350
- investing_algorithm_framework/services/backtesting/backtest_report_writer_service.py +0 -53
- investing_algorithm_framework/services/backtesting/graphs.py +0 -61
- investing_algorithm_framework/services/market_data_source_service/__init__.py +0 -8
- investing_algorithm_framework/services/market_data_source_service/backtest_market_data_source_service.py +0 -150
- investing_algorithm_framework/services/market_data_source_service/market_data_source_service.py +0 -189
- investing_algorithm_framework/services/position_service.py +0 -31
- investing_algorithm_framework/services/strategy_orchestrator_service.py +0 -264
- investing_algorithm_framework-3.7.0.dist-info/METADATA +0 -339
- investing_algorithm_framework-3.7.0.dist-info/RECORD +0 -147
- /investing_algorithm_framework/{domain → services}/metrics/price_efficiency.py +0 -0
- /investing_algorithm_framework/services/{position_snapshot_service.py → positions/position_snapshot_service.py} +0 -0
- {investing_algorithm_framework-3.7.0.dist-info → investing_algorithm_framework-7.19.15.dist-info}/LICENSE +0 -0
- {investing_algorithm_framework-3.7.0.dist-info → investing_algorithm_framework-7.19.15.dist-info}/WHEEL +0 -0
|
@@ -1,38 +1,135 @@
|
|
|
1
|
-
from .backtesting import BacktestService
|
|
2
|
-
|
|
1
|
+
from .backtesting import BacktestService
|
|
2
|
+
from .trade_order_evaluator import BacktestTradeOrderEvaluator, \
|
|
3
|
+
TradeOrderEvaluator, DefaultTradeOrderEvaluator
|
|
3
4
|
from .configuration_service import ConfigurationService
|
|
4
5
|
from .market_credential_service import MarketCredentialService
|
|
5
|
-
from .
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
from .data_providers import DataProviderService
|
|
7
|
+
from .order_service import OrderService, OrderBacktestService, \
|
|
8
|
+
OrderExecutorLookup
|
|
8
9
|
from .portfolios import PortfolioService, BacktestPortfolioService, \
|
|
9
10
|
PortfolioConfigurationService, PortfolioSyncService, \
|
|
10
|
-
PortfolioSnapshotService
|
|
11
|
-
from .
|
|
12
|
-
from .position_snapshot_service import PositionSnapshotService
|
|
11
|
+
PortfolioSnapshotService, PortfolioProviderLookup
|
|
12
|
+
from .positions import PositionService, PositionSnapshotService
|
|
13
13
|
from .repository_service import RepositoryService
|
|
14
|
-
from .
|
|
15
|
-
|
|
14
|
+
from .trade_service import TradeService, TradeStopLossService, \
|
|
15
|
+
TradeTakeProfitService
|
|
16
|
+
from .metrics import get_annual_volatility, \
|
|
17
|
+
get_sortino_ratio, get_drawdown_series, get_max_drawdown, \
|
|
18
|
+
get_equity_curve, get_price_efficiency_ratio, get_sharpe_ratio, \
|
|
19
|
+
get_profit_factor, get_cumulative_profit_factor_series, \
|
|
20
|
+
get_rolling_profit_factor_series, \
|
|
21
|
+
get_cagr, get_standard_deviation_returns, \
|
|
22
|
+
get_standard_deviation_downside_returns, \
|
|
23
|
+
get_total_return, get_cumulative_exposure, get_exposure_ratio, \
|
|
24
|
+
get_yearly_returns, get_monthly_returns, get_best_year, \
|
|
25
|
+
get_best_month, get_worst_year, get_worst_month, get_best_trade, \
|
|
26
|
+
get_worst_trade, get_average_yearly_return, get_average_trade_gain, \
|
|
27
|
+
get_average_trade_loss, get_average_monthly_return, \
|
|
28
|
+
get_percentage_winning_months, get_average_trade_duration, \
|
|
29
|
+
get_trade_frequency, get_win_rate, get_win_loss_ratio, \
|
|
30
|
+
get_calmar_ratio, get_max_drawdown_absolute, get_current_win_loss_ratio, \
|
|
31
|
+
get_max_drawdown_duration, get_max_daily_drawdown, get_trades_per_day, \
|
|
32
|
+
get_trades_per_year, get_average_monthly_return_losing_months, \
|
|
33
|
+
get_average_monthly_return_winning_months, get_percentage_winning_years, \
|
|
34
|
+
get_rolling_sharpe_ratio, create_backtest_metrics, get_total_growth, \
|
|
35
|
+
get_total_loss, get_risk_free_rate_us, get_median_trade_return, \
|
|
36
|
+
get_average_trade_return, get_cumulative_return, \
|
|
37
|
+
get_cumulative_return_series, get_average_trade_size, \
|
|
38
|
+
get_positive_trades, get_negative_trades, get_number_of_trades, \
|
|
39
|
+
get_current_win_rate, get_current_average_trade_return, \
|
|
40
|
+
get_current_average_trade_loss, get_current_average_trade_duration, \
|
|
41
|
+
get_current_average_trade_gain, create_backtest_metrics_for_backtest
|
|
16
42
|
|
|
17
43
|
__all__ = [
|
|
18
|
-
"StrategyOrchestratorService",
|
|
19
44
|
"OrderService",
|
|
20
45
|
"RepositoryService",
|
|
21
46
|
"PortfolioService",
|
|
22
47
|
"PositionService",
|
|
23
48
|
"PortfolioConfigurationService",
|
|
24
|
-
"MarketDataSourceService",
|
|
25
49
|
"BacktestService",
|
|
26
|
-
"BacktestReportWriterService",
|
|
27
50
|
"OrderBacktestService",
|
|
28
51
|
"ConfigurationService",
|
|
29
52
|
"PortfolioSyncService",
|
|
30
53
|
"PortfolioSnapshotService",
|
|
31
54
|
"PositionSnapshotService",
|
|
32
55
|
"MarketCredentialService",
|
|
33
|
-
"BacktestMarketDataSourceService",
|
|
34
56
|
"BacktestPortfolioService",
|
|
35
57
|
"TradeService",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
58
|
+
"DataProviderService",
|
|
59
|
+
"OrderExecutorLookup",
|
|
60
|
+
"BacktestTradeOrderEvaluator",
|
|
61
|
+
"PortfolioProviderLookup",
|
|
62
|
+
"TradeOrderEvaluator",
|
|
63
|
+
"DefaultTradeOrderEvaluator",
|
|
64
|
+
"get_risk_free_rate_us",
|
|
65
|
+
"get_annual_volatility",
|
|
66
|
+
"get_sortino_ratio",
|
|
67
|
+
"get_drawdown_series",
|
|
68
|
+
"get_max_drawdown",
|
|
69
|
+
"get_equity_curve",
|
|
70
|
+
"get_price_efficiency_ratio",
|
|
71
|
+
"get_sharpe_ratio",
|
|
72
|
+
"get_profit_factor",
|
|
73
|
+
"get_cumulative_profit_factor_series",
|
|
74
|
+
"get_rolling_profit_factor_series",
|
|
75
|
+
"get_sharpe_ratio",
|
|
76
|
+
"get_cagr",
|
|
77
|
+
"get_standard_deviation_returns",
|
|
78
|
+
"get_standard_deviation_downside_returns",
|
|
79
|
+
"get_max_drawdown_absolute",
|
|
80
|
+
"get_total_return",
|
|
81
|
+
"get_cumulative_exposure",
|
|
82
|
+
"get_exposure_ratio",
|
|
83
|
+
"get_average_trade_duration",
|
|
84
|
+
"get_win_rate",
|
|
85
|
+
"get_win_loss_ratio",
|
|
86
|
+
"get_calmar_ratio",
|
|
87
|
+
"get_trade_frequency",
|
|
88
|
+
"get_yearly_returns",
|
|
89
|
+
"get_monthly_returns",
|
|
90
|
+
"get_best_year",
|
|
91
|
+
"get_best_month",
|
|
92
|
+
"get_worst_year",
|
|
93
|
+
"get_worst_month",
|
|
94
|
+
"get_best_trade",
|
|
95
|
+
"get_worst_trade",
|
|
96
|
+
"get_average_yearly_return",
|
|
97
|
+
"get_average_trade_loss",
|
|
98
|
+
"get_average_monthly_return",
|
|
99
|
+
"get_percentage_winning_months",
|
|
100
|
+
"get_average_trade_duration",
|
|
101
|
+
"get_trade_frequency",
|
|
102
|
+
"get_win_rate",
|
|
103
|
+
"get_win_loss_ratio",
|
|
104
|
+
"get_calmar_ratio",
|
|
105
|
+
"get_max_drawdown_duration",
|
|
106
|
+
"get_max_daily_drawdown",
|
|
107
|
+
"get_trades_per_day",
|
|
108
|
+
"get_trades_per_year",
|
|
109
|
+
"get_average_monthly_return_losing_months",
|
|
110
|
+
"get_average_monthly_return_winning_months",
|
|
111
|
+
"get_percentage_winning_years",
|
|
112
|
+
"get_rolling_sharpe_ratio",
|
|
113
|
+
"get_total_growth",
|
|
114
|
+
"create_backtest_metrics",
|
|
115
|
+
"get_total_loss",
|
|
116
|
+
"get_median_trade_return",
|
|
117
|
+
"get_average_trade_gain",
|
|
118
|
+
"get_average_trade_size",
|
|
119
|
+
"get_average_trade_return",
|
|
120
|
+
"get_positive_trades",
|
|
121
|
+
"get_negative_trades",
|
|
122
|
+
"get_number_of_trades",
|
|
123
|
+
"get_cumulative_return",
|
|
124
|
+
"get_cumulative_return_series",
|
|
125
|
+
"get_current_win_loss_ratio",
|
|
126
|
+
"get_current_win_rate",
|
|
127
|
+
"get_current_win_loss_ratio",
|
|
128
|
+
"get_current_average_trade_loss",
|
|
129
|
+
"get_current_average_trade_duration",
|
|
130
|
+
"get_current_average_trade_gain",
|
|
131
|
+
"get_current_average_trade_return",
|
|
132
|
+
"create_backtest_metrics_for_backtest",
|
|
133
|
+
"TradeStopLossService",
|
|
134
|
+
"TradeTakeProfitService"
|
|
38
135
|
]
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
from .backtest_report_writer_service import BacktestReportWriterService
|
|
2
1
|
from .backtest_service import BacktestService
|
|
3
|
-
from .graphs import create_trade_entry_markers_chart, \
|
|
4
|
-
create_trade_exit_markers_chart
|
|
5
|
-
|
|
6
2
|
|
|
7
3
|
__all__ = [
|
|
8
|
-
"BacktestReportWriterService",
|
|
9
4
|
"BacktestService",
|
|
10
|
-
"create_trade_entry_markers_chart",
|
|
11
|
-
"create_trade_exit_markers_chart"
|
|
12
5
|
]
|