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.
Files changed (146) hide show
  1. hikyuu/__init__.py +16 -0
  2. hikyuu/__init__.pyi +484 -474
  3. hikyuu/analysis/__init__.pyi +466 -445
  4. hikyuu/analysis/analysis.pyi +467 -446
  5. hikyuu/core.pyi +468 -447
  6. hikyuu/cpp/boost_date_time-mt.dll +0 -0
  7. hikyuu/cpp/boost_serialization-mt.dll +0 -0
  8. hikyuu/cpp/boost_wserialization-mt.dll +0 -0
  9. hikyuu/cpp/core310.pyd +0 -0
  10. hikyuu/cpp/core310.pyi +1070 -878
  11. hikyuu/cpp/core311.pyd +0 -0
  12. hikyuu/cpp/core311.pyi +1070 -878
  13. hikyuu/cpp/core312.pyd +0 -0
  14. hikyuu/cpp/core312.pyi +1070 -878
  15. hikyuu/cpp/core313.pyd +0 -0
  16. hikyuu/cpp/core313.pyi +1070 -876
  17. hikyuu/cpp/core39.pyd +0 -0
  18. hikyuu/cpp/core39.pyi +1070 -878
  19. hikyuu/cpp/hikyuu.dll +0 -0
  20. hikyuu/cpp/hikyuu.lib +0 -0
  21. hikyuu/cpp/i18n/__init__.py +0 -0
  22. hikyuu/cpp/i18n/zh_CN/__init__.py +0 -0
  23. hikyuu/cpp/i18n/zh_CN/hikyuu.mo +0 -0
  24. hikyuu/cpp/sqlite3.dll +0 -0
  25. hikyuu/data/clickhouse_upgrade/__init__.py +1 -0
  26. hikyuu/data/clickhouse_upgrade/createdb.sql +1085 -0
  27. hikyuu/data/common_clickhouse.py +465 -0
  28. hikyuu/data/em_block_to_clickhouse.py +120 -0
  29. hikyuu/data/hku_config_template.py +58 -3
  30. hikyuu/data/pytdx_finance_to_clickhouse.py +107 -0
  31. hikyuu/data/pytdx_to_clickhouse.py +841 -0
  32. hikyuu/data/pytdx_to_mysql.py +4 -4
  33. hikyuu/data/pytdx_weight_to_clickhouse.py +191 -0
  34. hikyuu/data/tdx_to_clickhouse.py +448 -0
  35. hikyuu/data/tdx_to_h5.py +1 -1
  36. hikyuu/data/zh_bond10_to_clickhouse.py +49 -0
  37. hikyuu/draw/__init__.pyi +1 -1
  38. hikyuu/draw/drawplot/bokeh_draw.pyi +479 -471
  39. hikyuu/draw/drawplot/echarts_draw.py +9 -8
  40. hikyuu/draw/drawplot/echarts_draw.pyi +479 -471
  41. hikyuu/draw/drawplot/matplotlib_draw.py +3 -3
  42. hikyuu/draw/drawplot/matplotlib_draw.pyi +479 -471
  43. hikyuu/draw/elder.pyi +6 -6
  44. hikyuu/draw/kaufman.py +1 -1
  45. hikyuu/draw/kaufman.pyi +10 -10
  46. hikyuu/draw/volume.pyi +5 -5
  47. hikyuu/examples/notebook/000-Index.ipynb +1 -1
  48. hikyuu/examples/notebook/001-overview.ipynb +78 -63
  49. hikyuu/examples/notebook/002-HowToGetStock.ipynb +259 -40
  50. hikyuu/examples/notebook/003-HowToGetKDataAndDraw.ipynb +49 -41
  51. hikyuu/examples/notebook/004-IndicatorOverview.ipynb +29 -29
  52. hikyuu/examples/notebook/005-Drawplot.ipynb +66 -37
  53. hikyuu/examples/notebook/006-TradeManager.ipynb +808 -61
  54. hikyuu/examples/notebook/007-SystemDetails.ipynb +23 -23
  55. hikyuu/examples/notebook/009-RealData.ipynb +3 -3
  56. hikyuu/examples/notebook/010-Portfolio.ipynb +761 -122
  57. hikyuu/extend.py +15 -100
  58. hikyuu/extend.pyi +478 -493
  59. hikyuu/fetcher/stock/zh_stock_a_pytdx.py +9 -20
  60. hikyuu/fetcher/stock/zh_stock_a_qmt.py +4 -5
  61. hikyuu/fetcher/stock/zh_stock_a_sina_qq.py +16 -60
  62. hikyuu/flat/Spot.py +96 -200
  63. hikyuu/gui/HikyuuTDX.py +134 -7
  64. hikyuu/gui/data/ImportBlockInfoTask.py +11 -0
  65. hikyuu/gui/data/ImportHistoryFinanceTask.py +15 -1
  66. hikyuu/gui/data/ImportPytdxTimeToH5Task.py +11 -1
  67. hikyuu/gui/data/ImportPytdxToH5Task.py +13 -1
  68. hikyuu/gui/data/ImportPytdxTransToH5Task.py +11 -1
  69. hikyuu/gui/data/ImportTdxToH5Task.py +13 -1
  70. hikyuu/gui/data/ImportWeightToSqliteTask.py +14 -1
  71. hikyuu/gui/data/ImportZhBond10Task.py +11 -0
  72. hikyuu/gui/data/MainWindow.py +210 -135
  73. hikyuu/gui/data/UsePytdxImportToH5Thread.py +45 -26
  74. hikyuu/gui/data/UseTdxImportToH5Thread.py +19 -1
  75. hikyuu/gui/dataserver.py +12 -4
  76. hikyuu/gui/spot_server.py +30 -40
  77. hikyuu/gui/start_qmt.py +20 -3
  78. hikyuu/hub.pyi +6 -6
  79. hikyuu/include/hikyuu/DataType.h +2 -0
  80. hikyuu/include/hikyuu/KQuery.h +22 -28
  81. hikyuu/include/hikyuu/MarketInfo.h +1 -1
  82. hikyuu/include/hikyuu/Stock.h +15 -3
  83. hikyuu/include/hikyuu/StockManager.h +12 -3
  84. hikyuu/include/hikyuu/StockTypeInfo.h +6 -0
  85. hikyuu/include/hikyuu/TransRecord.h +2 -8
  86. hikyuu/include/hikyuu/data_driver/kdata/mysql/KRecordTable.h +1 -0
  87. hikyuu/include/hikyuu/doc.h +4 -0
  88. hikyuu/include/hikyuu/global/GlobalSpotAgent.h +1 -1
  89. hikyuu/include/hikyuu/global/SpotRecord.h +15 -31
  90. hikyuu/include/hikyuu/global/agent/spot_generated.h +48 -232
  91. hikyuu/include/hikyuu/global/schedule/scheduler.h +1 -1
  92. hikyuu/include/hikyuu/indicator/Indicator.h +37 -0
  93. hikyuu/include/hikyuu/lang.h +27 -0
  94. hikyuu/include/hikyuu/plugin/KDataToHdf5Importer.h +9 -1
  95. hikyuu/include/hikyuu/plugin/dataserver.h +26 -1
  96. hikyuu/include/hikyuu/plugin/device.h +2 -1
  97. hikyuu/include/hikyuu/plugin/hkuextra.h +56 -0
  98. hikyuu/include/hikyuu/plugin/interface/DataDriverPluginInterface.h +27 -0
  99. hikyuu/include/hikyuu/plugin/interface/DataServerPluginInterface.h +2 -1
  100. hikyuu/include/hikyuu/plugin/interface/DevicePluginInterface.h +1 -1
  101. hikyuu/include/hikyuu/plugin/interface/HkuExtraPluginInterface.h +38 -0
  102. hikyuu/include/hikyuu/plugin/interface/ImportKDataToHdf5PluginInterface.h +13 -1
  103. hikyuu/include/hikyuu/plugin/interface/plugins.h +4 -0
  104. hikyuu/include/hikyuu/python/pybind_utils.h +9 -0
  105. hikyuu/include/hikyuu/strategy/Strategy.h +0 -9
  106. hikyuu/include/hikyuu/trade_manage/TradeRecord.h +1 -1
  107. hikyuu/include/hikyuu/utilities/config.h +0 -2
  108. hikyuu/include/hikyuu/utilities/os.h +9 -0
  109. hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +2 -1
  110. hikyuu/include/hikyuu/version.h +4 -4
  111. hikyuu/include/hikyuu/view/MarketView.h +59 -0
  112. hikyuu/indicator/__init__.py +0 -1
  113. hikyuu/indicator/indicator.py +14 -53
  114. hikyuu/plugin/backtest.dll +0 -0
  115. hikyuu/plugin/clickhousedriver.dll +0 -0
  116. hikyuu/plugin/dataserver.dll +0 -0
  117. hikyuu/plugin/device.dll +0 -0
  118. hikyuu/plugin/extind.dll +0 -0
  119. hikyuu/plugin/hkuextra.dll +0 -0
  120. hikyuu/plugin/import2hdf5.dll +0 -0
  121. hikyuu/plugin/tmreport.dll +0 -0
  122. hikyuu/test/test_init.py +59 -0
  123. hikyuu/test/test_real_tdx_import.py +336 -0
  124. hikyuu/test/test_tdx_import.py +315 -0
  125. hikyuu/test/test_tdx_real_data_import.py +281 -0
  126. hikyuu/trade_manage/__init__.pyi +479 -471
  127. hikyuu/trade_manage/trade.py +4 -65
  128. hikyuu/trade_manage/trade.pyi +479 -483
  129. hikyuu/trade_sys/__init__.py +11 -0
  130. hikyuu/util/__init__.py +1 -0
  131. hikyuu/util/__init__.pyi +4 -4
  132. hikyuu/util/check.py +8 -0
  133. hikyuu/util/check.pyi +5 -1
  134. hikyuu/util/singleton.pyi +1 -1
  135. {hikyuu-2.6.5.dist-info → hikyuu-2.6.7.dist-info}/METADATA +7 -5
  136. {hikyuu-2.6.5.dist-info → hikyuu-2.6.7.dist-info}/RECORD +142 -124
  137. {hikyuu-2.6.5.dist-info → hikyuu-2.6.7.dist-info}/top_level.txt +4 -3
  138. hikyuu/include/hikyuu/global/agent/hikyuu/flat/__init__.py +0 -1
  139. hikyuu/include/hikyuu/utilities/mo/__init__.py +0 -1
  140. hikyuu/include/hikyuu/utilities/mo/mo.h +0 -48
  141. hikyuu/indicator/talib_wrap.py +0 -1273
  142. /hikyuu/include/hikyuu/utilities/{mo/moFileReader.h → moFileReader.h} +0 -0
  143. /hikyuu/include/hikyuu/{global/agent/hikyuu → view}/__init__.py +0 -0
  144. {hikyuu-2.6.5.dist-info → hikyuu-2.6.7.dist-info}/LICENSE +0 -0
  145. {hikyuu-2.6.5.dist-info → hikyuu-2.6.7.dist-info}/WHEEL +0 -0
  146. {hikyuu-2.6.5.dist-info → hikyuu-2.6.7.dist-info}/entry_points.txt +0 -0
hikyuu/__init__.py CHANGED
@@ -2,6 +2,8 @@
2
2
  # -*- coding: utf8 -*-
3
3
  # cp936
4
4
 
5
+ import atexit
6
+ import io
5
7
  from pathlib import Path
6
8
  import pickle
7
9
  import traceback
@@ -70,6 +72,15 @@ except Exception as e:
70
72
 
71
73
  __version__ = get_version()
72
74
 
75
+
76
+ def hku_cleanup():
77
+ # 释放所有K线数据, 用于防止python实现的扩展K线转换函数由于GIL导致退出时异常
78
+ release_extra_ktype()
79
+
80
+
81
+ atexit.register(hku_cleanup)
82
+
83
+
73
84
  sm = StockManager.instance()
74
85
 
75
86
  plugin_path = Path.home() / '.hikyuu' / 'plugin'
@@ -80,6 +91,8 @@ else:
80
91
  sm.set_plugin_path(plugin_path)
81
92
  print(f"current plugin path: {plugin_path}")
82
93
 
94
+ sm.set_language_path(f'{BASE_DIR}/cpp/i18n')
95
+
83
96
 
84
97
  class iodog:
85
98
  # Only for compatibility with old code
@@ -103,6 +116,9 @@ if in_ipython_frontend():
103
116
  hku_info("running in jupyter")
104
117
  iodog.open()
105
118
 
119
+ # windows 终端下执行无法正常显示 c++ 输出中文
120
+ if sys.platform == 'win32' and not in_ipython_frontend():
121
+ os.system('chcp 65001 > nul')
106
122
 
107
123
  use_draw_engine('matplotlib')
108
124