PyAlgoEngine 0.5.4.post4__tar.gz → 0.5.4.post6__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.
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/PKG-INFO +27 -27
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/PyAlgoEngine.egg-info/PKG-INFO +27 -27
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/__init__.py +1 -1
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/base/__init__.py +1 -1
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/base/market_utils.py +62 -2
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/setup.cfg +4 -4
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/LICENSE +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/PyAlgoEngine.egg-info/SOURCES.txt +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/PyAlgoEngine.egg-info/dependency_links.txt +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/PyAlgoEngine.egg-info/requires.txt +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/PyAlgoEngine.egg-info/top_level.txt +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/README.md +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/apps/__init__.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/apps/backtest/__init__.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/apps/backtest/doc_server.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/apps/backtest/tester.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/apps/backtest/web_app.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/apps/bokeh_server.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/apps/demo/__init__.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/apps/demo/test.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/backtest/__init__.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/backtest/__main__.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/backtest/metrics.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/backtest/replay.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/backtest/sim_match.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/base/console_utils.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/base/finance_decimal.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/base/technical_analysis.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/base/telemetrics.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/base/trade_utils.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/engine/__init__.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/engine/algo_engine.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/engine/event_engine.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/engine/market_engine.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/engine/trade_engine.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/monitor/__init__.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/monitor/advanced_data_interface.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/profile/__init__.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/profile/cn.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/strategy/__init__.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/strategy/strategy_engine.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/utils/__init__.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/utils/commit_regularizer.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/utils/data_utils.py +0 -0
- {pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/setup.py +0 -0
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: PyAlgoEngine
|
|
3
|
-
Version: 0.5.4.
|
|
4
|
-
Summary: Basic algo engine
|
|
5
|
-
Home-page: https://github.com/BolunHan/PyAlgoEngine
|
|
6
|
-
Author: Bolun.Han
|
|
7
|
-
Author-email: Bolun.Han@outlook.com
|
|
8
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
9
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
-
Classifier: Operating System :: OS Independent
|
|
14
|
-
Requires-Python: >=3.1
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
License-File: LICENSE
|
|
17
|
-
Requires-Dist: numpy
|
|
18
|
-
Requires-Dist: pandas
|
|
19
|
-
Requires-Dist: exchange_calendars
|
|
20
|
-
Requires-Dist: PyEventEngine
|
|
21
|
-
Provides-Extra: webapps
|
|
22
|
-
Requires-Dist: flask; extra == "webapps"
|
|
23
|
-
Requires-Dist: waitress; extra == "webapps"
|
|
24
|
-
Requires-Dist: bokeh; extra == "webapps"
|
|
25
|
-
|
|
26
|
-
# PyAlgoEngine
|
|
27
|
-
python algo trading engine
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: PyAlgoEngine
|
|
3
|
+
Version: 0.5.4.post6
|
|
4
|
+
Summary: Basic algo engine
|
|
5
|
+
Home-page: https://github.com/BolunHan/PyAlgoEngine
|
|
6
|
+
Author: Bolun.Han
|
|
7
|
+
Author-email: Bolun.Han@outlook.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Requires-Python: >=3.1
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: numpy
|
|
18
|
+
Requires-Dist: pandas
|
|
19
|
+
Requires-Dist: exchange_calendars
|
|
20
|
+
Requires-Dist: PyEventEngine
|
|
21
|
+
Provides-Extra: webapps
|
|
22
|
+
Requires-Dist: flask; extra == "webapps"
|
|
23
|
+
Requires-Dist: waitress; extra == "webapps"
|
|
24
|
+
Requires-Dist: bokeh; extra == "webapps"
|
|
25
|
+
|
|
26
|
+
# PyAlgoEngine
|
|
27
|
+
python algo trading engine
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: PyAlgoEngine
|
|
3
|
-
Version: 0.5.4.
|
|
4
|
-
Summary: Basic algo engine
|
|
5
|
-
Home-page: https://github.com/BolunHan/PyAlgoEngine
|
|
6
|
-
Author: Bolun.Han
|
|
7
|
-
Author-email: Bolun.Han@outlook.com
|
|
8
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
9
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
-
Classifier: Operating System :: OS Independent
|
|
14
|
-
Requires-Python: >=3.1
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
License-File: LICENSE
|
|
17
|
-
Requires-Dist: numpy
|
|
18
|
-
Requires-Dist: pandas
|
|
19
|
-
Requires-Dist: exchange_calendars
|
|
20
|
-
Requires-Dist: PyEventEngine
|
|
21
|
-
Provides-Extra: webapps
|
|
22
|
-
Requires-Dist: flask; extra == "webapps"
|
|
23
|
-
Requires-Dist: waitress; extra == "webapps"
|
|
24
|
-
Requires-Dist: bokeh; extra == "webapps"
|
|
25
|
-
|
|
26
|
-
# PyAlgoEngine
|
|
27
|
-
python algo trading engine
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: PyAlgoEngine
|
|
3
|
+
Version: 0.5.4.post6
|
|
4
|
+
Summary: Basic algo engine
|
|
5
|
+
Home-page: https://github.com/BolunHan/PyAlgoEngine
|
|
6
|
+
Author: Bolun.Han
|
|
7
|
+
Author-email: Bolun.Han@outlook.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Requires-Python: >=3.1
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Requires-Dist: numpy
|
|
18
|
+
Requires-Dist: pandas
|
|
19
|
+
Requires-Dist: exchange_calendars
|
|
20
|
+
Requires-Dist: PyEventEngine
|
|
21
|
+
Provides-Extra: webapps
|
|
22
|
+
Requires-Dist: flask; extra == "webapps"
|
|
23
|
+
Requires-Dist: waitress; extra == "webapps"
|
|
24
|
+
Requires-Dist: bokeh; extra == "webapps"
|
|
25
|
+
|
|
26
|
+
# PyAlgoEngine
|
|
27
|
+
python algo trading engine
|
|
@@ -15,7 +15,7 @@ def set_logger(logger: logging.Logger):
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
from .finance_decimal import FinancialDecimal
|
|
18
|
-
from .market_utils import TransactionSide, MarketData, OrderBook, BarData, TickData, TransactionData, TradeData, OrderBookBuffer, BarDataBuffer, TickDataBuffer, TransactionDataBuffer
|
|
18
|
+
from .market_utils import TransactionSide, MarketData, OrderBook, BarData, DailyBar, CandleStick, TickData, TransactionData, TradeData, OrderBookBuffer, BarDataBuffer, TickDataBuffer, TransactionDataBuffer
|
|
19
19
|
from .technical_analysis import TechnicalAnalysis
|
|
20
20
|
from .trade_utils import OrderState, OrderType, TradeInstruction, TradeReport
|
|
21
21
|
from .console_utils import Progress, GetInput, GetArgs, count_ordinal, TerminalStyle, InteractiveShell, ShellTransfer
|
|
@@ -17,7 +17,7 @@ from . import LOGGER, PROFILE
|
|
|
17
17
|
|
|
18
18
|
LOGGER = LOGGER.getChild('MarketUtils')
|
|
19
19
|
__all__ = ['TransactionSide',
|
|
20
|
-
'MarketData', 'OrderBook', 'BarData', 'TickData', 'TransactionData', 'TradeData',
|
|
20
|
+
'MarketData', 'OrderBook', 'BarData', 'DailyBar', 'CandleStick', 'TickData', 'TransactionData', 'TradeData',
|
|
21
21
|
'OrderBookBuffer', 'BarDataBuffer', 'TickDataBuffer', 'TransactionDataBuffer']
|
|
22
22
|
|
|
23
23
|
|
|
@@ -688,7 +688,7 @@ class BarData(MarketData):
|
|
|
688
688
|
ticker: str,
|
|
689
689
|
timestamp: float, # the bar end timestamp
|
|
690
690
|
start_timestamp: float = None,
|
|
691
|
-
bar_span: datetime.timedelta = None,
|
|
691
|
+
bar_span: datetime.timedelta | int | float = None,
|
|
692
692
|
high_price: float = math.nan,
|
|
693
693
|
low_price: float = math.nan,
|
|
694
694
|
open_price: float = math.nan,
|
|
@@ -888,6 +888,66 @@ class BarData(MarketData):
|
|
|
888
888
|
return self.market_time
|
|
889
889
|
|
|
890
890
|
|
|
891
|
+
# alias of the BarData
|
|
892
|
+
CandleStick = BarData
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
class DailyBar(BarData):
|
|
896
|
+
def __init__(
|
|
897
|
+
self, *,
|
|
898
|
+
ticker: str,
|
|
899
|
+
market_date: datetime.date, # The market date of the bar, if with 1D data, or the END date of the bar.
|
|
900
|
+
timestamp: float = None,
|
|
901
|
+
start_date: datetime.date = None,
|
|
902
|
+
bar_span: datetime.timedelta | int = None, # expect to be a timedelta for several days, or the number of days
|
|
903
|
+
high_price: float = math.nan,
|
|
904
|
+
low_price: float = math.nan,
|
|
905
|
+
open_price: float = math.nan,
|
|
906
|
+
close_price: float = math.nan,
|
|
907
|
+
volume: float = 0.,
|
|
908
|
+
notional: float = 0.,
|
|
909
|
+
trade_count: int = 0,
|
|
910
|
+
**kwargs
|
|
911
|
+
):
|
|
912
|
+
if bar_span is None and start_date is None:
|
|
913
|
+
raise ValueError('Must assign ether datetime.date or bar_span or both.')
|
|
914
|
+
elif start_date is None:
|
|
915
|
+
if isinstance(bar_span, datetime.timedelta):
|
|
916
|
+
bar_span = bar_span.days
|
|
917
|
+
elif isinstance(bar_span, int):
|
|
918
|
+
pass
|
|
919
|
+
else:
|
|
920
|
+
raise ValueError(f'Invalid bar_span, expect int, float or timedelta, got {bar_span}')
|
|
921
|
+
elif bar_span is None:
|
|
922
|
+
bar_span = (market_date - start_date).days
|
|
923
|
+
else:
|
|
924
|
+
assert (market_date - start_date).days == bar_span.days
|
|
925
|
+
|
|
926
|
+
super().__init__(
|
|
927
|
+
ticker=ticker,
|
|
928
|
+
timestamp=datetime.datetime.combine(market_date, datetime.time.min).timestamp() if timestamp is None else timestamp,
|
|
929
|
+
bar_span=bar_span,
|
|
930
|
+
high_price=high_price,
|
|
931
|
+
low_price=low_price,
|
|
932
|
+
open_price=open_price,
|
|
933
|
+
close_price=close_price,
|
|
934
|
+
volume=volume,
|
|
935
|
+
notional=notional,
|
|
936
|
+
trade_count=trade_count,
|
|
937
|
+
**kwargs
|
|
938
|
+
)
|
|
939
|
+
|
|
940
|
+
self['market_date'] = market_date
|
|
941
|
+
|
|
942
|
+
@property
|
|
943
|
+
def bar_span(self) -> datetime.timedelta:
|
|
944
|
+
return datetime.timedelta(days=self['bar_span'])
|
|
945
|
+
|
|
946
|
+
@property
|
|
947
|
+
def market_date(self) -> datetime.date:
|
|
948
|
+
return self['market_date']
|
|
949
|
+
|
|
950
|
+
|
|
891
951
|
class TickData(MarketData):
|
|
892
952
|
def __init__(
|
|
893
953
|
self, *,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[egg_info]
|
|
2
|
-
tag_build =
|
|
3
|
-
tag_date = 0
|
|
4
|
-
|
|
1
|
+
[egg_info]
|
|
2
|
+
tag_build =
|
|
3
|
+
tag_date = 0
|
|
4
|
+
|
|
File without changes
|
|
File without changes
|
{pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/PyAlgoEngine.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/apps/backtest/doc_server.py
RENAMED
|
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
|
{pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/base/technical_analysis.py
RENAMED
|
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
|
{pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/monitor/advanced_data_interface.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/strategy/strategy_engine.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyalgoengine-0.5.4.post4 → pyalgoengine-0.5.4.post6}/algo_engine/utils/commit_regularizer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|