investing-algorithm-framework 1.6.7__tar.gz → 1.6.8__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-1.6.7 → investing_algorithm_framework-1.6.8}/PKG-INFO +1 -1
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/backtest_profile.py +23 -1
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/utils/backtesting.py +1 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/services/backtest_service.py +6 -2
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework.egg-info/PKG-INFO +1 -1
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/AUTHORS.md +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/LICENSE +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/README.md +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/algorithm.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/app.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/stateless/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/stateless/action_handlers/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/stateless/action_handlers/action_handler_strategy.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/stateless/action_handlers/check_online_handler.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/stateless/action_handlers/run_strategy_handler.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/stateless/exception_handler.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/strategy.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/task.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/web/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/web/controllers/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/web/controllers/orders.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/web/controllers/portfolio.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/web/controllers/positions.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/web/create_app.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/web/error_handler.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/web/responses.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/web/run_strategies.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/web/schemas/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/web/schemas/order.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/web/schemas/portfolio.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/web/schemas/position.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/app/web/setup_cors.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/create_app.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/dependency_container.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/config.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/constants.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/decimal_parsing.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/exceptions.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/base_model.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/market_data/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/market_data/asset_price.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/market_data/ohlcv.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/market_data/order_book.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/market_data/ticker.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/order/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/order/order.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/order/order_fee.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/order/order_side.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/order/order_status.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/order/order_type.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/portfolio/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/portfolio/portfolio.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/portfolio/portfolio_configuration.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/portfolio/portfolio_snapshot.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/position/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/position/position.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/position/position_snapshot.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/strategy_profile.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/time_frame.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/time_interval.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/time_unit.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/trade.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/trading_data_types.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/models/trading_time_frame.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/services/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/services/market_data_sources.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/singleton.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/stateless_actions.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/strategy.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/utils/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/utils/csv.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/utils/random.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/utils/signatures.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/utils/stoppable_thread.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/domain/utils/synchronized.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/database/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/database/sql_alchemy.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/models/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/models/decimal_parser.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/models/market_data_sources/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/models/market_data_sources/ccxt.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/models/model_extension.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/models/order/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/models/order/order.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/models/order/order_fee.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/models/portfolio/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/models/portfolio/portfolio.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/models/portfolio/portfolio_snapshot.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/models/position/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/models/position/position.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/models/position/position_snapshot.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/repositories/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/repositories/order_fee_repository.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/repositories/order_repository.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/repositories/portfolio_repository.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/repositories/portfolio_snapshot_repository.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/repositories/position_repository.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/repositories/position_snapshot_repository.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/repositories/repository.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/services/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/services/ccxt_market_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/services/market_backtest_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/services/market_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/services/performance_backtest_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/infrastructure/services/performance_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/services/__init__.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/services/configuration_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/services/market_data_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/services/order_backtest_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/services/order_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/services/portfolio_configuration_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/services/portfolio_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/services/portfolio_snapshot_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/services/position_cost_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/services/position_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/services/position_snapshot_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/services/repository_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework/services/strategy_orchestrator_service.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework.egg-info/SOURCES.txt +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework.egg-info/dependency_links.txt +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework.egg-info/requires.txt +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/investing_algorithm_framework.egg-info/top_level.txt +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/setup.cfg +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/setup.py +0 -0
- {investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/tests/test_create_app.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: investing_algorithm_framework
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.8
|
|
4
4
|
Summary: A framework for creating an investment algorithm
|
|
5
5
|
Home-page: https://github.com/coding-kitties/investing-algorithm-framework.git
|
|
6
6
|
Download-URL: https://github.com/coding-kitties/investing-algorithm-framework/archive/v0.1.1.tar.gz
|
|
@@ -4,13 +4,20 @@ from .time_unit import TimeUnit
|
|
|
4
4
|
|
|
5
5
|
class BacktestPosition(BaseModel):
|
|
6
6
|
|
|
7
|
-
def __init__(
|
|
7
|
+
def __init__(
|
|
8
|
+
self,
|
|
9
|
+
position,
|
|
10
|
+
trading_symbol=False,
|
|
11
|
+
amount_pending=0.0,
|
|
12
|
+
total_value_portfolio=0.0
|
|
13
|
+
):
|
|
8
14
|
self._symbol = position.symbol
|
|
9
15
|
self._amount = position.amount
|
|
10
16
|
self._cost = position.cost
|
|
11
17
|
self._price = 0.0
|
|
12
18
|
self._trading_symbol = trading_symbol
|
|
13
19
|
self._amount_pending = amount_pending
|
|
20
|
+
self._total_value_portfolio = total_value_portfolio
|
|
14
21
|
|
|
15
22
|
@property
|
|
16
23
|
def price(self):
|
|
@@ -74,6 +81,21 @@ class BacktestPosition(BaseModel):
|
|
|
74
81
|
def amount_pending(self, value):
|
|
75
82
|
self._amount_pending = value
|
|
76
83
|
|
|
84
|
+
@property
|
|
85
|
+
def percentage_of_portfolio(self):
|
|
86
|
+
|
|
87
|
+
if self._total_value_portfolio == 0:
|
|
88
|
+
return 0.0
|
|
89
|
+
|
|
90
|
+
return self.value / self._total_value_portfolio * 100
|
|
91
|
+
|
|
92
|
+
def get_percentage_of_portfolio(self):
|
|
93
|
+
|
|
94
|
+
if self._total_value_portfolio == 0:
|
|
95
|
+
return 0.0
|
|
96
|
+
|
|
97
|
+
return self.value / self._total_value_portfolio * 100
|
|
98
|
+
|
|
77
99
|
|
|
78
100
|
class BacktestProfile(BaseModel):
|
|
79
101
|
|
|
@@ -38,6 +38,7 @@ def pretty_print_backtest(backtest_report, show_positions=True, show_trades=True
|
|
|
38
38
|
position_table["Pending amount"] = [f"{position.amount_pending:.{precision}f}" for position in backtest_report.positions if position.amount > 0 or position.amount_pending > 0]
|
|
39
39
|
position_table[f"Cost ({backtest_report.trading_symbol})"] = [f"{position.cost:.{precision}f}" for position in backtest_report.positions if position.amount > 0 or position.amount_pending > 0]
|
|
40
40
|
position_table[f"Value ({backtest_report.trading_symbol})"] = [f"{position.value:.{precision}f}" for position in backtest_report.positions if position.amount > 0 or position.amount_pending > 0]
|
|
41
|
+
position_table["Percentage of portfolio"] = [f"{position.percentage_of_portfolio:.{precision}f}%" for position in backtest_report.positions if position.amount > 0 or position.amount_pending > 0]
|
|
41
42
|
position_table[f"Growth ({backtest_report.trading_symbol})"] = [f"{position.growth:.{precision}f}" for position in backtest_report.positions if position.amount > 0 or position.amount_pending > 0]
|
|
42
43
|
position_table["Growth_rate"] = [f"{position.growth_rate:.{precision}f}%" for position in backtest_report.positions if position.amount > 0 or position.amount_pending > 0]
|
|
43
44
|
print(tabulate(position_table, headers="keys", tablefmt="rounded_grid"))
|
|
@@ -289,7 +289,9 @@ class BackTestService:
|
|
|
289
289
|
|
|
290
290
|
if position.symbol == portfolio.trading_symbol:
|
|
291
291
|
backtest_position = BacktestPosition(
|
|
292
|
-
position,
|
|
292
|
+
position,
|
|
293
|
+
trading_symbol=True,
|
|
294
|
+
total_value_portfolio=backtest_profile.total_value
|
|
293
295
|
)
|
|
294
296
|
backtest_position.price = 1
|
|
295
297
|
else:
|
|
@@ -305,7 +307,9 @@ class BackTestService:
|
|
|
305
307
|
amount_in_pending_orders += order.amount
|
|
306
308
|
|
|
307
309
|
backtest_position = BacktestPosition(
|
|
308
|
-
position,
|
|
310
|
+
position,
|
|
311
|
+
amount_pending=amount_in_pending_orders,
|
|
312
|
+
total_value_portfolio=backtest_profile.total_value
|
|
309
313
|
)
|
|
310
314
|
ticker = self._market_service.get_ticker(
|
|
311
315
|
f"{position.symbol}/{portfolio.trading_symbol}"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: investing-algorithm-framework
|
|
3
|
-
Version: 1.6.
|
|
3
|
+
Version: 1.6.8
|
|
4
4
|
Summary: A framework for creating an investment algorithm
|
|
5
5
|
Home-page: https://github.com/coding-kitties/investing-algorithm-framework.git
|
|
6
6
|
Download-URL: https://github.com/coding-kitties/investing-algorithm-framework/archive/v0.1.1.tar.gz
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{investing_algorithm_framework-1.6.7 → investing_algorithm_framework-1.6.8}/tests/test_create_app.py
RENAMED
|
File without changes
|