hikyuu 2.6.5__py3-none-win_amd64.whl → 2.6.7__py3-none-win_amd64.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.
- hikyuu/__init__.py +16 -0
- hikyuu/__init__.pyi +484 -474
- hikyuu/analysis/__init__.pyi +466 -445
- hikyuu/analysis/analysis.pyi +467 -446
- hikyuu/core.pyi +468 -447
- hikyuu/cpp/boost_date_time-mt.dll +0 -0
- hikyuu/cpp/boost_serialization-mt.dll +0 -0
- hikyuu/cpp/boost_wserialization-mt.dll +0 -0
- hikyuu/cpp/core310.pyd +0 -0
- hikyuu/cpp/core310.pyi +1070 -878
- hikyuu/cpp/core311.pyd +0 -0
- hikyuu/cpp/core311.pyi +1070 -878
- hikyuu/cpp/core312.pyd +0 -0
- hikyuu/cpp/core312.pyi +1070 -878
- hikyuu/cpp/core313.pyd +0 -0
- hikyuu/cpp/core313.pyi +1070 -876
- hikyuu/cpp/core39.pyd +0 -0
- hikyuu/cpp/core39.pyi +1070 -878
- hikyuu/cpp/hikyuu.dll +0 -0
- hikyuu/cpp/hikyuu.lib +0 -0
- hikyuu/cpp/i18n/__init__.py +0 -0
- hikyuu/cpp/i18n/zh_CN/__init__.py +0 -0
- hikyuu/cpp/i18n/zh_CN/hikyuu.mo +0 -0
- hikyuu/cpp/sqlite3.dll +0 -0
- hikyuu/data/clickhouse_upgrade/__init__.py +1 -0
- hikyuu/data/clickhouse_upgrade/createdb.sql +1085 -0
- hikyuu/data/common_clickhouse.py +465 -0
- hikyuu/data/em_block_to_clickhouse.py +120 -0
- hikyuu/data/hku_config_template.py +58 -3
- hikyuu/data/pytdx_finance_to_clickhouse.py +107 -0
- hikyuu/data/pytdx_to_clickhouse.py +841 -0
- hikyuu/data/pytdx_to_mysql.py +4 -4
- hikyuu/data/pytdx_weight_to_clickhouse.py +191 -0
- hikyuu/data/tdx_to_clickhouse.py +448 -0
- hikyuu/data/tdx_to_h5.py +1 -1
- hikyuu/data/zh_bond10_to_clickhouse.py +49 -0
- hikyuu/draw/__init__.pyi +1 -1
- hikyuu/draw/drawplot/bokeh_draw.pyi +479 -471
- hikyuu/draw/drawplot/echarts_draw.py +9 -8
- hikyuu/draw/drawplot/echarts_draw.pyi +479 -471
- hikyuu/draw/drawplot/matplotlib_draw.py +3 -3
- hikyuu/draw/drawplot/matplotlib_draw.pyi +479 -471
- hikyuu/draw/elder.pyi +6 -6
- hikyuu/draw/kaufman.py +1 -1
- hikyuu/draw/kaufman.pyi +10 -10
- hikyuu/draw/volume.pyi +5 -5
- hikyuu/examples/notebook/000-Index.ipynb +1 -1
- hikyuu/examples/notebook/001-overview.ipynb +78 -63
- hikyuu/examples/notebook/002-HowToGetStock.ipynb +259 -40
- hikyuu/examples/notebook/003-HowToGetKDataAndDraw.ipynb +49 -41
- hikyuu/examples/notebook/004-IndicatorOverview.ipynb +29 -29
- hikyuu/examples/notebook/005-Drawplot.ipynb +66 -37
- hikyuu/examples/notebook/006-TradeManager.ipynb +808 -61
- hikyuu/examples/notebook/007-SystemDetails.ipynb +23 -23
- hikyuu/examples/notebook/009-RealData.ipynb +3 -3
- hikyuu/examples/notebook/010-Portfolio.ipynb +761 -122
- hikyuu/extend.py +15 -100
- hikyuu/extend.pyi +478 -493
- hikyuu/fetcher/stock/zh_stock_a_pytdx.py +9 -20
- hikyuu/fetcher/stock/zh_stock_a_qmt.py +4 -5
- hikyuu/fetcher/stock/zh_stock_a_sina_qq.py +16 -60
- hikyuu/flat/Spot.py +96 -200
- hikyuu/gui/HikyuuTDX.py +134 -7
- hikyuu/gui/data/ImportBlockInfoTask.py +11 -0
- hikyuu/gui/data/ImportHistoryFinanceTask.py +15 -1
- hikyuu/gui/data/ImportPytdxTimeToH5Task.py +11 -1
- hikyuu/gui/data/ImportPytdxToH5Task.py +13 -1
- hikyuu/gui/data/ImportPytdxTransToH5Task.py +11 -1
- hikyuu/gui/data/ImportTdxToH5Task.py +13 -1
- hikyuu/gui/data/ImportWeightToSqliteTask.py +14 -1
- hikyuu/gui/data/ImportZhBond10Task.py +11 -0
- hikyuu/gui/data/MainWindow.py +210 -135
- hikyuu/gui/data/UsePytdxImportToH5Thread.py +45 -26
- hikyuu/gui/data/UseTdxImportToH5Thread.py +19 -1
- hikyuu/gui/dataserver.py +12 -4
- hikyuu/gui/spot_server.py +30 -40
- hikyuu/gui/start_qmt.py +20 -3
- hikyuu/hub.pyi +6 -6
- hikyuu/include/hikyuu/DataType.h +2 -0
- hikyuu/include/hikyuu/KQuery.h +22 -28
- hikyuu/include/hikyuu/MarketInfo.h +1 -1
- hikyuu/include/hikyuu/Stock.h +15 -3
- hikyuu/include/hikyuu/StockManager.h +12 -3
- hikyuu/include/hikyuu/StockTypeInfo.h +6 -0
- hikyuu/include/hikyuu/TransRecord.h +2 -8
- hikyuu/include/hikyuu/data_driver/kdata/mysql/KRecordTable.h +1 -0
- hikyuu/include/hikyuu/doc.h +4 -0
- hikyuu/include/hikyuu/global/GlobalSpotAgent.h +1 -1
- hikyuu/include/hikyuu/global/SpotRecord.h +15 -31
- hikyuu/include/hikyuu/global/agent/spot_generated.h +48 -232
- hikyuu/include/hikyuu/global/schedule/scheduler.h +1 -1
- hikyuu/include/hikyuu/indicator/Indicator.h +37 -0
- hikyuu/include/hikyuu/lang.h +27 -0
- hikyuu/include/hikyuu/plugin/KDataToHdf5Importer.h +9 -1
- hikyuu/include/hikyuu/plugin/dataserver.h +26 -1
- hikyuu/include/hikyuu/plugin/device.h +2 -1
- hikyuu/include/hikyuu/plugin/hkuextra.h +56 -0
- hikyuu/include/hikyuu/plugin/interface/DataDriverPluginInterface.h +27 -0
- hikyuu/include/hikyuu/plugin/interface/DataServerPluginInterface.h +2 -1
- hikyuu/include/hikyuu/plugin/interface/DevicePluginInterface.h +1 -1
- hikyuu/include/hikyuu/plugin/interface/HkuExtraPluginInterface.h +38 -0
- hikyuu/include/hikyuu/plugin/interface/ImportKDataToHdf5PluginInterface.h +13 -1
- hikyuu/include/hikyuu/plugin/interface/plugins.h +4 -0
- hikyuu/include/hikyuu/python/pybind_utils.h +9 -0
- hikyuu/include/hikyuu/strategy/Strategy.h +0 -9
- hikyuu/include/hikyuu/trade_manage/TradeRecord.h +1 -1
- hikyuu/include/hikyuu/utilities/config.h +0 -2
- hikyuu/include/hikyuu/utilities/os.h +9 -0
- hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +2 -1
- hikyuu/include/hikyuu/version.h +4 -4
- hikyuu/include/hikyuu/view/MarketView.h +59 -0
- hikyuu/indicator/__init__.py +0 -1
- hikyuu/indicator/indicator.py +14 -53
- hikyuu/plugin/backtest.dll +0 -0
- hikyuu/plugin/clickhousedriver.dll +0 -0
- hikyuu/plugin/dataserver.dll +0 -0
- hikyuu/plugin/device.dll +0 -0
- hikyuu/plugin/extind.dll +0 -0
- hikyuu/plugin/hkuextra.dll +0 -0
- hikyuu/plugin/import2hdf5.dll +0 -0
- hikyuu/plugin/tmreport.dll +0 -0
- hikyuu/test/test_init.py +59 -0
- hikyuu/test/test_real_tdx_import.py +336 -0
- hikyuu/test/test_tdx_import.py +315 -0
- hikyuu/test/test_tdx_real_data_import.py +281 -0
- hikyuu/trade_manage/__init__.pyi +479 -471
- hikyuu/trade_manage/trade.py +4 -65
- hikyuu/trade_manage/trade.pyi +479 -483
- hikyuu/trade_sys/__init__.py +11 -0
- hikyuu/util/__init__.py +1 -0
- hikyuu/util/__init__.pyi +4 -4
- hikyuu/util/check.py +8 -0
- hikyuu/util/check.pyi +5 -1
- hikyuu/util/singleton.pyi +1 -1
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.7.dist-info}/METADATA +7 -5
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.7.dist-info}/RECORD +142 -124
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.7.dist-info}/top_level.txt +4 -3
- hikyuu/include/hikyuu/global/agent/hikyuu/flat/__init__.py +0 -1
- hikyuu/include/hikyuu/utilities/mo/__init__.py +0 -1
- hikyuu/include/hikyuu/utilities/mo/mo.h +0 -48
- hikyuu/indicator/talib_wrap.py +0 -1273
- /hikyuu/include/hikyuu/utilities/{mo/moFileReader.h → moFileReader.h} +0 -0
- /hikyuu/include/hikyuu/{global/agent/hikyuu → view}/__init__.py +0 -0
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.7.dist-info}/LICENSE +0 -0
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.7.dist-info}/WHEEL +0 -0
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.7.dist-info}/entry_points.txt +0 -0
hikyuu/trade_sys/__init__.py
CHANGED
|
@@ -24,4 +24,15 @@
|
|
|
24
24
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
25
|
# SOFTWARE.
|
|
26
26
|
|
|
27
|
+
import pandas as pd
|
|
27
28
|
from .trade_sys import *
|
|
29
|
+
from hikyuu.core import (ScoreRecordList, scorerecords_to_np, scorerecords_to_df,
|
|
30
|
+
SystemWeightList, systemweights_to_np, systemweights_to_df)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
ScoreRecordList.to_np = lambda self: scorerecords_to_np(self)
|
|
34
|
+
ScoreRecordList.to_df = lambda self: scorerecords_to_df(self)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
SystemWeightList.to_np = lambda self: systemweights_to_np(self)
|
|
38
|
+
SystemWeightList.to_df = lambda self: systemweights_to_df(self)
|
hikyuu/util/__init__.py
CHANGED
hikyuu/util/__init__.pyi
CHANGED
|
@@ -10,6 +10,7 @@ from hikyuu.util.check import hku_catch
|
|
|
10
10
|
from hikyuu.util.check import hku_check
|
|
11
11
|
from hikyuu.util.check import hku_check_ignore
|
|
12
12
|
from hikyuu.util.check import hku_check_throw
|
|
13
|
+
from hikyuu.util.check import hku_run_ignore_exception
|
|
13
14
|
from hikyuu.util.check import hku_to_async
|
|
14
15
|
from hikyuu.util.mylog import LoggingContext
|
|
15
16
|
from hikyuu.util.mylog import add_class_logger_handler
|
|
@@ -17,10 +18,10 @@ from hikyuu.util.mylog import capture_multiprocess_all_logger
|
|
|
17
18
|
from hikyuu.util.mylog import class_logger
|
|
18
19
|
from hikyuu.util.mylog import get_default_logger
|
|
19
20
|
from hikyuu.util.mylog import hku_benchmark
|
|
20
|
-
from hikyuu.util.mylog import hku_debug
|
|
21
21
|
from hikyuu.util.mylog import hku_debug as hku_trace
|
|
22
|
-
from hikyuu.util.mylog import
|
|
22
|
+
from hikyuu.util.mylog import hku_debug
|
|
23
23
|
from hikyuu.util.mylog import hku_debug_if as hku_trace_if
|
|
24
|
+
from hikyuu.util.mylog import hku_debug_if
|
|
24
25
|
from hikyuu.util.mylog import hku_error
|
|
25
26
|
from hikyuu.util.mylog import hku_error_if
|
|
26
27
|
from hikyuu.util.mylog import hku_fatal
|
|
@@ -48,8 +49,7 @@ from . import check
|
|
|
48
49
|
from . import mylog
|
|
49
50
|
from . import notebook
|
|
50
51
|
from . import singleton
|
|
51
|
-
|
|
52
|
-
__all__: list = ['spend_time', 'hku_benchmark', 'timeout', 'hku_logger', 'class_logger', 'add_class_logger_handler', 'HKUCheckError', 'hku_check', 'hku_check_throw', 'hku_check_ignore', 'hku_catch', 'hku_to_async', 'hku_trace', 'hku_debug', 'hku_info', 'hku_warn', 'hku_error', 'hku_fatal', 'hku_trace_if', 'hku_debug_if', 'hku_info_if', 'hku_warn_if', 'hku_info_if', 'hku_warn_if', 'hku_error_if', 'hku_fatal_if', 'with_trace', 'set_my_logger_file', 'capture_multiprocess_all_logger', 'LoggingContext', 'in_interactive_session', 'in_ipython_frontend']
|
|
52
|
+
__all__: list = ['spend_time', 'hku_benchmark', 'timeout', 'hku_logger', 'class_logger', 'add_class_logger_handler', 'HKUCheckError', 'hku_check', 'hku_check_throw', 'hku_check_ignore', 'hku_catch', 'hku_to_async', 'hku_run_ignore_exception', 'hku_trace', 'hku_debug', 'hku_info', 'hku_warn', 'hku_error', 'hku_fatal', 'hku_trace_if', 'hku_debug_if', 'hku_info_if', 'hku_warn_if', 'hku_info_if', 'hku_warn_if', 'hku_error_if', 'hku_fatal_if', 'with_trace', 'set_my_logger_file', 'capture_multiprocess_all_logger', 'LoggingContext', 'in_interactive_session', 'in_ipython_frontend']
|
|
53
53
|
FORMAT: str = '%(asctime)-15s [%(levelname)s] %(message)s [%(name)s::%(funcName)s]'
|
|
54
54
|
g_hku_logger_lock: multiprocessing.synchronize.Lock # value = <Lock(owner=None)>
|
|
55
55
|
hku_logger: logging.Logger # value = <Logger hikyuu (INFO)>
|
hikyuu/util/check.py
CHANGED
|
@@ -151,3 +151,11 @@ def hku_to_async(func):
|
|
|
151
151
|
loop = asyncio.get_event_loop()
|
|
152
152
|
return await loop.run_in_executor(None, func, *args, **kwargs)
|
|
153
153
|
return async_func
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def hku_run_ignore_exception(func, *args, **kwargs):
|
|
157
|
+
"""运行函数并忽略异常"""
|
|
158
|
+
try:
|
|
159
|
+
return func(*args, **kwargs)
|
|
160
|
+
except:
|
|
161
|
+
return None
|
hikyuu/util/check.pyi
CHANGED
|
@@ -5,7 +5,7 @@ import logging
|
|
|
5
5
|
import multiprocessing.synchronize
|
|
6
6
|
import sys as sys
|
|
7
7
|
import traceback as traceback
|
|
8
|
-
__all__ = ['HKUCheckError', 'HKUIngoreError', 'asyncio', 'checkif', 'functools', 'g_hku_logger_lock', 'get_exception_info', 'hku_catch', 'hku_check', 'hku_check_ignore', 'hku_check_throw', 'hku_logger', 'hku_to_async', 'sys', 'traceback']
|
|
8
|
+
__all__ = ['HKUCheckError', 'HKUIngoreError', 'asyncio', 'checkif', 'functools', 'g_hku_logger_lock', 'get_exception_info', 'hku_catch', 'hku_check', 'hku_check_ignore', 'hku_check_throw', 'hku_logger', 'hku_run_ignore_exception', 'hku_to_async', 'sys', 'traceback']
|
|
9
9
|
class HKUCheckError(Exception):
|
|
10
10
|
def __init__(self, expression, message):
|
|
11
11
|
...
|
|
@@ -52,6 +52,10 @@ def hku_check_throw(expression, message, excepion = None, **kwargs):
|
|
|
52
52
|
:param str message: 异常注解信息
|
|
53
53
|
:param Exception exception: 指定的异常类,为None时,为默认 HKUCheckError 异常
|
|
54
54
|
|
|
55
|
+
"""
|
|
56
|
+
def hku_run_ignore_exception(func, *args, **kwargs):
|
|
57
|
+
"""
|
|
58
|
+
运行函数并忽略异常
|
|
55
59
|
"""
|
|
56
60
|
def hku_to_async(func):
|
|
57
61
|
...
|
hikyuu/util/singleton.pyi
CHANGED
|
@@ -12,7 +12,7 @@ class SingletonType(type):
|
|
|
12
12
|
self.name = name
|
|
13
13
|
|
|
14
14
|
"""
|
|
15
|
-
_instance_lock: typing.ClassVar[_thread.lock] # value = <unlocked _thread.lock object at
|
|
15
|
+
_instance_lock: typing.ClassVar[_thread.lock] # value = <unlocked _thread.lock object at 0x000002B0B2C44C30>
|
|
16
16
|
@classmethod
|
|
17
17
|
def __call__(cls, *args, **kwargs):
|
|
18
18
|
...
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: hikyuu
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.7
|
|
4
4
|
Summary: Hikyuu Quant Framework for System Trading Analysis and backtester
|
|
5
5
|
Home-page: http://hikyuu.org/
|
|
6
6
|
Author: fasiondog
|
|
@@ -19,7 +19,6 @@ Classifier: Operating System :: Microsoft :: Windows
|
|
|
19
19
|
Classifier: Operating System :: POSIX :: Linux
|
|
20
20
|
Classifier: Operating System :: MacOS :: MacOS X
|
|
21
21
|
Classifier: Programming Language :: Python :: 3
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
23
22
|
Classifier: Programming Language :: Python :: 3.9
|
|
24
23
|
Classifier: Programming Language :: Python :: 3.10
|
|
25
24
|
Classifier: Programming Language :: Python :: 3.11
|
|
@@ -49,7 +48,7 @@ Requires-Dist: pyecharts
|
|
|
49
48
|
Requires-Dist: pipdeptree
|
|
50
49
|
Requires-Dist: h5py
|
|
51
50
|
Requires-Dist: tdqm
|
|
52
|
-
Requires-Dist:
|
|
51
|
+
Requires-Dist: clickhouse-connect
|
|
53
52
|
|
|
54
53
|

|
|
55
54
|
|
|
@@ -130,13 +129,13 @@ Hikyuu Quant Framework是一款基于C++/Python的开源量化交易研究框架
|
|
|
130
129
|
|
|
131
130
|

|
|
132
131
|
|
|
133
|
-
## QQ交流群:114910869,
|
|
132
|
+
## QQ交流群:114910869, 或扫码加入(微信为主)
|
|
134
133
|
|
|
135
134
|

|
|
136
135
|
|
|
137
136
|
## 项目依赖说明
|
|
138
137
|
|
|
139
|
-
Hikyuu
|
|
138
|
+
Hikyuu C++部分直接依赖以下开源项目(由以下项目间接依赖的项目及 python 项目未列出, python依赖项目请参考 requirements.txt),感谢所有开源作者的贡献:
|
|
140
139
|
|
|
141
140
|
| 名称 | 项目地址 | License |
|
|
142
141
|
| ------------- | --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
@@ -155,3 +154,6 @@ Hikyuu直接依赖以下开源项目(由以下项目间接依赖的项目未
|
|
|
155
154
|
| gzip-hpp | [https://github.com/mapbox/gzip-hpp](https://github.com/mapbox/gzip-hpp) | BSD-2-Clause license |
|
|
156
155
|
| doctest | [https://github.com/doctest/doctest](https://github.com/doctest/doctest) | MIT |
|
|
157
156
|
| ta-lib | [https://github.com/TA-Lib/ta-lib.git]() | BSD-3-Clause license |
|
|
157
|
+
| clickhouse | [https://github.com/ClickHouse/ClickHouse]() | Apache 2.0 |
|
|
158
|
+
| xxhash | [https://github.com/Cyan4973/xxHash]() | BSD 2-Clause License |
|
|
159
|
+
| utf8proc | [https://github.com/JuliaStrings/utf8proc]() | MIT |
|