hikyuu 2.6.7__py3-none-win_amd64.whl → 2.6.8__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.
Files changed (141) hide show
  1. hikyuu/__init__.py +6 -2
  2. hikyuu/__init__.pyi +656 -632
  3. hikyuu/analysis/__init__.pyi +563 -539
  4. hikyuu/analysis/analysis.pyi +583 -561
  5. hikyuu/core.pyi +565 -541
  6. hikyuu/cpp/__init__.pyi +2 -2
  7. hikyuu/cpp/concrt140.dll +0 -0
  8. hikyuu/cpp/core310.pyd +0 -0
  9. hikyuu/cpp/core310.pyi +408 -31
  10. hikyuu/cpp/core311.pyd +0 -0
  11. hikyuu/cpp/core311.pyi +408 -31
  12. hikyuu/cpp/core312.pyd +0 -0
  13. hikyuu/cpp/core312.pyi +408 -31
  14. hikyuu/cpp/core313.pyd +0 -0
  15. hikyuu/cpp/core313.pyi +408 -31
  16. hikyuu/cpp/core39.pyd +0 -0
  17. hikyuu/cpp/core39.pyi +408 -31
  18. hikyuu/cpp/hikyuu.dll +0 -0
  19. hikyuu/cpp/hikyuu.lib +0 -0
  20. hikyuu/cpp/hku_hdf5.dll +0 -0
  21. hikyuu/cpp/hku_hdf5_cpp.dll +0 -0
  22. hikyuu/cpp/hku_hdf5_hl.dll +0 -0
  23. hikyuu/cpp/hku_hdf5_hl_cpp.dll +0 -0
  24. hikyuu/cpp/i18n/zh_CN/hikyuu.mo +0 -0
  25. hikyuu/cpp/msvcp140.dll +0 -0
  26. hikyuu/cpp/msvcp140_1.dll +0 -0
  27. hikyuu/cpp/msvcp140_2.dll +0 -0
  28. hikyuu/cpp/msvcp140_atomic_wait.dll +0 -0
  29. hikyuu/cpp/msvcp140_codecvt_ids.dll +0 -0
  30. hikyuu/cpp/sqlite3.dll +0 -0
  31. hikyuu/cpp/vcruntime140.dll +0 -0
  32. hikyuu/cpp/vcruntime140_1.dll +0 -0
  33. hikyuu/draw/__init__.pyi +1 -1
  34. hikyuu/draw/drawplot/__init__.pyi +31 -36
  35. hikyuu/draw/drawplot/bokeh_draw.pyi +651 -637
  36. hikyuu/draw/drawplot/common.pyi +3 -4
  37. hikyuu/draw/drawplot/echarts_draw.pyi +598 -572
  38. hikyuu/draw/drawplot/matplotlib_draw.pyi +872 -879
  39. hikyuu/draw/elder.pyi +19 -20
  40. hikyuu/draw/kaufman.pyi +18 -18
  41. hikyuu/draw/volume.pyi +10 -10
  42. hikyuu/extend.py +19 -0
  43. hikyuu/extend.pyi +594 -574
  44. hikyuu/hub.pyi +69 -67
  45. hikyuu/include/hikyuu/DataType.h +2 -2
  46. hikyuu/include/hikyuu/KData.h +83 -25
  47. hikyuu/include/hikyuu/KDataImp.h +31 -46
  48. hikyuu/include/hikyuu/KDataPrivatedBufferImp.h +73 -0
  49. hikyuu/include/hikyuu/KDataSharedBufferImp.h +69 -0
  50. hikyuu/include/hikyuu/KQuery.h +16 -4
  51. hikyuu/include/hikyuu/KRecord.h +4 -1
  52. hikyuu/include/hikyuu/Stock.h +10 -4
  53. hikyuu/include/hikyuu/StockManager.h +11 -3
  54. hikyuu/include/hikyuu/TransRecord.h +2 -2
  55. hikyuu/include/hikyuu/data_driver/KDataDriver.h +5 -0
  56. hikyuu/include/hikyuu/doc.h +2 -2
  57. hikyuu/include/hikyuu/global/GlobalSpotAgent.h +8 -0
  58. hikyuu/include/hikyuu/global/agent/SpotAgent.h +12 -7
  59. hikyuu/include/hikyuu/indicator/Indicator.h +11 -0
  60. hikyuu/include/hikyuu/indicator/Indicator2InImp.h +9 -0
  61. hikyuu/include/hikyuu/indicator/IndicatorImp.h +83 -15
  62. hikyuu/include/hikyuu/indicator/build_in.h +1 -0
  63. hikyuu/include/hikyuu/indicator/crt/AMA.h +2 -1
  64. hikyuu/include/hikyuu/indicator/crt/ATR.h +1 -1
  65. hikyuu/include/hikyuu/indicator/crt/CONTEXT.h +2 -0
  66. hikyuu/include/hikyuu/indicator/crt/CYCLE.h +3 -0
  67. hikyuu/include/hikyuu/indicator/crt/DMA.h +1 -1
  68. hikyuu/include/hikyuu/indicator/crt/IC.h +14 -6
  69. hikyuu/include/hikyuu/indicator/crt/ICIR.h +8 -4
  70. hikyuu/include/hikyuu/indicator/crt/INSUM.h +2 -0
  71. hikyuu/include/hikyuu/indicator/crt/PRICELIST.h +2 -0
  72. hikyuu/include/hikyuu/indicator/crt/REFX.h +25 -0
  73. hikyuu/include/hikyuu/indicator/crt/SLICE.h +4 -4
  74. hikyuu/include/hikyuu/indicator/crt/SPEARMAN.h +3 -2
  75. hikyuu/include/hikyuu/indicator/imp/IContext.h +5 -0
  76. hikyuu/include/hikyuu/indicator/imp/ICval.h +6 -0
  77. hikyuu/include/hikyuu/indicator/imp/IDropna.h +9 -0
  78. hikyuu/include/hikyuu/indicator/imp/IIc.h +2 -1
  79. hikyuu/include/hikyuu/indicator/imp/IPriceList.h +1 -0
  80. hikyuu/include/hikyuu/indicator/imp/IRefX.h +23 -0
  81. hikyuu/include/hikyuu/plugin/backtest.h +2 -0
  82. hikyuu/include/hikyuu/plugin/extind.h +45 -0
  83. hikyuu/include/hikyuu/plugin/hkuextra.h +21 -0
  84. hikyuu/include/hikyuu/plugin/interface/HkuExtraPluginInterface.h +16 -0
  85. hikyuu/include/hikyuu/plugin/interface/TMReportPluginInterface.h +1 -0
  86. hikyuu/include/hikyuu/python/pybind_utils.h +19 -11
  87. hikyuu/include/hikyuu/trade_manage/Performance.h +0 -1
  88. hikyuu/include/hikyuu/trade_manage/TradeCostBase.h +5 -0
  89. hikyuu/include/hikyuu/trade_manage/TradeManager.h +4 -0
  90. hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +10 -1
  91. hikyuu/include/hikyuu/trade_sys/allocatefunds/AllocateFundsBase.h +5 -0
  92. hikyuu/include/hikyuu/trade_sys/condition/ConditionBase.h +5 -0
  93. hikyuu/include/hikyuu/trade_sys/environment/EnvironmentBase.h +5 -0
  94. hikyuu/include/hikyuu/trade_sys/moneymanager/MoneyManagerBase.h +5 -0
  95. hikyuu/include/hikyuu/trade_sys/multifactor/MultiFactorBase.h +6 -3
  96. hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +4 -0
  97. hikyuu/include/hikyuu/trade_sys/profitgoal/ProfitGoalBase.h +5 -0
  98. hikyuu/include/hikyuu/trade_sys/selector/SelectorBase.h +5 -2
  99. hikyuu/include/hikyuu/trade_sys/signal/SignalBase.h +5 -0
  100. hikyuu/include/hikyuu/trade_sys/slippage/SlippageBase.h +5 -0
  101. hikyuu/include/hikyuu/trade_sys/stoploss/StoplossBase.h +6 -1
  102. hikyuu/include/hikyuu/trade_sys/system/System.h +5 -0
  103. hikyuu/include/hikyuu/utilities/datetime/Datetime.h +2 -2
  104. hikyuu/include/hikyuu/utilities/os.h +4 -0
  105. hikyuu/include/hikyuu/utilities/thread/GlobalMQStealThreadPool.h +1 -1
  106. hikyuu/include/hikyuu/utilities/thread/GlobalMQThreadPool.h +1 -1
  107. hikyuu/include/hikyuu/utilities/thread/GlobalThreadPool.h +1 -1
  108. hikyuu/include/hikyuu/utilities/thread/MQThreadPool.h +1 -1
  109. hikyuu/include/hikyuu/version.h +4 -4
  110. hikyuu/include/hikyuu/views/arrow_common.h +38 -0
  111. hikyuu/include/hikyuu/views/arrow_views.h +117 -0
  112. hikyuu/indicator/indicator.py +4 -5
  113. hikyuu/plugin/backtest.dll +0 -0
  114. hikyuu/plugin/clickhousedriver.dll +0 -0
  115. hikyuu/plugin/dataserver.dll +0 -0
  116. hikyuu/plugin/device.dll +0 -0
  117. hikyuu/plugin/extind.dll +0 -0
  118. hikyuu/plugin/hkuextra.dll +0 -0
  119. hikyuu/plugin/import2hdf5.dll +0 -0
  120. hikyuu/plugin/tmreport.dll +0 -0
  121. hikyuu/strategy/strategy_demo1.py +1 -1
  122. hikyuu/test/test_init.py +19 -19
  123. hikyuu/trade_manage/__init__.pyi +581 -556
  124. hikyuu/trade_manage/broker.pyi +19 -18
  125. hikyuu/trade_manage/broker_easytrader.pyi +6 -4
  126. hikyuu/trade_manage/broker_mail.pyi +22 -24
  127. hikyuu/trade_manage/trade.py +6 -0
  128. hikyuu/trade_manage/trade.pyi +581 -556
  129. hikyuu/trade_sys/__init__.py +4 -0
  130. hikyuu/util/check.pyi +17 -15
  131. hikyuu/util/mylog.pyi +8 -7
  132. hikyuu/util/notebook.pyi +9 -11
  133. hikyuu/util/singleton.pyi +8 -6
  134. {hikyuu-2.6.7.dist-info → hikyuu-2.6.8.dist-info}/METADATA +3 -1
  135. {hikyuu-2.6.7.dist-info → hikyuu-2.6.8.dist-info}/RECORD +140 -135
  136. {hikyuu-2.6.7.dist-info → hikyuu-2.6.8.dist-info}/top_level.txt +1 -1
  137. hikyuu/include/hikyuu/view/MarketView.h +0 -59
  138. /hikyuu/include/hikyuu/{view → views}/__init__.py +0 -0
  139. {hikyuu-2.6.7.dist-info → hikyuu-2.6.8.dist-info}/LICENSE +0 -0
  140. {hikyuu-2.6.7.dist-info → hikyuu-2.6.8.dist-info}/WHEEL +0 -0
  141. {hikyuu-2.6.7.dist-info → hikyuu-2.6.8.dist-info}/entry_points.txt +0 -0
@@ -32,7 +32,11 @@ from hikyuu.core import (ScoreRecordList, scorerecords_to_np, scorerecords_to_df
32
32
 
33
33
  ScoreRecordList.to_np = lambda self: scorerecords_to_np(self)
34
34
  ScoreRecordList.to_df = lambda self: scorerecords_to_df(self)
35
+ ScoreRecordList.to_numpy = ScoreRecordList.to_np
36
+ ScoreRecordList.to_pandas = ScoreRecordList.to_df
35
37
 
36
38
 
37
39
  SystemWeightList.to_np = lambda self: systemweights_to_np(self)
38
40
  SystemWeightList.to_df = lambda self: systemweights_to_df(self)
41
+ SystemWeightList.to_numpy = SystemWeightList.to_np
42
+ SystemWeightList.to_pandas = SystemWeightList.to_df
hikyuu/util/check.pyi CHANGED
@@ -5,13 +5,18 @@ import logging
5
5
  import multiprocessing.synchronize
6
6
  import sys as sys
7
7
  import traceback as traceback
8
+ import typing
8
9
  __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
10
  class HKUCheckError(Exception):
11
+ __firstlineno__: typing.ClassVar[int] = 17
12
+ __static_attributes__: typing.ClassVar[tuple] = ('expression', 'message')
10
13
  def __init__(self, expression, message):
11
14
  ...
12
15
  def __str__(self):
13
16
  ...
14
17
  class HKUIngoreError(Exception):
18
+ __firstlineno__: typing.ClassVar[int] = 26
19
+ __static_attributes__: typing.ClassVar[tuple] = ('expression', 'message')
15
20
  def __init__(self, expression, message = None):
16
21
  ...
17
22
  def __str__(self):
@@ -20,23 +25,21 @@ def checkif(expression, message, excepion = None, **kwargs):
20
25
  """
21
26
  如果 expression 为 True,则抛出异常。注意:该函数的判定和 assert 是相反的。
22
27
 
23
- :param boolean expression: 判断条件
24
- :param str message: 异常注解信息
25
- :param Exception exception: 指定的异常类,为None时,为默认 HKUCheckError 异常
26
-
28
+ :param boolean expression: 判断条件
29
+ :param str message: 异常注解信息
30
+ :param Exception exception: 指定的异常类,为None时,为默认 HKUCheckError 异常
27
31
  """
28
32
  def get_exception_info():
29
33
  ...
30
34
  def hku_catch(ret = None, trace = False, callback = None, retry = 1, with_msg = False, re_raise = False):
31
35
  """
32
36
  捕获发生的异常, 包装方式: @hku_catch()
33
- :param ret: 异常发生时返回值, with_msg为True时, 返回为 (ret, errmsg)
34
- :param boolean trace: 打印异常堆栈信息
35
- :param func callback: 发生异常后的回调函数, 入参同func
36
- :param int retry: 尝试执行的次数
37
- :param boolean with_msg: 是否返回异常错误信息, 为True时, 函数返回为 (ret, errmsg)
38
- :param boolean re_raise: 是否将错误信息以异常的方式重新抛出
39
-
37
+ :param ret: 异常发生时返回值, with_msg为True时, 返回为 (ret, errmsg)
38
+ :param boolean trace: 打印异常堆栈信息
39
+ :param func callback: 发生异常后的回调函数, 入参同func
40
+ :param int retry: 尝试执行的次数
41
+ :param boolean with_msg: 是否返回异常错误信息, 为True时, 函数返回为 (ret, errmsg)
42
+ :param boolean re_raise: 是否将错误信息以异常的方式重新抛出
40
43
  """
41
44
  def hku_check(exp, msg, *args, **kwargs):
42
45
  ...
@@ -48,10 +51,9 @@ def hku_check_throw(expression, message, excepion = None, **kwargs):
48
51
  """
49
52
  如果 expression 为 False,则抛出异常。
50
53
 
51
- :param boolean expression: 判断条件
52
- :param str message: 异常注解信息
53
- :param Exception exception: 指定的异常类,为None时,为默认 HKUCheckError 异常
54
-
54
+ :param boolean expression: 判断条件
55
+ :param str message: 异常注解信息
56
+ :param Exception exception: 指定的异常类,为None时,为默认 HKUCheckError 异常
55
57
  """
56
58
  def hku_run_ignore_exception(func, *args, **kwargs):
57
59
  """
hikyuu/util/mylog.pyi CHANGED
@@ -5,8 +5,11 @@ import multiprocessing as multiprocessing
5
5
  import os as os
6
6
  import time as time
7
7
  import traceback as traceback
8
+ import typing
8
9
  __all__ = ['FORMAT', 'LoggingContext', 'add_class_logger_handler', 'capture_multiprocess_all_logger', 'class_logger', 'functools', 'g_hku_logger_lock', 'get_default_logger', 'hku_benchmark', 'hku_debug', 'hku_debug_if', 'hku_error', 'hku_error_if', 'hku_fatal', 'hku_fatal_if', 'hku_info', 'hku_info_if', 'hku_logger', 'hku_logger_name', 'hku_trace', 'hku_trace_if', 'hku_warn', 'hku_warn_if', 'logging', 'multiprocessing', 'os', 'set_my_logger_file', 'spend_time', 'time', 'traceback', 'with_trace']
9
10
  class LoggingContext:
11
+ __firstlineno__: typing.ClassVar[int] = 271
12
+ __static_attributes__: typing.ClassVar[tuple] = ('close', 'handler', 'level', 'logger', 'old_level')
10
13
  def __enter__(self):
11
14
  ...
12
15
  def __exit__(self, et, ev, tb):
@@ -17,18 +20,16 @@ def add_class_logger_handler(class_list, level = 20, handler = None):
17
20
  """
18
21
  为指定的类增加日志 handler,并设定级别
19
22
 
20
- :param class_list: 类列表
21
- :param level: 日志级别
22
- :param handler: logging handler
23
-
23
+ :param class_list: 类列表
24
+ :param level: 日志级别
25
+ :param handler: logging handler
24
26
  """
25
27
  def capture_multiprocess_all_logger(queue, level = None):
26
28
  """
27
29
  重设所有子进程中的 logger 输出指定的 queue,并重设level
28
30
 
29
- @param multiprocessing.Queue queue 指定的 mp Queue
30
- @param level 日志输出等级, None为保持原有等级
31
-
31
+ @param multiprocessing.Queue queue 指定的 mp Queue
32
+ @param level 日志输出等级, None为保持原有等级
32
33
  """
33
34
  def class_logger(cls, enable = False):
34
35
  ...
hikyuu/util/notebook.pyi CHANGED
@@ -3,21 +3,19 @@ __all__ = ['in_interactive_session', 'in_ipython_frontend']
3
3
  def in_interactive_session() -> bool:
4
4
  """
5
5
 
6
- Check if we're running in an interactive shell.
6
+ Check if we're running in an interactive shell.
7
7
 
8
- Returns
9
- -------
10
- bool
11
- True if running under python/ipython interactive shell.
12
-
8
+ Returns
9
+ -------
10
+ bool
11
+ True if running under python/ipython interactive shell.
13
12
  """
14
13
  def in_ipython_frontend() -> bool:
15
14
  """
16
15
 
17
- Check if we're inside an IPython zmq frontend. 检测是否在 jupyter 环境中
16
+ Check if we're inside an IPython zmq frontend. 检测是否在 jupyter 环境中
18
17
 
19
- Returns
20
- -------
21
- bool
22
-
18
+ Returns
19
+ -------
20
+ bool
23
21
  """
hikyuu/util/singleton.pyi CHANGED
@@ -1,4 +1,5 @@
1
1
  from __future__ import annotations
2
+ import _thread
2
3
  import threading as threading
3
4
  import typing
4
5
  __all__ = ['SingletonType', 'threading']
@@ -6,13 +7,14 @@ class SingletonType(type):
6
7
  """
7
8
  基于 metalclass 实现单例
8
9
 
9
- 示例:
10
- class MyClass(metaclass=SingletonType):
11
- def __init__(self,name):
12
- self.name = name
13
-
10
+ 示例:
11
+ class MyClass(metaclass=SingletonType):
12
+ def __init__(self,name):
13
+ self.name = name
14
14
  """
15
- _instance_lock: typing.ClassVar[_thread.lock] # value = <unlocked _thread.lock object at 0x000002B0B2C44C30>
15
+ __firstlineno__: typing.ClassVar[int] = 13
16
+ __static_attributes__: typing.ClassVar[tuple] = tuple()
17
+ _instance_lock: typing.ClassVar[_thread.lock] # value = <unlocked _thread.lock object at 0x0000020A83F47880>
16
18
  @classmethod
17
19
  def __call__(cls, *args, **kwargs):
18
20
  ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: hikyuu
3
- Version: 2.6.7
3
+ Version: 2.6.8
4
4
  Summary: Hikyuu Quant Framework for System Trading Analysis and backtester
5
5
  Home-page: http://hikyuu.org/
6
6
  Author: fasiondog
@@ -49,6 +49,7 @@ Requires-Dist: pipdeptree
49
49
  Requires-Dist: h5py
50
50
  Requires-Dist: tdqm
51
51
  Requires-Dist: clickhouse-connect
52
+ Requires-Dist: pyarrow
52
53
 
53
54
  ![title](docs/source/_static/00000-title.png)
54
55
 
@@ -157,3 +158,4 @@ Hikyuu C++部分直接依赖以下开源项目(由以下项目间接依赖的
157
158
  | clickhouse | [https://github.com/ClickHouse/ClickHouse]() | Apache 2.0 |
158
159
  | xxhash | [https://github.com/Cyan4973/xxHash]() | BSD 2-Clause License |
159
160
  | utf8proc | [https://github.com/JuliaStrings/utf8proc]() | MIT |
161
+ | arrow | [https://github.com/apache/arrow]() | Apache 2.0 |