hikyuu 2.6.8.4__py3-none-manylinux2014_x86_64.whl → 2.7.0__py3-none-manylinux2014_x86_64.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 (209) hide show
  1. hikyuu/__init__.py +31 -17
  2. hikyuu/__init__.pyi +610 -590
  3. hikyuu/analysis/__init__.pyi +584 -563
  4. hikyuu/analysis/analysis.pyi +585 -564
  5. hikyuu/core.py +2 -0
  6. hikyuu/core.pyi +586 -565
  7. hikyuu/cpp/__init__.pyi +2 -2
  8. hikyuu/cpp/core310.pyi +501 -108
  9. hikyuu/cpp/core310.so +0 -0
  10. hikyuu/cpp/core311.pyi +495 -108
  11. hikyuu/cpp/core311.so +0 -0
  12. hikyuu/cpp/core312.pyi +495 -108
  13. hikyuu/cpp/core312.so +0 -0
  14. hikyuu/cpp/core313.pyi +501 -108
  15. hikyuu/cpp/core313.so +0 -0
  16. hikyuu/cpp/i18n/zh_CN/hikyuu.mo +0 -0
  17. hikyuu/cpp/libboost_charconv-mt.so +0 -0
  18. hikyuu/cpp/libboost_charconv-mt.so.1.88.0 +0 -0
  19. hikyuu/cpp/libboost_chrono-mt.so +0 -0
  20. hikyuu/cpp/libboost_chrono-mt.so.1.88.0 +0 -0
  21. hikyuu/cpp/libboost_date_time-mt.so +0 -0
  22. hikyuu/cpp/libboost_date_time-mt.so.1.88.0 +0 -0
  23. hikyuu/cpp/libboost_serialization-mt.so +0 -0
  24. hikyuu/cpp/libboost_serialization-mt.so.1.88.0 +0 -0
  25. hikyuu/cpp/libboost_system-mt.so +0 -0
  26. hikyuu/cpp/libboost_system-mt.so.1.88.0 +0 -0
  27. hikyuu/cpp/libboost_thread-mt.so +0 -0
  28. hikyuu/cpp/libboost_thread-mt.so.1.88.0 +0 -0
  29. hikyuu/cpp/libboost_wserialization-mt.so +0 -0
  30. hikyuu/cpp/libboost_wserialization-mt.so.1.88.0 +0 -0
  31. hikyuu/cpp/libhikyuu.so +0 -0
  32. hikyuu/cpp/libsqlite3.so +0 -0
  33. hikyuu/data/clickhouse_upgrade/createdb.sql +105 -105
  34. hikyuu/data/common.py +3 -3
  35. hikyuu/data/common_clickhouse.py +1 -1
  36. hikyuu/data/download_block.py +351 -0
  37. hikyuu/data/em_block_to_clickhouse.py +26 -74
  38. hikyuu/data/em_block_to_mysql.py +25 -75
  39. hikyuu/data/em_block_to_sqlite.py +26 -78
  40. hikyuu/data/hku_config_template.py +3 -3
  41. hikyuu/data/pytdx_to_clickhouse.py +15 -11
  42. hikyuu/data/pytdx_to_h5.py +6 -2
  43. hikyuu/data/pytdx_to_mysql.py +5 -1
  44. hikyuu/data/pytdx_weight_to_clickhouse.py +1 -1
  45. hikyuu/data/pytdx_weight_to_mysql.py +1 -1
  46. hikyuu/data/pytdx_weight_to_sqlite.py +1 -1
  47. hikyuu/data/zh_bond10_to_clickhouse.py +1 -1
  48. hikyuu/draw/__init__.pyi +1 -1
  49. hikyuu/draw/drawplot/__init__.pyi +9 -9
  50. hikyuu/draw/drawplot/bokeh_draw.pyi +600 -580
  51. hikyuu/draw/drawplot/common.pyi +1 -1
  52. hikyuu/draw/drawplot/echarts_draw.pyi +602 -582
  53. hikyuu/draw/drawplot/matplotlib_draw.py +4 -74
  54. hikyuu/draw/drawplot/matplotlib_draw.pyi +612 -592
  55. hikyuu/draw/elder.pyi +11 -11
  56. hikyuu/draw/kaufman.pyi +18 -18
  57. hikyuu/draw/volume.pyi +10 -10
  58. hikyuu/examples/notebook/Demo/Demo1.ipynb +48 -33
  59. hikyuu/extend.py +0 -7
  60. hikyuu/extend.pyi +594 -573
  61. hikyuu/fetcher/stock/zh_block_em.py +12 -40
  62. hikyuu/gui/HikyuuTDX.py +99 -31
  63. hikyuu/gui/data/CollectSpotThread.py +1 -1
  64. hikyuu/gui/data/EscapetimeThread.py +8 -14
  65. hikyuu/gui/data/ImportBlockInfoTask.py +3 -10
  66. hikyuu/gui/data/MainWindow.py +1196 -717
  67. hikyuu/gui/data/SchedImportThread.py +2 -2
  68. hikyuu/gui/data/UsePytdxImportToH5Thread.py +3 -3
  69. hikyuu/gui/data/UseQmtImportToH5Thread.py +2 -2
  70. hikyuu/gui/data/UseTdxImportToH5Thread.py +3 -3
  71. hikyuu/gui/data/tool.py +32 -25
  72. hikyuu/gui/dataserver.py +5 -3
  73. hikyuu/gui/images/liandongxiaopu.png +0 -0
  74. hikyuu/hub.pyi +6 -6
  75. hikyuu/include/hikyuu/DataType.h +4 -16
  76. hikyuu/include/hikyuu/KData.h +6 -3
  77. hikyuu/include/hikyuu/KDataPrivatedBufferImp.h +1 -1
  78. hikyuu/include/hikyuu/KDataSharedBufferImp.h +1 -1
  79. hikyuu/include/hikyuu/KQuery.h +2 -2
  80. hikyuu/include/hikyuu/Stock.h +4 -1
  81. hikyuu/include/hikyuu/StockManager.h +13 -3
  82. hikyuu/include/hikyuu/data_driver/BaseInfoDriver.h +8 -0
  83. hikyuu/include/hikyuu/data_driver/BlockInfoDriver.h +6 -0
  84. hikyuu/include/hikyuu/data_driver/KDataDriver.h +26 -1
  85. hikyuu/include/hikyuu/data_driver/base_info/mysql/MySQLBaseInfoDriver.h +1 -1
  86. hikyuu/include/hikyuu/data_driver/base_info/sqlite/SQLiteBaseInfoDriver.h +1 -1
  87. hikyuu/include/hikyuu/data_driver/block_info/mysql/MySQLBlockInfoDriver.h +2 -1
  88. hikyuu/include/hikyuu/data_driver/block_info/qianlong/QLBlockInfoDriver.h +2 -1
  89. hikyuu/include/hikyuu/data_driver/block_info/sqlite/SQLiteBlockInfoDriver.h +2 -1
  90. hikyuu/include/hikyuu/data_driver/kdata/DoNothingKDataDriver.h +1 -1
  91. hikyuu/include/hikyuu/data_driver/kdata/cvs/KDataTempCsvDriver.h +1 -1
  92. hikyuu/include/hikyuu/data_driver/kdata/hdf5/H5KDataDriver.h +1 -1
  93. hikyuu/include/hikyuu/data_driver/kdata/mysql/MySQLKDataDriver.h +1 -1
  94. hikyuu/include/hikyuu/data_driver/kdata/sqlite/SQLiteKDataDriver.h +1 -1
  95. hikyuu/include/hikyuu/data_driver/kdata/tdx/TdxKDataDriver.h +1 -1
  96. hikyuu/include/hikyuu/hikyuu.h +1 -1
  97. hikyuu/include/hikyuu/indicator/build_in.h +1 -0
  98. hikyuu/include/hikyuu/indicator/crt/CYCLE.h +4 -4
  99. hikyuu/include/hikyuu/indicator/crt/HSL.h +2 -2
  100. hikyuu/include/hikyuu/indicator/crt/QUANTILE_TRUNC.h +30 -0
  101. hikyuu/include/hikyuu/indicator/crt/TURNOVER.h +1 -0
  102. hikyuu/include/hikyuu/indicator/crt/ZSCORE.h +2 -2
  103. hikyuu/include/hikyuu/indicator/imp/IQuantileTrunc.h +25 -0
  104. hikyuu/include/hikyuu/misc.h +38 -0
  105. hikyuu/include/hikyuu/plugin/dataserver.h +2 -1
  106. hikyuu/include/hikyuu/plugin/device.h +10 -0
  107. hikyuu/include/hikyuu/plugin/extind.h +37 -0
  108. hikyuu/include/hikyuu/plugin/hkuextra.h +0 -18
  109. hikyuu/include/hikyuu/plugin/interface/DataServerPluginInterface.h +2 -2
  110. hikyuu/include/hikyuu/plugin/interface/DevicePluginInterface.h +2 -0
  111. hikyuu/include/hikyuu/plugin/interface/ExtendIndicatorsPluginInterface.h +12 -0
  112. hikyuu/include/hikyuu/plugin/interface/HkuExtraPluginInterface.h +0 -14
  113. hikyuu/include/hikyuu/plugin/interface/plugins.h +3 -1
  114. hikyuu/include/hikyuu/python/pybind_utils.h +1 -8
  115. hikyuu/include/hikyuu/strategy/RunSystemInStrategy.h +3 -0
  116. hikyuu/include/hikyuu/trade_manage/Performance.h +4 -4
  117. hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +10 -1
  118. hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedCapitalFundsMM.h +0 -4
  119. hikyuu/include/hikyuu/trade_sys/multifactor/MultiFactorBase.h +36 -3
  120. hikyuu/include/hikyuu/trade_sys/multifactor/NormalizeBase.h +125 -0
  121. hikyuu/include/hikyuu/trade_sys/multifactor/ScoresFilterBase.h +125 -0
  122. hikyuu/include/hikyuu/trade_sys/multifactor/build_in.h +3 -0
  123. hikyuu/include/hikyuu/trade_sys/multifactor/buildin_norm.h +36 -0
  124. hikyuu/include/hikyuu/trade_sys/multifactor/buildin_scfilter.h +51 -0
  125. hikyuu/include/hikyuu/trade_sys/multifactor/filter/GroupSCFilter.h +24 -0
  126. hikyuu/include/hikyuu/trade_sys/multifactor/filter/IgnoreLessOrEqualValueSCFilter.h +24 -0
  127. hikyuu/include/hikyuu/trade_sys/multifactor/filter/IgnoreNanSCFilter.h +24 -0
  128. hikyuu/include/hikyuu/trade_sys/multifactor/filter/MinAmountPercentSCFilter.h +25 -0
  129. hikyuu/include/hikyuu/trade_sys/multifactor/filter/PriceSCFilter.h +24 -0
  130. hikyuu/include/hikyuu/trade_sys/multifactor/filter/TopNSCFilter.h +24 -0
  131. hikyuu/include/hikyuu/trade_sys/multifactor/imp/EqualWeightMultiFactor.h +1 -1
  132. hikyuu/include/hikyuu/trade_sys/multifactor/imp/ICIRMultiFactor.h +1 -1
  133. hikyuu/include/hikyuu/trade_sys/multifactor/imp/ICMultiFactor.h +1 -1
  134. hikyuu/include/hikyuu/trade_sys/multifactor/imp/WeightMultiFactor.h +1 -1
  135. hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormMinMax.h +23 -0
  136. hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormQuantile.h +28 -0
  137. hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormQuantileUniform.h +28 -0
  138. hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormZScore.h +25 -0
  139. hikyuu/include/hikyuu/trade_sys/multifactor/normalize/__init__.py +1 -0
  140. hikyuu/include/hikyuu/trade_sys/multifactor/normalize/quantile_trunc.h +16 -0
  141. hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +7 -0
  142. hikyuu/include/hikyuu/trade_sys/portfolio/imp/SimplePortfolio.h +7 -0
  143. hikyuu/include/hikyuu/trade_sys/portfolio/imp/WithoutAFPortfolio.h +7 -0
  144. hikyuu/include/hikyuu/trade_sys/selector/SelectorBase.h +49 -0
  145. hikyuu/include/hikyuu/trade_sys/selector/build_in.h +1 -0
  146. hikyuu/include/hikyuu/trade_sys/selector/crt/SE_MultiFactor2.h +40 -0
  147. hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector.h +0 -3
  148. hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector2.h +49 -0
  149. hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorSelector.h +1 -1
  150. hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorValueSelector.h +1 -1
  151. hikyuu/include/hikyuu/trade_sys/signal/imp/BandSignal2.h +0 -4
  152. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/AddValueSignal.h +2 -2
  153. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/DivValueSignal.h +2 -2
  154. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/MulValueSignal.h +2 -2
  155. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorSignal.h +1 -1
  156. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorValueSignal.h +4 -4
  157. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/SubValueSignal.h +2 -2
  158. hikyuu/include/hikyuu/trade_sys/slippage/build_in.h +5 -1
  159. hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_LogNormal.h +22 -0
  160. hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_Normal.h +22 -0
  161. hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_TruncNormal.h +25 -0
  162. hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_Uniform.h +23 -0
  163. hikyuu/include/hikyuu/trade_sys/slippage/imp/LogNormalSlippage.h +28 -0
  164. hikyuu/include/hikyuu/trade_sys/slippage/imp/NormalSlippage.h +28 -0
  165. hikyuu/include/hikyuu/trade_sys/slippage/imp/TruncNormalSlippage.h +28 -0
  166. hikyuu/include/hikyuu/trade_sys/slippage/imp/UniformSlippage.h +24 -0
  167. hikyuu/include/hikyuu/trade_sys/system/System.h +14 -1
  168. hikyuu/include/hikyuu/utilities/SpendTimer.h +17 -7
  169. hikyuu/include/hikyuu/utilities/arithmetic.h +55 -0
  170. hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLConnect.h +1 -1
  171. hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLStatement.h +1 -1
  172. hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteConnect.h +1 -1
  173. hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteStatement.h +1 -1
  174. hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +4 -1
  175. hikyuu/include/hikyuu/version.h +5 -5
  176. hikyuu/plugin/libbacktest.so +0 -0
  177. hikyuu/plugin/libclickhousedriver.so +0 -0
  178. hikyuu/plugin/libdataserver.so +0 -0
  179. hikyuu/{cpp/core39.so → plugin/libdataserver_parquet.so} +0 -0
  180. hikyuu/plugin/libdevice.so +0 -0
  181. hikyuu/plugin/libextind.so +0 -0
  182. hikyuu/plugin/libhkuextra.so +0 -0
  183. hikyuu/plugin/libimport2hdf5.so +0 -0
  184. hikyuu/plugin/libtmreport.so +0 -0
  185. hikyuu/trade_manage/__init__.pyi +599 -579
  186. hikyuu/trade_manage/broker.pyi +3 -3
  187. hikyuu/trade_manage/broker_easytrader.pyi +1 -1
  188. hikyuu/trade_manage/trade.py +0 -2
  189. hikyuu/trade_manage/trade.pyi +599 -579
  190. hikyuu/util/__init__.pyi +1 -1
  191. hikyuu/util/singleton.pyi +1 -1
  192. {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/METADATA +36 -32
  193. {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/RECORD +197 -164
  194. {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/top_level.txt +2 -2
  195. hikyuu/cpp/core39.pyi +0 -14385
  196. hikyuu/data_driver/__init__.py +0 -49
  197. hikyuu/data_driver/jqdata_data_driver.py +0 -277
  198. hikyuu/data_driver/pytdx_data_driver.py +0 -292
  199. hikyuu/fetcher/stock/zh_stock_a_huatai.py +0 -51
  200. hikyuu/fetcher/stock/zh_stock_a_pytdx.py +0 -129
  201. hikyuu/gui/data/CollectToMemThread.py +0 -123
  202. hikyuu/gui/data/CollectToMySQLThread.py +0 -178
  203. hikyuu/gui/start_huatai_insight.py +0 -510
  204. hikyuu/include/hikyuu/views/arrow_common.h +0 -38
  205. hikyuu/include/hikyuu/views/arrow_views.h +0 -117
  206. hikyuu/tools/update_block_info.py +0 -168
  207. /hikyuu/include/hikyuu/{views → trade_sys/multifactor/filter}/__init__.py +0 -0
  208. {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/WHEEL +0 -0
  209. {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/entry_points.txt +0 -0
@@ -1,168 +0,0 @@
1
- #!/usr/bin/python
2
- # -*- coding: utf8 -*-
3
- #
4
- # Create on: 2023-12-18
5
- # Author: fasiondog
6
-
7
- import requests
8
- import akshare as ak
9
- from hikyuu.interactive import *
10
-
11
-
12
- def get_code_market_dict():
13
- ret = {}
14
- for s in sm:
15
- if s.type in (constant.STOCKTYPE_A, constant.STOCKTYPE_A_BJ, constant.STOCKTYPE_B, constant.STOCKTYPE_GEM, constant.STOCKTYPE_START):
16
- ret[s.code] = "0" if s.market == 'SH' else "1"
17
- return ret
18
-
19
-
20
- def get_all_hybk_info():
21
- code_market = get_code_market_dict()
22
- blk_names = ak.stock_board_industry_name_em()['板块名称']
23
- ret = {}
24
- for blk_name in blk_names:
25
- print(blk_name)
26
- ret[blk_name] = []
27
- stk_codes = ak.stock_board_industry_cons_em(blk_name)
28
- stk_codes = stk_codes['代码'].to_list()
29
- for stk_code in stk_codes:
30
- try:
31
- ret[blk_name].append(f"{code_market[stk_code]},{stk_code}")
32
- except:
33
- print(stk_code)
34
- return ret
35
-
36
-
37
- def get_all_gnbk_info():
38
- code_market = get_code_market_dict()
39
- blk_names = ak.stock_board_concept_name_em()['板块名称']
40
- ret = {}
41
- for blk_name in blk_names:
42
- print(blk_name)
43
- ret[blk_name] = []
44
- stk_codes = ak.stock_board_concept_cons_em(blk_name)
45
- stk_codes = stk_codes['代码'].to_list()
46
- for stk_code in stk_codes:
47
- try:
48
- ret[blk_name].append(f"{code_market[stk_code]},{stk_code}")
49
- except:
50
- print(stk_code)
51
- return ret
52
-
53
-
54
- def get_all_dybk_info():
55
- url = "http://13.push2.eastmoney.com/api/qt/clist/get"
56
- params = {
57
- "pn": "1",
58
- "pz": "50000",
59
- "po": "1",
60
- "np": "1",
61
- "ut": "bd1d9ddb04089700cf9c27f6f7426281",
62
- "fltt": "2",
63
- "invt": "2",
64
- "fid": "f3",
65
- "fs": "m:90+t:1+f:!50",
66
- "fields": "f12,f14",
67
- # "fields": "f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f12,f13,f14,f15,f16,f17,f18,f20,f21,f23,f24,f25,f22,f11,f62,f128,"
68
- # "f136,f115,f152",
69
- "_": "1623833739532",
70
- }
71
- r = requests.get(url, params=params)
72
- data_json = r.json()
73
- data_json = data_json["data"]["diff"]
74
-
75
- params = {
76
- "pn": "1",
77
- "pz": "2000",
78
- "po": "1",
79
- "np": "1",
80
- "ut": "bd1d9ddb04089700cf9c27f6f7426281",
81
- "fltt": "2",
82
- "invt": "2",
83
- "fid": "f3",
84
- # "fs": f"b:{stock_board_code} f:!50",
85
- "fields": "f12",
86
- "_": "1626081702127",
87
- }
88
-
89
- ret = {}
90
- code_market = get_code_market_dict()
91
- for v in data_json:
92
- # print(v)
93
- blk_code = v["f12"]
94
- blk_name = v["f14"]
95
- print(blk_name)
96
- ret[blk_name] = []
97
- params["fs"] = f"b:{blk_code} f:!50"
98
- r = requests.get(url, params=params)
99
- stk_json = r.json()
100
- stk_json = stk_json["data"]["diff"]
101
-
102
- for item in stk_json:
103
- stk_code = item["f12"]
104
- try:
105
- ret[blk_name].append(f"{code_market[stk_code]},{stk_code}")
106
- except:
107
- print(stk_code)
108
- return ret
109
-
110
-
111
- def get_all_zsbk_info():
112
- code_market = get_code_market_dict()
113
- blk_info = ak.index_stock_info()
114
- blk_codes = blk_info["index_code"]
115
- blk_names = blk_info["display_name"]
116
- ret = {}
117
- total = len(blk_codes)
118
- # for blk_name in blk_names:
119
- for i in range(total):
120
- blk_name = blk_names[i]
121
- blk_code = blk_codes[i]
122
- print(i, blk_name)
123
- # 沪深指数有重复,避免深指覆盖
124
- if blk_name in ret:
125
- continue
126
- try:
127
- ret[blk_name] = []
128
- stk_codes = ak.index_stock_cons_csindex(symbol=blk_code)
129
- stk_codes = stk_codes['成分券代码'].to_list()
130
- for stk_code in stk_codes:
131
- try:
132
- ret[blk_name].append(f"{code_market[stk_code]},{stk_code}")
133
- except:
134
- print(stk_code)
135
- except KeyboardInterrupt:
136
- exit(-1)
137
- except:
138
- print("Failed!", blk_code, blk_name)
139
- return ret
140
-
141
-
142
- def write_blk_file(blk_info, filename):
143
- with open(filename, 'w', encoding='utf-8') as f:
144
- for k in blk_info:
145
- print(k)
146
- if blk_info[k]:
147
- f.write(f"[{k}]\n")
148
- for code in blk_info[k]:
149
- f.write(f'{code}\n')
150
-
151
-
152
- if __name__ == "__main__":
153
- # # 更新行业板块
154
- # x = get_all_hybk_info()
155
- # write_blk_file(x, 'hikyuu/config/block/hybk.ini')
156
-
157
- # # 更新概念板块
158
- # x = get_all_gnbk_info()
159
- # write_blk_file(x, 'hikyuu/config/block/gnbk.ini')
160
-
161
- # # 更新地域板块
162
- # x = get_all_dybk_info()
163
- # write_blk_file(x, 'hikyuu/config/block/dybk.ini')
164
-
165
- # 更新指数成分
166
- x = get_all_zsbk_info()
167
- write_blk_file(x, 'hikyuu/config/block/zsbk.ini')
168
- # print(x)