hikyuu 2.6.6__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 (105) hide show
  1. hikyuu/__init__.py +10 -0
  2. hikyuu/__init__.pyi +567 -560
  3. hikyuu/analysis/__init__.pyi +539 -519
  4. hikyuu/analysis/analysis.pyi +540 -520
  5. hikyuu/core.pyi +541 -521
  6. hikyuu/cpp/__init__.pyi +2 -2
  7. hikyuu/cpp/core310.pyd +0 -0
  8. hikyuu/cpp/core310.pyi +1041 -859
  9. hikyuu/cpp/core311.pyd +0 -0
  10. hikyuu/cpp/core311.pyi +1041 -859
  11. hikyuu/cpp/core312.pyd +0 -0
  12. hikyuu/cpp/core312.pyi +1041 -859
  13. hikyuu/cpp/core313.pyd +0 -0
  14. hikyuu/cpp/core313.pyi +1041 -857
  15. hikyuu/cpp/core39.pyd +0 -0
  16. hikyuu/cpp/core39.pyi +1041 -859
  17. hikyuu/cpp/hikyuu.dll +0 -0
  18. hikyuu/cpp/hikyuu.lib +0 -0
  19. hikyuu/cpp/i18n/zh_CN/__init__.py +0 -0
  20. hikyuu/cpp/i18n/zh_CN/hikyuu.mo +0 -0
  21. hikyuu/cpp/sqlite3.dll +0 -0
  22. hikyuu/data/common_clickhouse.py +0 -47
  23. hikyuu/data/tdx_to_h5.py +1 -1
  24. hikyuu/draw/__init__.pyi +1 -1
  25. hikyuu/draw/drawplot/__init__.pyi +9 -9
  26. hikyuu/draw/drawplot/bokeh_draw.pyi +556 -551
  27. hikyuu/draw/drawplot/common.pyi +1 -1
  28. hikyuu/draw/drawplot/echarts_draw.py +9 -8
  29. hikyuu/draw/drawplot/echarts_draw.pyi +558 -553
  30. hikyuu/draw/drawplot/matplotlib_draw.py +3 -3
  31. hikyuu/draw/drawplot/matplotlib_draw.pyi +568 -563
  32. hikyuu/draw/elder.pyi +11 -11
  33. hikyuu/draw/kaufman.py +1 -1
  34. hikyuu/draw/kaufman.pyi +18 -18
  35. hikyuu/draw/volume.pyi +10 -10
  36. hikyuu/examples/notebook/000-Index.ipynb +1 -1
  37. hikyuu/examples/notebook/001-overview.ipynb +78 -63
  38. hikyuu/examples/notebook/002-HowToGetStock.ipynb +259 -40
  39. hikyuu/examples/notebook/003-HowToGetKDataAndDraw.ipynb +49 -41
  40. hikyuu/examples/notebook/004-IndicatorOverview.ipynb +29 -29
  41. hikyuu/examples/notebook/005-Drawplot.ipynb +66 -37
  42. hikyuu/examples/notebook/006-TradeManager.ipynb +808 -61
  43. hikyuu/examples/notebook/007-SystemDetails.ipynb +23 -23
  44. hikyuu/examples/notebook/009-RealData.ipynb +3 -3
  45. hikyuu/examples/notebook/010-Portfolio.ipynb +761 -122
  46. hikyuu/extend.py +15 -100
  47. hikyuu/extend.pyi +551 -567
  48. hikyuu/gui/HikyuuTDX.py +2 -4
  49. hikyuu/gui/data/MainWindow.py +185 -174
  50. hikyuu/hub.pyi +6 -6
  51. hikyuu/include/hikyuu/DataType.h +1 -10
  52. hikyuu/include/hikyuu/KQuery.h +22 -28
  53. hikyuu/include/hikyuu/MarketInfo.h +1 -1
  54. hikyuu/include/hikyuu/Stock.h +15 -3
  55. hikyuu/include/hikyuu/StockManager.h +4 -3
  56. hikyuu/include/hikyuu/StockTypeInfo.h +6 -0
  57. hikyuu/include/hikyuu/TransRecord.h +2 -8
  58. hikyuu/include/hikyuu/doc.h +4 -0
  59. hikyuu/include/hikyuu/indicator/Indicator.h +37 -0
  60. hikyuu/include/hikyuu/lang.h +27 -0
  61. hikyuu/include/hikyuu/plugin/KDataToHdf5Importer.h +6 -1
  62. hikyuu/include/hikyuu/plugin/hkuextra.h +56 -0
  63. hikyuu/include/hikyuu/plugin/interface/HkuExtraPluginInterface.h +38 -0
  64. hikyuu/include/hikyuu/plugin/interface/ImportKDataToHdf5PluginInterface.h +10 -1
  65. hikyuu/include/hikyuu/plugin/interface/plugins.h +2 -0
  66. hikyuu/include/hikyuu/python/pybind_utils.h +9 -0
  67. hikyuu/include/hikyuu/trade_manage/TradeRecord.h +1 -1
  68. hikyuu/include/hikyuu/utilities/config.h +0 -2
  69. hikyuu/include/hikyuu/utilities/os.h +3 -0
  70. hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +2 -1
  71. hikyuu/include/hikyuu/version.h +4 -4
  72. hikyuu/include/hikyuu/view/MarketView.h +59 -0
  73. hikyuu/indicator/__init__.py +0 -1
  74. hikyuu/indicator/indicator.py +14 -53
  75. hikyuu/plugin/backtest.dll +0 -0
  76. hikyuu/plugin/clickhousedriver.dll +0 -0
  77. hikyuu/plugin/dataserver.dll +0 -0
  78. hikyuu/plugin/device.dll +0 -0
  79. hikyuu/plugin/extind.dll +0 -0
  80. hikyuu/plugin/hkuextra.dll +0 -0
  81. hikyuu/plugin/import2hdf5.dll +0 -0
  82. hikyuu/plugin/tmreport.dll +0 -0
  83. hikyuu/test/test_init.py +59 -0
  84. hikyuu/test/test_real_tdx_import.py +336 -0
  85. hikyuu/test/test_tdx_import.py +315 -0
  86. hikyuu/test/test_tdx_real_data_import.py +281 -0
  87. hikyuu/trade_manage/__init__.pyi +556 -551
  88. hikyuu/trade_manage/broker.pyi +3 -3
  89. hikyuu/trade_manage/broker_easytrader.pyi +1 -1
  90. hikyuu/trade_manage/trade.py +4 -65
  91. hikyuu/trade_manage/trade.pyi +556 -563
  92. hikyuu/trade_sys/__init__.py +11 -0
  93. hikyuu/util/__init__.pyi +0 -1
  94. hikyuu/util/singleton.pyi +1 -1
  95. {hikyuu-2.6.6.dist-info → hikyuu-2.6.7.dist-info}/METADATA +6 -4
  96. {hikyuu-2.6.6.dist-info → hikyuu-2.6.7.dist-info}/RECORD +102 -95
  97. {hikyuu-2.6.6.dist-info → hikyuu-2.6.7.dist-info}/top_level.txt +2 -1
  98. hikyuu/cpp/i18n/zh_CN.mo +0 -0
  99. hikyuu/include/hikyuu/utilities/mo/mo.h +0 -64
  100. hikyuu/indicator/talib_wrap.py +0 -1273
  101. /hikyuu/include/hikyuu/utilities/{mo/moFileReader.h → moFileReader.h} +0 -0
  102. /hikyuu/include/hikyuu/{utilities/mo → view}/__init__.py +0 -0
  103. {hikyuu-2.6.6.dist-info → hikyuu-2.6.7.dist-info}/LICENSE +0 -0
  104. {hikyuu-2.6.6.dist-info → hikyuu-2.6.7.dist-info}/WHEEL +0 -0
  105. {hikyuu-2.6.6.dist-info → hikyuu-2.6.7.dist-info}/entry_points.txt +0 -0
@@ -1,5 +1,5 @@
1
1
  from __future__ import annotations
2
- from hikyuu.cpp.core312 import Query
2
+ from hikyuu.cpp.core39 import Query
3
3
  __all__ = ['Query', 'get_draw_title']
4
4
  def get_draw_title(kdata):
5
5
  """
@@ -23,7 +23,7 @@ class MultiLineTextChart(ChartBase):
23
23
  if y is not None:
24
24
  self._last_y = y
25
25
 
26
- def add(self, text: str, x = None, y = None, text_style = None):
26
+ def add(self, text: str, x=None, y=None, text_style=None):
27
27
  """
28
28
  添加多行文本
29
29
 
@@ -60,7 +60,7 @@ class MultiLineTextChart(ChartBase):
60
60
  font=text_style.get("fontFamily", "sans-serif"),
61
61
  font_size=text_style.get("font_size", 14),
62
62
  graphic_basicstyle_opts=opts.GraphicBasicStyleOpts(
63
- fill=text_style.get("color", "#000"))
63
+ fill=text_style.get("color", "#000"))
64
64
  )
65
65
  )
66
66
  )
@@ -69,7 +69,6 @@ class MultiLineTextChart(ChartBase):
69
69
 
70
70
  self.options.update(graphic=graphic_elements)
71
71
 
72
-
73
72
  def _split_text(self, text: str, width: int, font_size: int):
74
73
  """
75
74
  根据宽度和字体大小分割文本为多行
@@ -103,7 +102,8 @@ grid_pos = [
103
102
 
104
103
 
105
104
  def _get_js_data_var(kdata):
106
- datas = [[round(r.open, 2), round(r.close, 2), round(r.low, 2), round(r.high, 2), round(r.volume, 2)] for r in kdata]
105
+ datas = [[round(r.open, 2), round(r.close, 2), round(r.low, 2), round(r.high, 2), round(r.volume, 2)]
106
+ for r in kdata]
107
107
  return datas
108
108
 
109
109
 
@@ -152,7 +152,7 @@ def get_series_name(kdata):
152
152
  return stitle
153
153
 
154
154
 
155
- def simple_datetime_list(datetimes: list, ktype:str=None):
155
+ def simple_datetime_list(datetimes: list, ktype: str = None):
156
156
  if ktype is None:
157
157
  return [
158
158
  sd.split(' ')[0] if sd.endswith('00:00:00') else
@@ -335,7 +335,8 @@ def iplot(indicator, kref: KData = None, chart=None, ilongname=False):
335
335
  return chart.overlap(line)
336
336
  else:
337
337
  line.set_global_opts(
338
- title_opts=opts.TitleOpts(title="%s %.2f" % (indicator.long_name if ilongname else indicator.name, indicator[-1])),
338
+ title_opts=opts.TitleOpts(title="%s %.2f" % (
339
+ indicator.long_name if ilongname else indicator.name, indicator[-1])),
339
340
  yaxis_opts=opts.AxisOpts(
340
341
  is_scale=True,
341
342
  splitarea_opts=opts.SplitAreaOpts(
@@ -546,7 +547,7 @@ def sys_performance(sys, ref_stk=None):
546
547
  text = per.report(sys.tm, sh000001_k[-1].datetime)
547
548
 
548
549
  # 计算最大回撤
549
- max_pullback = min(MDD(funds).to_np())
550
+ max_pullback = min(MDD(funds))
550
551
 
551
552
  # 计算 sharp
552
553
  bond = ZHBOND10(ref_dates)
@@ -580,7 +581,7 @@ def sys_performance(sys, ref_stk=None):
580
581
  page.add(line)
581
582
 
582
583
  tchart = MultiLineTextChart(opts.InitOpts(height='65px'))
583
- tchart.add(t1, y = 5)
584
+ tchart.add(t1, y=5)
584
585
  tchart.add(t2)
585
586
  tchart.add(t3)
586
587
  page.add(tchart)