hikyuu 2.5.1__py3-none-win_amd64.whl → 2.5.3__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 (89) hide show
  1. hikyuu/__init__.py +5 -1
  2. hikyuu/__init__.pyi +522 -505
  3. hikyuu/analysis/__init__.pyi +489 -478
  4. hikyuu/analysis/analysis.pyi +490 -479
  5. hikyuu/core.pyi +491 -480
  6. hikyuu/cpp/__init__.pyi +3 -0
  7. hikyuu/cpp/core310.pyd +0 -0
  8. hikyuu/cpp/core310.pyi +13154 -0
  9. hikyuu/cpp/core311.pyd +0 -0
  10. hikyuu/cpp/core311.pyi +13154 -0
  11. hikyuu/cpp/core312.pyd +0 -0
  12. hikyuu/cpp/core312.pyi +13154 -0
  13. hikyuu/cpp/core313.pyd +0 -0
  14. hikyuu/cpp/core313.pyi +13132 -0
  15. hikyuu/cpp/core38.pyd +0 -0
  16. hikyuu/cpp/core38.pyi +13154 -0
  17. hikyuu/cpp/core39.pyd +0 -0
  18. hikyuu/cpp/core39.pyi +13154 -0
  19. hikyuu/cpp/hikyuu.dll +0 -0
  20. hikyuu/cpp/hikyuu.lib +0 -0
  21. hikyuu/data/mysql_upgrade/0027.sql +6 -0
  22. hikyuu/data/pytdx_to_h5.py +7 -4
  23. hikyuu/data/pytdx_to_mysql.py +7 -4
  24. hikyuu/data/sqlite_upgrade/0027.sql +8 -0
  25. hikyuu/draw/drawplot/__init__.py +8 -1
  26. hikyuu/draw/drawplot/__init__.pyi +11 -7
  27. hikyuu/draw/drawplot/bokeh_draw.pyi +510 -495
  28. hikyuu/draw/drawplot/common.pyi +1 -1
  29. hikyuu/draw/drawplot/echarts_draw.pyi +512 -497
  30. hikyuu/draw/drawplot/matplotlib_draw.py +134 -12
  31. hikyuu/draw/drawplot/matplotlib_draw.pyi +571 -509
  32. hikyuu/draw/elder.pyi +11 -11
  33. hikyuu/draw/kaufman.pyi +18 -18
  34. hikyuu/draw/volume.pyi +10 -10
  35. hikyuu/extend.py +0 -24
  36. hikyuu/extend.pyi +500 -506
  37. hikyuu/hub.py +154 -9
  38. hikyuu/hub.pyi +51 -13
  39. hikyuu/include/hikyuu/DataType.h +1 -2
  40. hikyuu/include/hikyuu/StockManager.h +2 -1
  41. hikyuu/include/hikyuu/StrategyContext.h +12 -3
  42. hikyuu/include/hikyuu/indicator/Indicator.h +24 -0
  43. hikyuu/include/hikyuu/indicator/Indicator2InImp.h +1 -0
  44. hikyuu/include/hikyuu/indicator/build_in.h +2 -0
  45. hikyuu/include/hikyuu/indicator/crt/ATR.h +2 -13
  46. hikyuu/include/hikyuu/indicator/crt/KALMAN.h +30 -0
  47. hikyuu/include/hikyuu/indicator/crt/TR.h +32 -0
  48. hikyuu/include/hikyuu/indicator/imp/IAtr.h +3 -1
  49. hikyuu/include/hikyuu/indicator/imp/IKalman.h +27 -0
  50. hikyuu/include/hikyuu/indicator/imp/ITr.h +35 -0
  51. hikyuu/include/hikyuu/python/convert_any.h +299 -0
  52. hikyuu/include/hikyuu/trade_manage/PositionRecord.h +8 -2
  53. hikyuu/include/hikyuu/trade_sys/allocatefunds/crt/AF_MultiFactor.h +1 -1
  54. hikyuu/include/hikyuu/trade_sys/allocatefunds/imp/MultiFactorAllocaterFunds.h +3 -0
  55. hikyuu/include/hikyuu/trade_sys/condition/ConditionBase.h +4 -1
  56. hikyuu/include/hikyuu/trade_sys/condition/imp/{SubCondition.h → logic/SubCondition.h} +1 -1
  57. hikyuu/include/hikyuu/trade_sys/environment/EnvironmentBase.h +20 -6
  58. hikyuu/include/hikyuu/trade_sys/environment/build_in.h +1 -0
  59. hikyuu/include/hikyuu/trade_sys/environment/crt/EV_Logic.h +35 -0
  60. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/AddEnvironment.h +42 -0
  61. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/AndEnvironment.h +42 -0
  62. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/DivEnvironment.h +42 -0
  63. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/MultiEnvironment.h +42 -0
  64. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/OrEnvironment.h +42 -0
  65. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/SubEnvironment.h +42 -0
  66. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/__init__.py +1 -0
  67. hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +0 -4
  68. hikyuu/include/hikyuu/trade_sys/signal/SignalBase.h +1 -7
  69. hikyuu/include/hikyuu/trade_sys/signal/crt/SG_Logic.h +94 -4
  70. hikyuu/include/hikyuu/trade_sys/signal/crt/SG_OneSide.h +10 -0
  71. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/AndSignal.h +19 -0
  72. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorSignal.h +3 -1
  73. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorValueSignal.h +1 -0
  74. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OrSignal.h +19 -0
  75. hikyuu/include/hikyuu/version.h +4 -4
  76. hikyuu/indicator/indicator.py +1 -0
  77. hikyuu/trade_manage/__init__.pyi +506 -495
  78. hikyuu/trade_manage/broker.pyi +3 -3
  79. hikyuu/trade_manage/broker_easytrader.pyi +1 -1
  80. hikyuu/trade_manage/trade.pyi +506 -495
  81. hikyuu/trade_sys/trade_sys.py +4 -3
  82. hikyuu/util/__init__.pyi +2 -2
  83. hikyuu/util/singleton.pyi +1 -1
  84. {hikyuu-2.5.1.dist-info → hikyuu-2.5.3.dist-info}/METADATA +3 -2
  85. {hikyuu-2.5.1.dist-info → hikyuu-2.5.3.dist-info}/RECORD +89 -65
  86. {hikyuu-2.5.1.dist-info → hikyuu-2.5.3.dist-info}/top_level.txt +1 -0
  87. {hikyuu-2.5.1.dist-info → hikyuu-2.5.3.dist-info}/LICENSE +0 -0
  88. {hikyuu-2.5.1.dist-info → hikyuu-2.5.3.dist-info}/WHEEL +0 -0
  89. {hikyuu-2.5.1.dist-info → hikyuu-2.5.3.dist-info}/entry_points.txt +0 -0
hikyuu/cpp/hikyuu.dll CHANGED
Binary file
hikyuu/cpp/hikyuu.lib CHANGED
Binary file
@@ -0,0 +1,6 @@
1
+ INSERT INTO `hku_base`.`coderuletype` (`marketid`, `codepre`, `type`, `description`)
2
+ SELECT 2, '302', 8, '创业板'
3
+ WHERE NOT EXISTS (
4
+ SELECT id FROM `hku_base`.`coderuletype` WHERE `codepre`=302
5
+ );
6
+ UPDATE `hku_base`.`version` set `version` = 27;
@@ -282,10 +282,13 @@ def import_one_stock_data(connect, api, h5file, market, ktype, stock_record, sta
282
282
 
283
283
  for bar in bar_list:
284
284
  try:
285
- tmp = datetime.date(bar['year'], bar['month'], bar['day'])
286
- bar_datetime = (tmp.year * 10000 + tmp.month * 100 + tmp.day) * 10000
287
- if ktype != 'DAY':
288
- bar_datetime += bar['hour'] * 100 + bar['minute']
285
+ if ktype == "DAY":
286
+ tmp = datetime.date(bar["year"], bar["month"], bar["day"])
287
+ bar_datetime = (tmp.year * 10000 + tmp.month * 100 + tmp.day) * 10000
288
+ else:
289
+ tmp = datetime.datetime(bar["year"], bar["month"], bar["day"], bar['hour'], bar['minute'])
290
+ bar_datetime = (tmp.year * 10000 + tmp.month * 100 + tmp.day) * \
291
+ 10000 + bar["hour"] * 100 + bar["minute"]
289
292
  except Exception as e:
290
293
  hku_error("Failed translate datetime: {}, from {}! {}".format(bar, api.ip, e))
291
294
  continue
@@ -331,10 +331,13 @@ def import_one_stock_data(
331
331
 
332
332
  for bar in bar_list:
333
333
  try:
334
- tmp = datetime.date(bar["year"], bar["month"], bar["day"])
335
- bar_datetime = (tmp.year * 10000 + tmp.month * 100 + tmp.day) * 10000
336
- if ktype != "DAY":
337
- bar_datetime += bar["hour"] * 100 + bar["minute"]
334
+ if ktype == "DAY":
335
+ tmp = datetime.date(bar["year"], bar["month"], bar["day"])
336
+ bar_datetime = (tmp.year * 10000 + tmp.month * 100 + tmp.day) * 10000
337
+ else:
338
+ tmp = datetime.datetime(bar["year"], bar["month"], bar["day"], bar['hour'], bar['minute'])
339
+ bar_datetime = (tmp.year * 10000 + tmp.month * 100 + tmp.day) * \
340
+ 10000 + bar["hour"] * 100 + bar["minute"]
338
341
  except Exception as e:
339
342
  hku_error("Failed translate datetime: {}, from {}! {}".format(bar, api.ip, e))
340
343
  continue
@@ -0,0 +1,8 @@
1
+ BEGIN TRANSACTION;
2
+ INSERT INTO `CodeRuleType` (`marketid`, `codepre`, `type`, `description`)
3
+ SELECT 2, '302', 8, '创业板'
4
+ WHERE NOT EXISTS (
5
+ SELECT id FROM `CodeRuleType` WHERE `codepre`=302
6
+ );
7
+ UPDATE `version` set `version` = 27;
8
+ COMMIT;
@@ -29,7 +29,7 @@
29
29
  # 1. 20171122, Added by fasiondog
30
30
  # ===============================================================================
31
31
 
32
- from hikyuu.core import KData, Indicator, SignalBase, ConditionBase, EnvironmentBase, System, Portfolio
32
+ from hikyuu.core import KData, Indicator, SignalBase, ConditionBase, EnvironmentBase, System, Portfolio, TradeManager
33
33
 
34
34
  import matplotlib
35
35
  from matplotlib.pylab import gca as mpl_gca
@@ -49,6 +49,9 @@ from .matplotlib_draw import ax_draw_macd2 as mpl_ax_draw_macd2
49
49
  from .matplotlib_draw import ax_set_locator_formatter as mpl_ax_set_locator_formatter
50
50
  from .matplotlib_draw import adjust_axes_show as mpl_adjust_axes_show
51
51
  from .matplotlib_draw import sys_performance as mpl_sys_performance
52
+ from .matplotlib_draw import tm_heatmap as mpl_tm_heatmap
53
+ from .matplotlib_draw import sys_heatmap as mpl_sys_heatmap
54
+ from .matplotlib_draw import iheatmap as mpl_iheatmap
52
55
  from .matplotlib_draw import (DRAWNULL, STICKLINE, DRAWBAND, RGB, PLOYLINE,
53
56
  DRAWLINE, DRAWTEXT, DRAWNUMBER, DRAWTEXT_FIX, DRAWNUMBER_FIX, DRAWSL,
54
57
  DRAWIMG, DRAWICON, DRAWBMP, SHOWICONS, DRAWRECTREL)
@@ -119,6 +122,7 @@ def use_draw_with_matplotlib():
119
122
 
120
123
  Indicator.plot = mpl_iplot
121
124
  Indicator.bar = mpl_ibar
125
+ Indicator.heatmap = mpl_iheatmap
122
126
 
123
127
  SignalBase.plot = mpl_sgplot
124
128
 
@@ -128,6 +132,9 @@ def use_draw_with_matplotlib():
128
132
  System.plot = mpl_sysplot
129
133
  System.performance = mpl_sys_performance
130
134
  Portfolio.performance = mpl_sys_performance
135
+ TradeManager.heatmap = mpl_tm_heatmap
136
+ System.heatmap = mpl_sys_heatmap
137
+ Portfolio.heatmap = mpl_sys_heatmap
131
138
 
132
139
 
133
140
  def use_draw_with_echarts():
@@ -1,11 +1,12 @@
1
1
  from __future__ import annotations
2
- from hikyuu.cpp.core312 import ConditionBase
3
- from hikyuu.cpp.core312 import EnvironmentBase
4
- from hikyuu.cpp.core312 import Indicator
5
- from hikyuu.cpp.core312 import KData
6
- from hikyuu.cpp.core312 import Portfolio
7
- from hikyuu.cpp.core312 import SignalBase
8
- from hikyuu.cpp.core312 import System
2
+ from hikyuu.cpp.core38 import ConditionBase
3
+ from hikyuu.cpp.core38 import EnvironmentBase
4
+ from hikyuu.cpp.core38 import Indicator
5
+ from hikyuu.cpp.core38 import KData
6
+ from hikyuu.cpp.core38 import Portfolio
7
+ from hikyuu.cpp.core38 import SignalBase
8
+ from hikyuu.cpp.core38 import System
9
+ from hikyuu.cpp.core38 import TradeManager
9
10
  from hikyuu.draw.drawplot.bokeh_draw import ax_draw_macd as bk_ax_draw_macd
10
11
  from hikyuu.draw.drawplot.bokeh_draw import ax_draw_macd2 as bk_ax_draw_macd2
11
12
  from hikyuu.draw.drawplot.bokeh_draw import create_figure as bk_create_figure
@@ -45,13 +46,16 @@ from hikyuu.draw.drawplot.matplotlib_draw import cnplot as mpl_cnplot
45
46
  from hikyuu.draw.drawplot.matplotlib_draw import create_figure as mpl_create_figure
46
47
  from hikyuu.draw.drawplot.matplotlib_draw import evplot as mpl_evplot
47
48
  from hikyuu.draw.drawplot.matplotlib_draw import ibar as mpl_ibar
49
+ from hikyuu.draw.drawplot.matplotlib_draw import iheatmap as mpl_iheatmap
48
50
  from hikyuu.draw.drawplot.matplotlib_draw import iplot as mpl_iplot
49
51
  from hikyuu.draw.drawplot.matplotlib_draw import kplot as mpl_kplot
50
52
  from hikyuu.draw.drawplot.matplotlib_draw import mkplot as mpl_mkplot
51
53
  from hikyuu.draw.drawplot.matplotlib_draw import set_mpl_params
52
54
  from hikyuu.draw.drawplot.matplotlib_draw import sgplot as mpl_sgplot
55
+ from hikyuu.draw.drawplot.matplotlib_draw import sys_heatmap as mpl_sys_heatmap
53
56
  from hikyuu.draw.drawplot.matplotlib_draw import sys_performance as mpl_sys_performance
54
57
  from hikyuu.draw.drawplot.matplotlib_draw import sysplot as mpl_sysplot
58
+ from hikyuu.draw.drawplot.matplotlib_draw import tm_heatmap as mpl_tm_heatmap
55
59
  import matplotlib as matplotlib
56
60
  from matplotlib.pyplot import gca as mpl_gca
57
61
  from matplotlib.pyplot import gcf as mpl_gcf