investing-algorithm-framework 1.3.1__py3-none-any.whl → 7.25.6__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.
- investing_algorithm_framework/__init__.py +195 -16
- investing_algorithm_framework/analysis/__init__.py +16 -0
- investing_algorithm_framework/analysis/backtest_data_ranges.py +202 -0
- investing_algorithm_framework/analysis/data.py +170 -0
- investing_algorithm_framework/analysis/markdown.py +91 -0
- investing_algorithm_framework/analysis/ranking.py +298 -0
- investing_algorithm_framework/app/__init__.py +31 -4
- investing_algorithm_framework/app/algorithm/__init__.py +7 -0
- investing_algorithm_framework/app/algorithm/algorithm.py +193 -0
- investing_algorithm_framework/app/algorithm/algorithm_factory.py +118 -0
- investing_algorithm_framework/app/app.py +2233 -264
- investing_algorithm_framework/app/app_hook.py +28 -0
- investing_algorithm_framework/app/context.py +1724 -0
- investing_algorithm_framework/app/eventloop.py +620 -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 +6 -3
- investing_algorithm_framework/app/stateless/action_handlers/action_handler_strategy.py +1 -1
- investing_algorithm_framework/app/stateless/action_handlers/check_online_handler.py +2 -1
- investing_algorithm_framework/app/stateless/action_handlers/run_strategy_handler.py +14 -7
- investing_algorithm_framework/app/stateless/exception_handler.py +1 -1
- investing_algorithm_framework/app/strategy.py +873 -52
- investing_algorithm_framework/app/task.py +5 -3
- investing_algorithm_framework/app/web/__init__.py +2 -1
- investing_algorithm_framework/app/web/controllers/__init__.py +2 -2
- investing_algorithm_framework/app/web/controllers/orders.py +4 -3
- investing_algorithm_framework/app/web/controllers/portfolio.py +1 -1
- investing_algorithm_framework/app/web/controllers/positions.py +3 -3
- investing_algorithm_framework/app/web/create_app.py +4 -2
- investing_algorithm_framework/app/web/error_handler.py +1 -1
- investing_algorithm_framework/app/web/schemas/order.py +2 -2
- investing_algorithm_framework/app/web/schemas/position.py +1 -0
- investing_algorithm_framework/cli/__init__.py +0 -0
- investing_algorithm_framework/cli/cli.py +231 -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/cli/validate_backtest_checkpoints.py +197 -0
- investing_algorithm_framework/create_app.py +43 -9
- investing_algorithm_framework/dependency_container.py +121 -33
- investing_algorithm_framework/domain/__init__.py +109 -22
- investing_algorithm_framework/domain/algorithm_id.py +69 -0
- investing_algorithm_framework/domain/backtesting/__init__.py +25 -0
- investing_algorithm_framework/domain/backtesting/backtest.py +548 -0
- investing_algorithm_framework/domain/backtesting/backtest_date_range.py +113 -0
- investing_algorithm_framework/domain/backtesting/backtest_evaluation_focuss.py +241 -0
- investing_algorithm_framework/domain/backtesting/backtest_metrics.py +470 -0
- investing_algorithm_framework/domain/backtesting/backtest_permutation_test.py +275 -0
- investing_algorithm_framework/domain/backtesting/backtest_run.py +663 -0
- investing_algorithm_framework/domain/backtesting/backtest_summary_metrics.py +162 -0
- investing_algorithm_framework/domain/backtesting/backtest_utils.py +198 -0
- investing_algorithm_framework/domain/backtesting/combine_backtests.py +392 -0
- investing_algorithm_framework/domain/config.py +60 -138
- investing_algorithm_framework/domain/constants.py +23 -34
- investing_algorithm_framework/domain/data_provider.py +334 -0
- investing_algorithm_framework/domain/data_structures.py +42 -0
- investing_algorithm_framework/domain/decimal_parsing.py +40 -0
- investing_algorithm_framework/domain/exceptions.py +51 -1
- investing_algorithm_framework/domain/models/__init__.py +29 -14
- investing_algorithm_framework/domain/models/app_mode.py +34 -0
- investing_algorithm_framework/domain/models/base_model.py +3 -1
- investing_algorithm_framework/domain/models/data/__init__.py +7 -0
- investing_algorithm_framework/domain/models/data/data_source.py +222 -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/__init__.py +5 -0
- investing_algorithm_framework/domain/models/market/market_credential.py +88 -0
- investing_algorithm_framework/domain/models/order/__init__.py +3 -4
- investing_algorithm_framework/domain/models/order/order.py +243 -86
- 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/__init__.py +7 -2
- investing_algorithm_framework/domain/models/portfolio/portfolio.py +134 -1
- investing_algorithm_framework/domain/models/portfolio/portfolio_configuration.py +37 -37
- investing_algorithm_framework/domain/models/portfolio/portfolio_snapshot.py +208 -0
- investing_algorithm_framework/domain/models/position/__init__.py +3 -2
- investing_algorithm_framework/domain/models/position/position.py +29 -0
- investing_algorithm_framework/domain/models/position/position_size.py +41 -0
- investing_algorithm_framework/domain/models/position/{position_cost.py → position_snapshot.py} +16 -8
- 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 +33 -0
- investing_algorithm_framework/domain/models/time_frame.py +94 -98
- investing_algorithm_framework/domain/models/time_interval.py +33 -0
- investing_algorithm_framework/domain/models/time_unit.py +111 -2
- investing_algorithm_framework/domain/models/tracing/__init__.py +0 -0
- investing_algorithm_framework/domain/models/tracing/trace.py +23 -0
- investing_algorithm_framework/domain/models/trade/__init__.py +11 -0
- investing_algorithm_framework/domain/models/trade/trade.py +389 -0
- investing_algorithm_framework/domain/models/trade/trade_status.py +40 -0
- 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 +11 -0
- investing_algorithm_framework/domain/services/market_credential_service.py +37 -0
- investing_algorithm_framework/domain/services/portfolios/__init__.py +5 -0
- investing_algorithm_framework/domain/services/portfolios/portfolio_sync_service.py +9 -0
- investing_algorithm_framework/domain/services/rounding_service.py +27 -0
- 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 +16 -4
- investing_algorithm_framework/domain/utils/csv.py +22 -0
- 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 +244 -0
- investing_algorithm_framework/infrastructure/__init__.py +39 -11
- investing_algorithm_framework/infrastructure/data_providers/__init__.py +36 -0
- investing_algorithm_framework/infrastructure/data_providers/ccxt.py +1152 -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 +87 -13
- investing_algorithm_framework/infrastructure/models/__init__.py +13 -4
- investing_algorithm_framework/infrastructure/models/decimal_parser.py +14 -0
- investing_algorithm_framework/infrastructure/models/order/__init__.py +2 -2
- investing_algorithm_framework/infrastructure/models/order/order.py +73 -73
- 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 +3 -2
- investing_algorithm_framework/infrastructure/models/portfolio/portfolio_snapshot.py +37 -0
- investing_algorithm_framework/infrastructure/models/portfolio/{portfolio.py → sql_portfolio.py} +57 -3
- investing_algorithm_framework/infrastructure/models/position/__init__.py +2 -2
- investing_algorithm_framework/infrastructure/models/position/position.py +16 -11
- investing_algorithm_framework/infrastructure/models/position/position_snapshot.py +23 -0
- 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 +13 -5
- investing_algorithm_framework/infrastructure/repositories/order_metadata_repository.py +17 -0
- investing_algorithm_framework/infrastructure/repositories/order_repository.py +32 -19
- investing_algorithm_framework/infrastructure/repositories/portfolio_repository.py +2 -2
- investing_algorithm_framework/infrastructure/repositories/portfolio_snapshot_repository.py +56 -0
- investing_algorithm_framework/infrastructure/repositories/position_repository.py +47 -4
- investing_algorithm_framework/infrastructure/repositories/position_snapshot_repository.py +21 -0
- investing_algorithm_framework/infrastructure/repositories/repository.py +85 -31
- 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 +9 -2
- investing_algorithm_framework/infrastructure/services/aws/__init__.py +6 -0
- investing_algorithm_framework/infrastructure/services/aws/state_handler.py +193 -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/infrastructure/services/backtesting/__init__.py +9 -0
- investing_algorithm_framework/infrastructure/services/backtesting/backtest_service.py +2596 -0
- investing_algorithm_framework/infrastructure/services/backtesting/event_backtest_service.py +285 -0
- investing_algorithm_framework/infrastructure/services/backtesting/vector_backtest_service.py +468 -0
- investing_algorithm_framework/services/__init__.py +127 -10
- investing_algorithm_framework/services/configuration_service.py +95 -0
- investing_algorithm_framework/services/data_providers/__init__.py +5 -0
- investing_algorithm_framework/services/data_providers/data_provider_service.py +1058 -0
- investing_algorithm_framework/services/market_credential_service.py +40 -0
- investing_algorithm_framework/services/metrics/__init__.py +119 -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 +218 -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 +84 -0
- investing_algorithm_framework/services/metrics/price_efficiency.py +57 -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 +156 -0
- investing_algorithm_framework/services/metrics/trades.py +473 -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 +118 -0
- investing_algorithm_framework/services/metrics/win_rate.py +177 -0
- investing_algorithm_framework/services/order_service/__init__.py +9 -0
- investing_algorithm_framework/services/order_service/order_backtest_service.py +178 -0
- investing_algorithm_framework/services/order_service/order_executor_lookup.py +110 -0
- investing_algorithm_framework/services/order_service/order_service.py +826 -0
- investing_algorithm_framework/services/portfolios/__init__.py +16 -0
- investing_algorithm_framework/services/portfolios/backtest_portfolio_service.py +54 -0
- investing_algorithm_framework/services/{portfolio_configuration_service.py → portfolios/portfolio_configuration_service.py} +27 -12
- investing_algorithm_framework/services/portfolios/portfolio_provider_lookup.py +106 -0
- investing_algorithm_framework/services/portfolios/portfolio_service.py +188 -0
- investing_algorithm_framework/services/portfolios/portfolio_snapshot_service.py +136 -0
- investing_algorithm_framework/services/portfolios/portfolio_sync_service.py +182 -0
- investing_algorithm_framework/services/positions/__init__.py +7 -0
- investing_algorithm_framework/services/positions/position_service.py +210 -0
- investing_algorithm_framework/services/positions/position_snapshot_service.py +18 -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 +117 -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 +9 -0
- investing_algorithm_framework/services/trade_service/trade_service.py +1099 -0
- 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.25.6.dist-info/METADATA +535 -0
- investing_algorithm_framework-7.25.6.dist-info/RECORD +268 -0
- {investing_algorithm_framework-1.3.1.dist-info → investing_algorithm_framework-7.25.6.dist-info}/WHEEL +1 -2
- investing_algorithm_framework-7.25.6.dist-info/entry_points.txt +3 -0
- investing_algorithm_framework/app/algorithm.py +0 -410
- investing_algorithm_framework/domain/models/market_data/__init__.py +0 -11
- investing_algorithm_framework/domain/models/market_data/asset_price.py +0 -50
- investing_algorithm_framework/domain/models/market_data/ohlcv.py +0 -76
- investing_algorithm_framework/domain/models/market_data/order_book.py +0 -63
- investing_algorithm_framework/domain/models/market_data/ticker.py +0 -92
- investing_algorithm_framework/domain/models/order/order_fee.py +0 -45
- investing_algorithm_framework/domain/models/trading_data_types.py +0 -47
- investing_algorithm_framework/domain/models/trading_time_frame.py +0 -205
- investing_algorithm_framework/domain/singleton.py +0 -9
- investing_algorithm_framework/infrastructure/models/order/order_fee.py +0 -21
- investing_algorithm_framework/infrastructure/models/position/position_cost.py +0 -32
- investing_algorithm_framework/infrastructure/repositories/order_fee_repository.py +0 -15
- investing_algorithm_framework/infrastructure/repositories/position_cost_repository.py +0 -16
- investing_algorithm_framework/infrastructure/services/market_service.py +0 -422
- investing_algorithm_framework/services/market_data_service.py +0 -75
- investing_algorithm_framework/services/order_service.py +0 -464
- investing_algorithm_framework/services/portfolio_service.py +0 -105
- investing_algorithm_framework/services/position_cost_service.py +0 -5
- investing_algorithm_framework/services/position_service.py +0 -50
- investing_algorithm_framework/services/strategy_orchestrator_service.py +0 -219
- investing_algorithm_framework/setup_logging.py +0 -40
- investing_algorithm_framework-1.3.1.dist-info/AUTHORS.md +0 -8
- investing_algorithm_framework-1.3.1.dist-info/METADATA +0 -172
- investing_algorithm_framework-1.3.1.dist-info/RECORD +0 -103
- investing_algorithm_framework-1.3.1.dist-info/top_level.txt +0 -1
- {investing_algorithm_framework-1.3.1.dist-info → investing_algorithm_framework-7.25.6.dist-info}/LICENSE +0 -0
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import schedule
|
|
2
|
-
from datetime import datetime
|
|
3
|
-
from investing_algorithm_framework.domain import StoppableThread, TimeUnit, \
|
|
4
|
-
OperationalException
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class StrategyOrchestratorService:
|
|
8
|
-
|
|
9
|
-
def __init__(self, market_data_service):
|
|
10
|
-
self.history = {}
|
|
11
|
-
self._strategies = []
|
|
12
|
-
self._tasks = []
|
|
13
|
-
self.threads = []
|
|
14
|
-
self.iterations = 0
|
|
15
|
-
self.max_iterations = -1
|
|
16
|
-
self.clear()
|
|
17
|
-
self.market_data_service = market_data_service
|
|
18
|
-
|
|
19
|
-
def cleanup_threads(self):
|
|
20
|
-
|
|
21
|
-
for stoppable in self.threads:
|
|
22
|
-
if not stoppable.is_alive():
|
|
23
|
-
# get results from thread
|
|
24
|
-
stoppable.done = True
|
|
25
|
-
self.threads = [t for t in self.threads if not t.done]
|
|
26
|
-
|
|
27
|
-
def run_strategy(self, strategy, algorithm, sync=False):
|
|
28
|
-
self.cleanup_threads()
|
|
29
|
-
|
|
30
|
-
matching_thread = next(
|
|
31
|
-
(t for t in self.threads if t.name == strategy.worker_id),
|
|
32
|
-
None
|
|
33
|
-
)
|
|
34
|
-
|
|
35
|
-
# Don't run a strategy that is already running
|
|
36
|
-
if matching_thread:
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
market_data = self.market_data_service.get_data_for_strategy(strategy)
|
|
40
|
-
|
|
41
|
-
if sync:
|
|
42
|
-
strategy.run_strategy(
|
|
43
|
-
market_data=market_data,
|
|
44
|
-
algorithm=algorithm
|
|
45
|
-
)
|
|
46
|
-
else:
|
|
47
|
-
self.iterations += 1
|
|
48
|
-
thread = StoppableThread(
|
|
49
|
-
target=strategy.run_strategy,
|
|
50
|
-
kwargs={
|
|
51
|
-
"market_data": market_data,
|
|
52
|
-
"algorithm": algorithm
|
|
53
|
-
}
|
|
54
|
-
)
|
|
55
|
-
thread.name = strategy.worker_id
|
|
56
|
-
thread.start()
|
|
57
|
-
self.threads.append(thread)
|
|
58
|
-
|
|
59
|
-
self.history[strategy.worker_id] = {"last_run": datetime.utcnow()}
|
|
60
|
-
|
|
61
|
-
def run_task(self, task, algorithm, sync=False):
|
|
62
|
-
self.cleanup_threads()
|
|
63
|
-
|
|
64
|
-
matching_thread = next(
|
|
65
|
-
(t for t in self.threads if t.name == task.worker_id),
|
|
66
|
-
None
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
# Don't run a strategy that is already running
|
|
70
|
-
if matching_thread:
|
|
71
|
-
return
|
|
72
|
-
|
|
73
|
-
if sync:
|
|
74
|
-
task.run(algorithm=algorithm)
|
|
75
|
-
else:
|
|
76
|
-
self.iterations += 1
|
|
77
|
-
thread = StoppableThread(
|
|
78
|
-
target=task.run,
|
|
79
|
-
kwargs={"algorithm": algorithm}
|
|
80
|
-
)
|
|
81
|
-
thread.name = task.worker_id
|
|
82
|
-
thread.start()
|
|
83
|
-
self.threads.append(thread)
|
|
84
|
-
|
|
85
|
-
self.history[task.worker_id] = {"last_run": datetime.utcnow()}
|
|
86
|
-
|
|
87
|
-
def start(self, algorithm, number_of_iterations=None):
|
|
88
|
-
self.max_iterations = number_of_iterations
|
|
89
|
-
|
|
90
|
-
for strategy in self.strategies:
|
|
91
|
-
|
|
92
|
-
if TimeUnit.SECOND.equals(strategy.time_unit):
|
|
93
|
-
schedule.every(strategy.interval)\
|
|
94
|
-
.seconds.do(self.run_strategy, strategy, algorithm)
|
|
95
|
-
elif TimeUnit.MINUTE.equals(strategy.time_unit):
|
|
96
|
-
schedule.every(strategy.interval)\
|
|
97
|
-
.minutes.do(self.run_strategy, strategy, algorithm)
|
|
98
|
-
elif TimeUnit.HOUR.equals(strategy.time_unit):
|
|
99
|
-
schedule.every(strategy.interval)\
|
|
100
|
-
.hours.do(self.run_strategy, strategy, algorithm)
|
|
101
|
-
|
|
102
|
-
for task in self.tasks:
|
|
103
|
-
|
|
104
|
-
if TimeUnit.SECOND.equals(task.time_unit):
|
|
105
|
-
schedule.every(task.interval)\
|
|
106
|
-
.seconds.do(self.run_task, task, algorithm)
|
|
107
|
-
elif TimeUnit.MINUTE.equals(task.time_unit):
|
|
108
|
-
schedule.every(task.interval)\
|
|
109
|
-
.minutes.do(self.run_task, task, algorithm)
|
|
110
|
-
elif TimeUnit.HOUR.equals(task.time_unit):
|
|
111
|
-
schedule.every(task.interval)\
|
|
112
|
-
.hours.do(self.run_task, task, algorithm)
|
|
113
|
-
|
|
114
|
-
def stop(self):
|
|
115
|
-
for thread in self.threads:
|
|
116
|
-
thread.stop()
|
|
117
|
-
|
|
118
|
-
schedule.clear()
|
|
119
|
-
|
|
120
|
-
def clear(self):
|
|
121
|
-
self.threads = []
|
|
122
|
-
schedule.clear()
|
|
123
|
-
|
|
124
|
-
def get_strategies(self, identifiers=None):
|
|
125
|
-
if identifiers is None:
|
|
126
|
-
return self.strategies
|
|
127
|
-
|
|
128
|
-
strategies = []
|
|
129
|
-
for strategy in self.strategies:
|
|
130
|
-
if strategy.worker_id in identifiers:
|
|
131
|
-
strategies.append(strategy)
|
|
132
|
-
|
|
133
|
-
return strategies
|
|
134
|
-
|
|
135
|
-
def get_tasks(self):
|
|
136
|
-
return self._tasks
|
|
137
|
-
|
|
138
|
-
def get_jobs(self):
|
|
139
|
-
return schedule.jobs
|
|
140
|
-
|
|
141
|
-
def run_pending_jobs(self):
|
|
142
|
-
|
|
143
|
-
if self.max_iterations is not None and \
|
|
144
|
-
self.max_iterations != -1 and \
|
|
145
|
-
self.iterations >= self.max_iterations:
|
|
146
|
-
self.clear()
|
|
147
|
-
else:
|
|
148
|
-
schedule.run_pending()
|
|
149
|
-
|
|
150
|
-
def add_strategy(self, strategy):
|
|
151
|
-
|
|
152
|
-
if strategy.worker_id not in self._strategies:
|
|
153
|
-
self._strategies.append(strategy)
|
|
154
|
-
else:
|
|
155
|
-
raise OperationalException(
|
|
156
|
-
"Strategy already exists with the same name"
|
|
157
|
-
)
|
|
158
|
-
|
|
159
|
-
def add_strategies(self, strategies):
|
|
160
|
-
has_duplicates = False
|
|
161
|
-
|
|
162
|
-
for i in range(len(strategies)):
|
|
163
|
-
for j in range(i + 1, len(strategies)):
|
|
164
|
-
if strategies[i].worker_id == strategies[j].worker_id:
|
|
165
|
-
has_duplicates = True
|
|
166
|
-
break
|
|
167
|
-
|
|
168
|
-
if has_duplicates:
|
|
169
|
-
raise OperationalException(
|
|
170
|
-
"There are duplicate strategies with the same name"
|
|
171
|
-
)
|
|
172
|
-
|
|
173
|
-
self.strategies = strategies
|
|
174
|
-
|
|
175
|
-
def add_tasks(self, tasks):
|
|
176
|
-
has_duplicates = False
|
|
177
|
-
|
|
178
|
-
for i in range(len(tasks)):
|
|
179
|
-
for j in range(i + 1, len(tasks)):
|
|
180
|
-
if tasks[i].worker_id == tasks[j].worker_id:
|
|
181
|
-
has_duplicates = True
|
|
182
|
-
break
|
|
183
|
-
|
|
184
|
-
if has_duplicates:
|
|
185
|
-
raise OperationalException(
|
|
186
|
-
"There are duplicate tasks with the same name"
|
|
187
|
-
)
|
|
188
|
-
|
|
189
|
-
self.tasks = tasks
|
|
190
|
-
|
|
191
|
-
@property
|
|
192
|
-
def strategies(self):
|
|
193
|
-
return self._strategies
|
|
194
|
-
|
|
195
|
-
@strategies.setter
|
|
196
|
-
def strategies(self, strategies):
|
|
197
|
-
self._strategies = strategies
|
|
198
|
-
|
|
199
|
-
@property
|
|
200
|
-
def tasks(self):
|
|
201
|
-
return self._tasks
|
|
202
|
-
|
|
203
|
-
@tasks.setter
|
|
204
|
-
def tasks(self, tasks):
|
|
205
|
-
self._tasks = tasks
|
|
206
|
-
|
|
207
|
-
@property
|
|
208
|
-
def running(self):
|
|
209
|
-
if len(self.strategies) == 0 and len(self.tasks) == 0:
|
|
210
|
-
return False
|
|
211
|
-
|
|
212
|
-
if self.max_iterations == -1:
|
|
213
|
-
return True
|
|
214
|
-
|
|
215
|
-
return self.max_iterations is None \
|
|
216
|
-
or self.iterations < self.max_iterations
|
|
217
|
-
|
|
218
|
-
def has_run(self, worker_id):
|
|
219
|
-
return worker_id in self.history
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
def setup_logging(log_level="INFO"):
|
|
5
|
-
DEFAULT_LOGGING = {
|
|
6
|
-
'version': 1,
|
|
7
|
-
'disable_existing_loggers': True,
|
|
8
|
-
'formatters': {
|
|
9
|
-
'standard': {
|
|
10
|
-
'format': '%(asctime)s [%(levelname)s] %(name)s: %(message)s'
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
'handlers': {
|
|
14
|
-
'default': {
|
|
15
|
-
'level': 'INFO',
|
|
16
|
-
'formatter': 'standard',
|
|
17
|
-
'class': 'logging.StreamHandler',
|
|
18
|
-
'stream': 'ext://sys.stdout', # Default is stderr
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
'loggers': {
|
|
22
|
-
'': { # root logger
|
|
23
|
-
'handlers': ['default'],
|
|
24
|
-
'level': 'WARNING',
|
|
25
|
-
'propagate': False
|
|
26
|
-
},
|
|
27
|
-
'investing_algorithm_framework': {
|
|
28
|
-
'handlers': ['default'],
|
|
29
|
-
'level': 'INFO',
|
|
30
|
-
'propagate': False
|
|
31
|
-
},
|
|
32
|
-
'__main__': { # if __name__ == '__main__'
|
|
33
|
-
'handlers': ['default'],
|
|
34
|
-
'level': 'DEBUG',
|
|
35
|
-
'propagate': False
|
|
36
|
-
},
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
logging.config.dictConfig(DEFAULT_LOGGING)
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Marc van Duyn | Mod and Contributor
|
|
2
|
-
<a href="https://linkedin.com/in/marc-van-duyn">
|
|
3
|
-
<img src="https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white" width="200px" />
|
|
4
|
-
</a>
|
|
5
|
-
<br/>
|
|
6
|
-
<a href="https://github.com/MDUYN">
|
|
7
|
-
<img src="https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white" width="200px" />
|
|
8
|
-
</a>
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: investing-algorithm-framework
|
|
3
|
-
Version: 1.3.1
|
|
4
|
-
Summary: A framework for creating an investment algorithm
|
|
5
|
-
Home-page: https://github.com/coding-kitties/investing-algorithm-framework.git
|
|
6
|
-
Download-URL: https://github.com/coding-kitties/investing-algorithm-framework/archive/v0.1.1.tar.gz
|
|
7
|
-
Author: coding kitties
|
|
8
|
-
License: Apache License 2.0
|
|
9
|
-
Keywords: TRADING,INVESTING,BOT,ALGORITHM,FRAMEWORK
|
|
10
|
-
Classifier: Intended Audience :: Developers
|
|
11
|
-
Classifier: Programming Language :: Python :: 3
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.4
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.5
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
15
|
-
Classifier: Topic :: Software Development
|
|
16
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
17
|
-
Classifier: Operating System :: OS Independent
|
|
18
|
-
Requires-Python: >=3
|
|
19
|
-
Description-Content-Type: text/markdown
|
|
20
|
-
License-File: LICENSE
|
|
21
|
-
License-File: AUTHORS.md
|
|
22
|
-
Requires-Dist: wrapt (==1.11.2)
|
|
23
|
-
Requires-Dist: Flask (==2.3.2)
|
|
24
|
-
Requires-Dist: Flask-Migrate (==2.6.0)
|
|
25
|
-
Requires-Dist: Flask-Cors (==3.0.9)
|
|
26
|
-
Requires-Dist: SQLAlchemy (==2.0.18)
|
|
27
|
-
Requires-Dist: marshmallow (==3.5.0)
|
|
28
|
-
Requires-Dist: setuptools (>=60.9.0)
|
|
29
|
-
Requires-Dist: ccxt (>=3.0.57)
|
|
30
|
-
Requires-Dist: python-dateutil (==2.8.2)
|
|
31
|
-
Requires-Dist: MarkupSafe (==2.1.2)
|
|
32
|
-
Requires-Dist: dependency-injector (==4.40.0)
|
|
33
|
-
Requires-Dist: schedule (==1.1.0)
|
|
34
|
-
Requires-Dist: pandas (==2.0.0)
|
|
35
|
-
|
|
36
|
-
<a href=https://investing-algorithm-framework.com><img src="https://img.shields.io/badge/docs-website-brightgreen"></a>
|
|
37
|
-
[](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/build.yml)
|
|
38
|
-
[](https://github.com/coding-kitties/investing-algorithm-framework/actions/workflows/test.yml)
|
|
39
|
-
[](https://pepy.tech/badge/investing-algorithm-framework)
|
|
40
|
-
[](https://img.shields.io/pypi/v/investing_algorithm_framework.svg)
|
|
41
|
-
<a href="https://www.reddit.com/r/InvestingBots/"><img src="https://img.shields.io/reddit/subreddit-subscribers/investingbots?style=social"></a>
|
|
42
|
-
###### Sponsors
|
|
43
|
-
<p align="left">
|
|
44
|
-
<a href="https://logicfunds.io">
|
|
45
|
-
<img alt="logicfunds" src="https://logicfunds-web-app-images.s3.eu-central-1.amazonaws.com/logicfunds-logo.png" width="200px" />
|
|
46
|
-
</a>
|
|
47
|
-
</p>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
# [Investing Algorithm Framework](https://github.com/coding-kitties/investing-algorithm-framework)
|
|
51
|
-
|
|
52
|
-
The Investing Algorithm Framework is a Python tool that enables swift and
|
|
53
|
-
elegant development of investment algorithms and trading bots. It comes with all the necessary
|
|
54
|
-
components for creating algorithms, including data provisioning, portfolio management, and order execution.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
## Example
|
|
58
|
-
The following algorithm connects to binance and buys BTC every 5 seconds.
|
|
59
|
-
It also exposes an REST API that allows you to interact with the algorithm.
|
|
60
|
-
```python
|
|
61
|
-
import pathlib
|
|
62
|
-
from datetime import datetime, timedelta
|
|
63
|
-
|
|
64
|
-
from investing_algorithm_framework import create_app, PortfolioConfiguration, \
|
|
65
|
-
RESOURCE_DIRECTORY, TimeUnit, TradingTimeFrame, TradingDataType, OrderSide
|
|
66
|
-
|
|
67
|
-
app = create_app({RESOURCE_DIRECTORY: pathlib.Path(__file__).parent.resolve()})
|
|
68
|
-
app.add_portfolio_configuration(
|
|
69
|
-
PortfolioConfiguration(
|
|
70
|
-
market="binance",
|
|
71
|
-
api_key="xxxxxx",
|
|
72
|
-
secret_key="xxxxxx",
|
|
73
|
-
trading_symbol="USDT"
|
|
74
|
-
)
|
|
75
|
-
)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
@app.strategy(
|
|
79
|
-
time_unit=TimeUnit.SECOND, # Algorithm will be executed every 5 seconds
|
|
80
|
-
interval=5,
|
|
81
|
-
market="binance", # Will retrieve trading data from binance
|
|
82
|
-
symbols=["BTC/USDT", "ETH/USDT", ["DOT/USDT"]], # Symbols must be in the format of TARGET/TRADE symbol (e.g. BTC/USDT)
|
|
83
|
-
trading_data_types=[TradingDataType.OHLCV, TradingDataType.TICKER, TradingDataType.ORDER_BOOK],
|
|
84
|
-
trading_time_frame_start_date=datetime.utcnow() - timedelta(days=1), # Will retrieve data from the last 24 hours
|
|
85
|
-
trading_time_frame=TradingTimeFrame.ONE_MINUTE # Will retrieve data on 1m interval (OHLCV)
|
|
86
|
-
)
|
|
87
|
-
def perform_strategy(algorithm, market_data):
|
|
88
|
-
print(algorithm.get_allocated())
|
|
89
|
-
print(algorithm.get_unallocated())
|
|
90
|
-
print(market_data)
|
|
91
|
-
algorithm.create_limit_order(
|
|
92
|
-
target_symbol="BTC",
|
|
93
|
-
side=OrderSide.BUY,
|
|
94
|
-
price=market_data["TICKER"]["BTC/USDT"]["BID"],
|
|
95
|
-
amount_target_symbol=0.00001
|
|
96
|
-
)
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
if __name__ == "__main__":
|
|
100
|
-
app.run()
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
> You can find more examples [here](./examples) folder.
|
|
104
|
-
|
|
105
|
-
## Broker/Exchange configuration
|
|
106
|
-
The framework has by default support for [ccxt](https://github.com/ccxt/ccxt).
|
|
107
|
-
This should allow you to connect to a lot of brokers/exchanges.
|
|
108
|
-
|
|
109
|
-
```python
|
|
110
|
-
from investing_algorithm_framework import App, PortfolioConfiguration
|
|
111
|
-
app = App()
|
|
112
|
-
app.add_portfolio_configuration(
|
|
113
|
-
PortfolioConfiguration(
|
|
114
|
-
market="bitvavo",
|
|
115
|
-
api_key="xxxx",
|
|
116
|
-
secret_key="xxxx",
|
|
117
|
-
track_from="01/01/2022",
|
|
118
|
-
trading_symbol="EUR"
|
|
119
|
-
)
|
|
120
|
-
)
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
## Download
|
|
124
|
-
You can download the framework with pypi.
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
pip install investing-algorithm-framework
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
## Disclaimer
|
|
131
|
-
If you use this framework for your investments, do not risk money
|
|
132
|
-
which you are afraid to lose, until you have clear understanding how
|
|
133
|
-
the framework works. We can't stress this enough:
|
|
134
|
-
|
|
135
|
-
BEFORE YOU START USING MONEY WITH THE FRAMEWORK, MAKE SURE THAT YOU TESTED
|
|
136
|
-
YOUR COMPONENTS THOROUGHLY. USE THE SOFTWARE AT YOUR OWN RISK.
|
|
137
|
-
THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR INVESTMENT RESULTS.
|
|
138
|
-
|
|
139
|
-
Also, make sure that you read the source code of any plugin you use or
|
|
140
|
-
implementation of an algorithm made with this framework.
|
|
141
|
-
|
|
142
|
-
For further information regarding usage and licensing we recommend going
|
|
143
|
-
to the licensing page at the website.
|
|
144
|
-
|
|
145
|
-
## Documentation
|
|
146
|
-
|
|
147
|
-
All the documentation can be found online
|
|
148
|
-
at the [documentation webstie](https://investing-algorithm-framework.com)
|
|
149
|
-
|
|
150
|
-
In most cases, you'll probably never have to change code on this repo directly
|
|
151
|
-
if you are building your algorithm/bot. But if you do, check out the
|
|
152
|
-
contributing page at the website.
|
|
153
|
-
|
|
154
|
-
If you'd like to chat with investing-algorithm-framework users
|
|
155
|
-
and developers, [join us on Slack](https://inv-algo-framework.slack.com) or [join us on reddit](https://www.reddit.com/r/InvestingBots/)
|
|
156
|
-
|
|
157
|
-
## Acknowledgements
|
|
158
|
-
We want to thank all contributors to this project. A full list of all
|
|
159
|
-
the people that contributed to the project can be
|
|
160
|
-
found [here](https://github.com/investing-algorithms/investing-algorithm-framework/blob/master/AUTHORS.md)
|
|
161
|
-
|
|
162
|
-
### [Bugs / Issues](https://github.com/investing-algorithms/investing-algorithm-framework/issues?q=is%3Aissue)
|
|
163
|
-
|
|
164
|
-
If you discover a bug in the framework, please [search our issue tracker](https://github.com/investing-algorithms/investing-algorithm-framework/issues?q=is%3Aissue)
|
|
165
|
-
first. If it hasn't been reported, please [create a new issue](https://github.com/investing-algorithms/investing-algorithm-framework/issues/new).
|
|
166
|
-
|
|
167
|
-
Feel like the framework is missing a feature? We welcome your pull requests!
|
|
168
|
-
|
|
169
|
-
**Note** before starting any major new feature work, *please open an issue describing what you are planning to do*.
|
|
170
|
-
This will ensure that interested parties can give valuable feedback on the feature, and let others know that you are working on it.
|
|
171
|
-
|
|
172
|
-
**Important:** Always create your feature or hotfix against the `develop` branch, not `master`.
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
investing_algorithm_framework/__init__.py,sha256=wC7o0kdyqlyikYmc9lehSXgs6MpcLnqPzthsfjASfJo,926
|
|
2
|
-
investing_algorithm_framework/create_app.py,sha256=Hhov-J3uklhg3oeae_Fn-Crn7XnMGjJozguUmECwzfE,464
|
|
3
|
-
investing_algorithm_framework/dependency_container.py,sha256=qoDJhiak2fsAKHvOFO6RFcyLN_hLgk1YUnTAKEoDRCE,3228
|
|
4
|
-
investing_algorithm_framework/setup_logging.py,sha256=B-yTGc5mDKsJnvxx7NCwQpcplEQQ7GYiclj2lAu4-wk,1156
|
|
5
|
-
investing_algorithm_framework/app/__init__.py,sha256=hren3Z-ifCclENtY2wlF05eb1wWwI1GbEE0n5klpSzU,427
|
|
6
|
-
investing_algorithm_framework/app/algorithm.py,sha256=Be3kr7QyZfOaUXQZkO5ye64lBw4PKPJ4HyGgBcdeE0k,12532
|
|
7
|
-
investing_algorithm_framework/app/app.py,sha256=ISJY2ChXrb-zcaUsboL3z7DZtiPaFoUI6tbf2koKYfs,13325
|
|
8
|
-
investing_algorithm_framework/app/strategy.py,sha256=21wyfCWxaUf63Ts98CoOMeQmq0OUgYPQexxDrp_dHAA,2501
|
|
9
|
-
investing_algorithm_framework/app/task.py,sha256=O8CnJT-cJfQVvC0ZG_w489KLLAemSrkyihHvQsuDvoE,963
|
|
10
|
-
investing_algorithm_framework/app/stateless/__init__.py,sha256=VuEfb7QqDsfpFCnZdpvw8vvpNMRqOb-3w0yOpHiYlWg,1092
|
|
11
|
-
investing_algorithm_framework/app/stateless/exception_handler.py,sha256=26sXtWKuCyS2qkdu2NuITjysgzzJa-QyEX1hvfNQmZ0,1062
|
|
12
|
-
investing_algorithm_framework/app/stateless/action_handlers/__init__.py,sha256=k285XeCTSGdesBgnOPZ_sByLqytla_03kDPhSylPhsA,2344
|
|
13
|
-
investing_algorithm_framework/app/stateless/action_handlers/action_handler_strategy.py,sha256=Ws687Syr1ytQFXaOMpp2CGKqw2ru22elTdWuVA5IiMc,154
|
|
14
|
-
investing_algorithm_framework/app/stateless/action_handlers/check_online_handler.py,sha256=DII_zHrL-IaxyfmbKDWMnmlEr0AbFGuhUkv5qHuqlsQ,451
|
|
15
|
-
investing_algorithm_framework/app/stateless/action_handlers/run_strategy_handler.py,sha256=2DF3EKmvVe04wrOuilRppNDyJFC8GmdOdeqc4DZP6h8,1062
|
|
16
|
-
investing_algorithm_framework/app/web/__init__.py,sha256=vtmNhjqhbO69A51H-Gwgrr6-M_aErO4EOFjPbCM5Wzg,134
|
|
17
|
-
investing_algorithm_framework/app/web/create_app.py,sha256=cyCvTSuM7FtUQNc3xnBH459qJUZKXWNd3QVhKRaPYIw,506
|
|
18
|
-
investing_algorithm_framework/app/web/error_handler.py,sha256=aWO1jgf3Oys6mlbbs2goYwZmTR1Eq6VDzIDvzEsrEMk,1997
|
|
19
|
-
investing_algorithm_framework/app/web/responses.py,sha256=xbipQc0vcXHK6ouinsPdDHMHTxeLPebg-8uyeCG7zxQ,585
|
|
20
|
-
investing_algorithm_framework/app/web/run_strategies.py,sha256=H3EHtFORA9MX3CYc7F0csCY2dTEt48FCRP5Wp-1V28U,158
|
|
21
|
-
investing_algorithm_framework/app/web/setup_cors.py,sha256=ASCon0U0d7cedI-s37fdztDJozVvbNiYWYDLTHDydv8,80
|
|
22
|
-
investing_algorithm_framework/app/web/controllers/__init__.py,sha256=AL_uNAf1OhjfWeHqd4t24TiNfkTk-m28aWmxyxpRiVY,587
|
|
23
|
-
investing_algorithm_framework/app/web/controllers/orders.py,sha256=j8VJtc9aDvM-XZIYRNQtcWWwcLPWB2-WxTMbIAWg91E,670
|
|
24
|
-
investing_algorithm_framework/app/web/controllers/portfolio.py,sha256=jcQhB8f2qUne6Owrw6qdQeovf52pClJhr0EojdsS2C4,704
|
|
25
|
-
investing_algorithm_framework/app/web/controllers/positions.py,sha256=GbHUHXE_1s9ivAfKt42INPxfR_2pfSq_QHmt6FD7bV0,594
|
|
26
|
-
investing_algorithm_framework/app/web/schemas/__init__.py,sha256=pSkgN5AGiW48BD0vaQDdQQ6N90ryxGIimgEYJ-elSGY,361
|
|
27
|
-
investing_algorithm_framework/app/web/schemas/order.py,sha256=eRWDlVlfBmTgHz3UmY9abKm7bg_48ij1W369Cts0QPo,430
|
|
28
|
-
investing_algorithm_framework/app/web/schemas/portfolio.py,sha256=COXC_kpBUgPOBWy5ENtcfEs5U7lVrN8zxQYBqH9trfo,743
|
|
29
|
-
investing_algorithm_framework/app/web/schemas/position.py,sha256=kTF0J4SyZPmFSPFhq-LyfiVJf7EyehAL85COy__rfag,437
|
|
30
|
-
investing_algorithm_framework/domain/__init__.py,sha256=H1FUY7RkLzXZARTmPFsJaParzd5kPkvzh8uswSlQQ5U,1884
|
|
31
|
-
investing_algorithm_framework/domain/config.py,sha256=xCkBZTP5ykQArT8jJ3p5s7vz6p_icg_QSSEg51FCDJ4,4693
|
|
32
|
-
investing_algorithm_framework/domain/constants.py,sha256=40Sve3z4yLhgd5-rbVD6xmGhdr7M3jFMaqE-Ujye1Kg,1612
|
|
33
|
-
investing_algorithm_framework/domain/exceptions.py,sha256=3Er4UFN5oSUrJUbgEmcaZGtYJwW5WPbxWzT3BrZNHZk,1628
|
|
34
|
-
investing_algorithm_framework/domain/singleton.py,sha256=lgWZOWFBU4WlIe-h6p_MHd2MNOQSICtFR9HvdtVNqbQ,258
|
|
35
|
-
investing_algorithm_framework/domain/stateless_actions.py,sha256=DHhuI_3oL6JqWWucsZNvB3a9vFthZAk20Rg89_lc9o8,156
|
|
36
|
-
investing_algorithm_framework/domain/strategy.py,sha256=bLiMll_hoOjCjgeSnTN5a9sriPgL8N4qULqDxD9zsQk,1805
|
|
37
|
-
investing_algorithm_framework/domain/models/__init__.py,sha256=5pPtlZfSvqWUN56CF0-7wdryyAdzqchnDCupbOIr3nc,778
|
|
38
|
-
investing_algorithm_framework/domain/models/base_model.py,sha256=8Ck0mK07GLbkJAYxB-LbAdpjStxTR0SqQ9oZIcNo4ok,620
|
|
39
|
-
investing_algorithm_framework/domain/models/time_frame.py,sha256=BG3NGM642ud83Do-57QqXJuOe3C2MdiR_dJTsM9Pghw,4983
|
|
40
|
-
investing_algorithm_framework/domain/models/time_interval.py,sha256=PyA0JeGgV51kf0sZ1yeQ52BCLsrJqlqD1FxGm53qioY,2798
|
|
41
|
-
investing_algorithm_framework/domain/models/time_unit.py,sha256=5MBTKSWDCiEX-nwAxxR6X19DoxprBm4Fm_w8A1CmoPw,829
|
|
42
|
-
investing_algorithm_framework/domain/models/trading_data_types.py,sha256=sVk8ATXllJDIvRluqm08O_UkgDzCJO6l02k0C-kJwyg,1119
|
|
43
|
-
investing_algorithm_framework/domain/models/trading_time_frame.py,sha256=BAvlZfqWFCO4uYVH-VQxktLsP6rei8D_lBaT4XHtxzE,6186
|
|
44
|
-
investing_algorithm_framework/domain/models/market_data/__init__.py,sha256=C3OgowzLywEUq1eLnAx3NhNm4Ny90LWt759Bod362O4,198
|
|
45
|
-
investing_algorithm_framework/domain/models/market_data/asset_price.py,sha256=f_nc1AziLKbaH952rVbJwiaGEN9eMnKMPPkcvOPE1g0,1137
|
|
46
|
-
investing_algorithm_framework/domain/models/market_data/ohlcv.py,sha256=oi7qIvI5Sh943skeBbW0BzM1SRo5eAUblstiTgYdEV4,2039
|
|
47
|
-
investing_algorithm_framework/domain/models/market_data/order_book.py,sha256=Iwke0TSWKcFr9yOx414LaoRqzzpU4pzmfFfOQGUQvHg,1465
|
|
48
|
-
investing_algorithm_framework/domain/models/market_data/ticker.py,sha256=CQgDXQ5N9JPHKUaLRUVST-MGK5-vmDMg8EI1ReqPCUQ,2560
|
|
49
|
-
investing_algorithm_framework/domain/models/order/__init__.py,sha256=473g7Ist0MXuQzZ2pcm4DJjm5SIH4_GGr_GOKKNicYM,237
|
|
50
|
-
investing_algorithm_framework/domain/models/order/order.py,sha256=b2aUGHsJmI_8-IF1TUbO1DpJhXKzfPjWWmOcBdY9ap8,6666
|
|
51
|
-
investing_algorithm_framework/domain/models/order/order_fee.py,sha256=XXGZujbvTKOd4JxDWw1aWWtcRGMAPgbDmWyWP4B9bKU,1055
|
|
52
|
-
investing_algorithm_framework/domain/models/order/order_side.py,sha256=lMSTM8rb_Q3qgApryI0RXKiAAeGKDDlyu3q9bbuAQ-w,814
|
|
53
|
-
investing_algorithm_framework/domain/models/order/order_status.py,sha256=7BpFOcJ1NEeOZfolmE32mHRrI_afkBUBLR2gh-aGfA0,937
|
|
54
|
-
investing_algorithm_framework/domain/models/order/order_type.py,sha256=xL8YVlcwCNKv44MRNAwSVs_ZGemfMSYYwxkNMp7ai-M,751
|
|
55
|
-
investing_algorithm_framework/domain/models/portfolio/__init__.py,sha256=dHhM9YbA1ODMSgfyQa8hlA_I5ZdoVhPf4fyrQcT0PKs,144
|
|
56
|
-
investing_algorithm_framework/domain/models/portfolio/portfolio.py,sha256=u1A1pi1bgJ3msPcMMPEv6TxN8_1Gk685r_xqNS75bO8,1022
|
|
57
|
-
investing_algorithm_framework/domain/models/portfolio/portfolio_configuration.py,sha256=jkKE67ZVCcvDZicdfLN3_Zes1WrSoQCKNsbbdJlBm0k,2391
|
|
58
|
-
investing_algorithm_framework/domain/models/position/__init__.py,sha256=A_qzk_tu7WrPKXkBjO_8Phx5BK0OI55pp3T7A0mcd-c,111
|
|
59
|
-
investing_algorithm_framework/domain/models/position/position.py,sha256=FAoytMLiVZlnJCmJRy4S9XdVvAINJFL9XZsfHXyqW9g,877
|
|
60
|
-
investing_algorithm_framework/domain/models/position/position_cost.py,sha256=v-ZQX2U7UfBnJj3C2W0wGAVdd6j0p5iWQNRIf_kA0nY,870
|
|
61
|
-
investing_algorithm_framework/domain/utils/__init__.py,sha256=pMiAHBfc3HeEnsHnOdIC1O4P1et2P6-sXnRf3xQ75T0,429
|
|
62
|
-
investing_algorithm_framework/domain/utils/csv.py,sha256=LFjywiY1booSgcCHoATJUYuMJ5myQSoxJTV2tgY5eTs,2218
|
|
63
|
-
investing_algorithm_framework/domain/utils/random.py,sha256=vnebSD_MeZfn-tRRzJ1SIe4ChHAZWbk4HhHPlWvEeLI,275
|
|
64
|
-
investing_algorithm_framework/domain/utils/signatures.py,sha256=MO2hCrrnQjbsT6guX4AdeJfcAP55pRXtjJ73uX1cjaI,417
|
|
65
|
-
investing_algorithm_framework/domain/utils/stoppable_thread.py,sha256=z3-OGZ-wrygfYn4zhB3COHdB43qQYa65TeShyVokSp0,608
|
|
66
|
-
investing_algorithm_framework/domain/utils/synchronized.py,sha256=YjvutHxMh5r1WEpOYPAXm7_xHRaDzj5YTj7HqfKqJm0,253
|
|
67
|
-
investing_algorithm_framework/infrastructure/__init__.py,sha256=JxBVisoMFObDg1j8IBtk30A565euzh4sdT6ONaE19FE,692
|
|
68
|
-
investing_algorithm_framework/infrastructure/database/__init__.py,sha256=6t-_-w0RuQLRkbUIN1lL0N4MzJePmcjRuV96Kzo3_n4,176
|
|
69
|
-
investing_algorithm_framework/infrastructure/database/sql_alchemy.py,sha256=7IvKlUtwpeik3nJJLVjHEI0wNpQxUa4gXPnnf100JHw,1363
|
|
70
|
-
investing_algorithm_framework/infrastructure/models/__init__.py,sha256=zR6ALTwK7ZxKAc-AdbizlJ72IFI1GoUoUUuMNy-jBsw,223
|
|
71
|
-
investing_algorithm_framework/infrastructure/models/model_extension.py,sha256=EiSSs-Jq27gBhLnlIKvEjDoJz7iMPFxkFBg5cesU694,142
|
|
72
|
-
investing_algorithm_framework/infrastructure/models/order/__init__.py,sha256=DcXSxZIpiyJjVxjL9T9a3zzTskaACvBuTP8mBhz5QXM,102
|
|
73
|
-
investing_algorithm_framework/infrastructure/models/order/order.py,sha256=Hh1D8sTW-NYgaQhgsts13mQxIa7uGBFmCy9FlIa6SNU,4314
|
|
74
|
-
investing_algorithm_framework/infrastructure/models/order/order_fee.py,sha256=oTtFovU4Jtire809-2r3S_3LdPTmJze2jMY-8emz3es,847
|
|
75
|
-
investing_algorithm_framework/infrastructure/models/portfolio/__init__.py,sha256=vxPcGORtOenwyop1bnOQsQWmXmmL4QY6kfbN8hOd_Ws,64
|
|
76
|
-
investing_algorithm_framework/infrastructure/models/portfolio/portfolio.py,sha256=yPR8cXKFqp_SvAykUuMMBLu2YIzPE8hqSsm2HxVwi4A,2063
|
|
77
|
-
investing_algorithm_framework/infrastructure/models/position/__init__.py,sha256=YrU5k4aVUBTv5URFBlRu_8At0vL1J_jw9yqxwMbsafI,123
|
|
78
|
-
investing_algorithm_framework/infrastructure/models/position/position.py,sha256=xzQtCHiyxnMqKFwwaHs86n1MVx9WKxUJtsBDNxGa1R0,1811
|
|
79
|
-
investing_algorithm_framework/infrastructure/models/position/position_cost.py,sha256=IKt1MhIuAPprVy-c3YShIl0VQWyezlI7UINBKu7rKwM,1095
|
|
80
|
-
investing_algorithm_framework/infrastructure/repositories/__init__.py,sha256=nc3ma6IO9szgyS07R1sRnfdm9AezNzWNYWCxyCPtpPY,442
|
|
81
|
-
investing_algorithm_framework/infrastructure/repositories/order_fee_repository.py,sha256=6AXHsXxlZgxtVpTKNRcMh9IR06o05rQapCsBBptEMVI,487
|
|
82
|
-
investing_algorithm_framework/infrastructure/repositories/order_repository.py,sha256=9jGP3EW2US1xDzgqDyX8bwWK1TDeC8M0R968sL5k6_U,3036
|
|
83
|
-
investing_algorithm_framework/infrastructure/repositories/portfolio_repository.py,sha256=P1PuJyxjiNEKN4co-zogkCX2aH05wWPPP1nA6SCbDDQ,1073
|
|
84
|
-
investing_algorithm_framework/infrastructure/repositories/position_cost_repository.py,sha256=d-3i5aQh0ImIn9m5asERJj8DLCJMqmrvMMQASfTHQRo,584
|
|
85
|
-
investing_algorithm_framework/infrastructure/repositories/position_repository.py,sha256=0yqhCTt9mlo7z4CX5E51u7e6Y_Pty-5Wu9zYRetupUI,875
|
|
86
|
-
investing_algorithm_framework/infrastructure/repositories/repository.py,sha256=6TNQ_kWo9NdmeK_HV36EdV19bEqQ1SIDcyo76-2Wy2A,7588
|
|
87
|
-
investing_algorithm_framework/infrastructure/services/__init__.py,sha256=6GxXEqM5mL0aLnIO7Aajhrf-SsIfm5fUgg115LAhkr0,71
|
|
88
|
-
investing_algorithm_framework/infrastructure/services/market_service.py,sha256=PFnnFjmmfckpvTRdO9YnkHrxn8ycFXDe_4lzHIy9H1U,14042
|
|
89
|
-
investing_algorithm_framework/services/__init__.py,sha256=hBs252juyk8owT3mc3g3C1a2tFBrR7rTYoXAY5_L4SM,666
|
|
90
|
-
investing_algorithm_framework/services/market_data_service.py,sha256=OwC820pFwaAhgDJV69Z3pHQ3hAt-2Ormn6Jqw3g1Oko,3154
|
|
91
|
-
investing_algorithm_framework/services/order_service.py,sha256=DRY-fZVHLgV4zgmpE1m3MCW3g-aLKs-aD4rcUn4UmiI,17649
|
|
92
|
-
investing_algorithm_framework/services/portfolio_configuration_service.py,sha256=mmQXHVhg-2RDDzVXqkxsf_xv9A9-9mMMX03kDx6Tz6I,2076
|
|
93
|
-
investing_algorithm_framework/services/portfolio_service.py,sha256=En9YXSIQTfsKvYUHZwSvrQPFzuHI8zLJ3m1aeemGtAo,4108
|
|
94
|
-
investing_algorithm_framework/services/position_cost_service.py,sha256=OsF0dVAdVULBHjTd-0LDGyfjVlSyBx2M_xH_ssX9vns,104
|
|
95
|
-
investing_algorithm_framework/services/position_service.py,sha256=8JVtPzDPUUGPdai9WbR0aDrTUtJOGJ1PPLPH-OgZyOg,1761
|
|
96
|
-
investing_algorithm_framework/services/repository_service.py,sha256=1GTnWHImgQyyVpPyX6-yo1T7d-09v4uRWBtfKbZfoFY,995
|
|
97
|
-
investing_algorithm_framework/services/strategy_orchestrator_service.py,sha256=3uZjxnizkKG1C9bSzaQXtGKA0xlHLN2InLYonG9oCHs,6472
|
|
98
|
-
investing_algorithm_framework-1.3.1.dist-info/AUTHORS.md,sha256=5yBZo-DuyPB4nCZPgy1T-6UgVoO92kIjkWtv_VYXcAA,384
|
|
99
|
-
investing_algorithm_framework-1.3.1.dist-info/LICENSE,sha256=wbVEDvoZiMPHufRY3sLEffvAr7GH5hOIngHF8y4HFQg,11343
|
|
100
|
-
investing_algorithm_framework-1.3.1.dist-info/METADATA,sha256=AK_Cy1goip9rf6ZUvhUaLrtMZ9LFiAn0P1MKMrLPq_0,7528
|
|
101
|
-
investing_algorithm_framework-1.3.1.dist-info/WHEEL,sha256=AtBG6SXL3KF_v0NxLf0ehyVOh0cold-JbJYXNGorC6Q,92
|
|
102
|
-
investing_algorithm_framework-1.3.1.dist-info/top_level.txt,sha256=N9rTKI8USefEkkzQTIXhpZ8ldP8O8pCpOaDXcf5YSEA,30
|
|
103
|
-
investing_algorithm_framework-1.3.1.dist-info/RECORD,,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
investing_algorithm_framework
|
|
File without changes
|