hikyuu 2.6.6__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.
- hikyuu/__init__.py +16 -2
- hikyuu/__init__.pyi +658 -627
- hikyuu/analysis/__init__.pyi +563 -519
- hikyuu/analysis/analysis.pyi +583 -541
- hikyuu/core.pyi +565 -521
- hikyuu/cpp/__init__.pyi +2 -2
- hikyuu/cpp/concrt140.dll +0 -0
- hikyuu/cpp/core310.pyd +0 -0
- hikyuu/cpp/core310.pyi +1424 -865
- hikyuu/cpp/core311.pyd +0 -0
- hikyuu/cpp/core311.pyi +1424 -865
- hikyuu/cpp/core312.pyd +0 -0
- hikyuu/cpp/core312.pyi +1424 -865
- hikyuu/cpp/core313.pyd +0 -0
- hikyuu/cpp/core313.pyi +1424 -863
- hikyuu/cpp/core39.pyd +0 -0
- hikyuu/cpp/core39.pyi +1424 -865
- hikyuu/cpp/hikyuu.dll +0 -0
- hikyuu/cpp/hikyuu.lib +0 -0
- hikyuu/cpp/hku_hdf5.dll +0 -0
- hikyuu/cpp/hku_hdf5_cpp.dll +0 -0
- hikyuu/cpp/hku_hdf5_hl.dll +0 -0
- hikyuu/cpp/hku_hdf5_hl_cpp.dll +0 -0
- hikyuu/cpp/i18n/zh_CN/__init__.py +0 -0
- hikyuu/cpp/i18n/zh_CN/hikyuu.mo +0 -0
- hikyuu/cpp/msvcp140.dll +0 -0
- hikyuu/cpp/msvcp140_1.dll +0 -0
- hikyuu/cpp/msvcp140_2.dll +0 -0
- hikyuu/cpp/msvcp140_atomic_wait.dll +0 -0
- hikyuu/cpp/msvcp140_codecvt_ids.dll +0 -0
- hikyuu/cpp/sqlite3.dll +0 -0
- hikyuu/cpp/vcruntime140.dll +0 -0
- hikyuu/cpp/vcruntime140_1.dll +0 -0
- hikyuu/data/common_clickhouse.py +0 -47
- hikyuu/data/tdx_to_h5.py +1 -1
- hikyuu/draw/drawplot/__init__.pyi +32 -37
- hikyuu/draw/drawplot/bokeh_draw.pyi +651 -632
- hikyuu/draw/drawplot/common.pyi +3 -4
- hikyuu/draw/drawplot/echarts_draw.py +9 -8
- hikyuu/draw/drawplot/echarts_draw.pyi +598 -567
- hikyuu/draw/drawplot/matplotlib_draw.py +3 -3
- hikyuu/draw/drawplot/matplotlib_draw.pyi +872 -874
- hikyuu/draw/elder.pyi +19 -20
- hikyuu/draw/kaufman.py +1 -1
- hikyuu/draw/kaufman.pyi +18 -18
- hikyuu/draw/volume.pyi +10 -10
- hikyuu/examples/notebook/000-Index.ipynb +1 -1
- hikyuu/examples/notebook/001-overview.ipynb +78 -63
- hikyuu/examples/notebook/002-HowToGetStock.ipynb +259 -40
- hikyuu/examples/notebook/003-HowToGetKDataAndDraw.ipynb +49 -41
- hikyuu/examples/notebook/004-IndicatorOverview.ipynb +29 -29
- hikyuu/examples/notebook/005-Drawplot.ipynb +66 -37
- hikyuu/examples/notebook/006-TradeManager.ipynb +808 -61
- hikyuu/examples/notebook/007-SystemDetails.ipynb +23 -23
- hikyuu/examples/notebook/009-RealData.ipynb +3 -3
- hikyuu/examples/notebook/010-Portfolio.ipynb +761 -122
- hikyuu/extend.py +32 -98
- hikyuu/extend.pyi +597 -593
- hikyuu/gui/HikyuuTDX.py +2 -4
- hikyuu/gui/data/MainWindow.py +185 -174
- hikyuu/hub.pyi +69 -67
- hikyuu/include/hikyuu/DataType.h +3 -12
- hikyuu/include/hikyuu/KData.h +83 -25
- hikyuu/include/hikyuu/KDataImp.h +31 -46
- hikyuu/include/hikyuu/KDataPrivatedBufferImp.h +73 -0
- hikyuu/include/hikyuu/KDataSharedBufferImp.h +69 -0
- hikyuu/include/hikyuu/KQuery.h +38 -32
- hikyuu/include/hikyuu/KRecord.h +4 -1
- hikyuu/include/hikyuu/MarketInfo.h +1 -1
- hikyuu/include/hikyuu/Stock.h +24 -6
- hikyuu/include/hikyuu/StockManager.h +15 -6
- hikyuu/include/hikyuu/StockTypeInfo.h +6 -0
- hikyuu/include/hikyuu/TransRecord.h +2 -8
- hikyuu/include/hikyuu/data_driver/KDataDriver.h +5 -0
- hikyuu/include/hikyuu/doc.h +4 -0
- hikyuu/include/hikyuu/global/GlobalSpotAgent.h +8 -0
- hikyuu/include/hikyuu/global/agent/SpotAgent.h +12 -7
- hikyuu/include/hikyuu/indicator/Indicator.h +48 -0
- hikyuu/include/hikyuu/indicator/Indicator2InImp.h +9 -0
- hikyuu/include/hikyuu/indicator/IndicatorImp.h +83 -15
- hikyuu/include/hikyuu/indicator/build_in.h +1 -0
- hikyuu/include/hikyuu/indicator/crt/AMA.h +2 -1
- hikyuu/include/hikyuu/indicator/crt/ATR.h +1 -1
- hikyuu/include/hikyuu/indicator/crt/CONTEXT.h +2 -0
- hikyuu/include/hikyuu/indicator/crt/CYCLE.h +3 -0
- hikyuu/include/hikyuu/indicator/crt/DMA.h +1 -1
- hikyuu/include/hikyuu/indicator/crt/IC.h +14 -6
- hikyuu/include/hikyuu/indicator/crt/ICIR.h +8 -4
- hikyuu/include/hikyuu/indicator/crt/INSUM.h +2 -0
- hikyuu/include/hikyuu/indicator/crt/PRICELIST.h +2 -0
- hikyuu/include/hikyuu/indicator/crt/REFX.h +25 -0
- hikyuu/include/hikyuu/indicator/crt/SLICE.h +4 -4
- hikyuu/include/hikyuu/indicator/crt/SPEARMAN.h +3 -2
- hikyuu/include/hikyuu/indicator/imp/IContext.h +5 -0
- hikyuu/include/hikyuu/indicator/imp/ICval.h +6 -0
- hikyuu/include/hikyuu/indicator/imp/IDropna.h +9 -0
- hikyuu/include/hikyuu/indicator/imp/IIc.h +2 -1
- hikyuu/include/hikyuu/indicator/imp/IPriceList.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IRefX.h +23 -0
- hikyuu/include/hikyuu/lang.h +27 -0
- hikyuu/include/hikyuu/plugin/KDataToHdf5Importer.h +6 -1
- hikyuu/include/hikyuu/plugin/backtest.h +2 -0
- hikyuu/include/hikyuu/plugin/extind.h +45 -0
- hikyuu/include/hikyuu/plugin/hkuextra.h +77 -0
- hikyuu/include/hikyuu/plugin/interface/HkuExtraPluginInterface.h +54 -0
- hikyuu/include/hikyuu/plugin/interface/ImportKDataToHdf5PluginInterface.h +10 -1
- hikyuu/include/hikyuu/plugin/interface/TMReportPluginInterface.h +1 -0
- hikyuu/include/hikyuu/plugin/interface/plugins.h +2 -0
- hikyuu/include/hikyuu/python/pybind_utils.h +28 -11
- hikyuu/include/hikyuu/trade_manage/Performance.h +0 -1
- hikyuu/include/hikyuu/trade_manage/TradeCostBase.h +5 -0
- hikyuu/include/hikyuu/trade_manage/TradeManager.h +4 -0
- hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +10 -1
- hikyuu/include/hikyuu/trade_manage/TradeRecord.h +1 -1
- hikyuu/include/hikyuu/trade_sys/allocatefunds/AllocateFundsBase.h +5 -0
- hikyuu/include/hikyuu/trade_sys/condition/ConditionBase.h +5 -0
- hikyuu/include/hikyuu/trade_sys/environment/EnvironmentBase.h +5 -0
- hikyuu/include/hikyuu/trade_sys/moneymanager/MoneyManagerBase.h +5 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/MultiFactorBase.h +6 -3
- hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +4 -0
- hikyuu/include/hikyuu/trade_sys/profitgoal/ProfitGoalBase.h +5 -0
- hikyuu/include/hikyuu/trade_sys/selector/SelectorBase.h +5 -2
- hikyuu/include/hikyuu/trade_sys/signal/SignalBase.h +5 -0
- hikyuu/include/hikyuu/trade_sys/slippage/SlippageBase.h +5 -0
- hikyuu/include/hikyuu/trade_sys/stoploss/StoplossBase.h +6 -1
- hikyuu/include/hikyuu/trade_sys/system/System.h +5 -0
- hikyuu/include/hikyuu/utilities/config.h +0 -2
- hikyuu/include/hikyuu/utilities/datetime/Datetime.h +2 -2
- hikyuu/include/hikyuu/utilities/os.h +7 -0
- hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +2 -1
- hikyuu/include/hikyuu/utilities/thread/GlobalMQStealThreadPool.h +1 -1
- hikyuu/include/hikyuu/utilities/thread/GlobalMQThreadPool.h +1 -1
- hikyuu/include/hikyuu/utilities/thread/GlobalThreadPool.h +1 -1
- hikyuu/include/hikyuu/utilities/thread/MQThreadPool.h +1 -1
- hikyuu/include/hikyuu/version.h +4 -4
- hikyuu/include/hikyuu/views/arrow_common.h +38 -0
- hikyuu/include/hikyuu/views/arrow_views.h +117 -0
- hikyuu/indicator/__init__.py +0 -1
- hikyuu/indicator/indicator.py +17 -57
- hikyuu/plugin/backtest.dll +0 -0
- hikyuu/plugin/clickhousedriver.dll +0 -0
- hikyuu/plugin/dataserver.dll +0 -0
- hikyuu/plugin/device.dll +0 -0
- hikyuu/plugin/extind.dll +0 -0
- hikyuu/plugin/hkuextra.dll +0 -0
- hikyuu/plugin/import2hdf5.dll +0 -0
- hikyuu/plugin/tmreport.dll +0 -0
- hikyuu/strategy/strategy_demo1.py +1 -1
- hikyuu/test/test_init.py +73 -14
- hikyuu/test/test_real_tdx_import.py +336 -0
- hikyuu/test/test_tdx_import.py +315 -0
- hikyuu/test/test_tdx_real_data_import.py +281 -0
- hikyuu/trade_manage/__init__.pyi +583 -553
- hikyuu/trade_manage/broker.pyi +19 -18
- hikyuu/trade_manage/broker_easytrader.pyi +6 -4
- hikyuu/trade_manage/broker_mail.pyi +22 -24
- hikyuu/trade_manage/trade.py +10 -65
- hikyuu/trade_manage/trade.pyi +583 -565
- hikyuu/trade_sys/__init__.py +15 -0
- hikyuu/util/__init__.pyi +0 -1
- hikyuu/util/check.pyi +17 -15
- hikyuu/util/mylog.pyi +8 -7
- hikyuu/util/notebook.pyi +9 -11
- hikyuu/util/singleton.pyi +8 -6
- {hikyuu-2.6.6.dist-info → hikyuu-2.6.8.dist-info}/METADATA +8 -4
- {hikyuu-2.6.6.dist-info → hikyuu-2.6.8.dist-info}/RECORD +172 -160
- {hikyuu-2.6.6.dist-info → hikyuu-2.6.8.dist-info}/top_level.txt +2 -1
- hikyuu/cpp/i18n/zh_CN.mo +0 -0
- hikyuu/include/hikyuu/utilities/mo/mo.h +0 -64
- hikyuu/indicator/talib_wrap.py +0 -1273
- /hikyuu/include/hikyuu/utilities/{mo/moFileReader.h → moFileReader.h} +0 -0
- /hikyuu/include/hikyuu/{utilities/mo → views}/__init__.py +0 -0
- {hikyuu-2.6.6.dist-info → hikyuu-2.6.8.dist-info}/LICENSE +0 -0
- {hikyuu-2.6.6.dist-info → hikyuu-2.6.8.dist-info}/WHEEL +0 -0
- {hikyuu-2.6.6.dist-info → hikyuu-2.6.8.dist-info}/entry_points.txt +0 -0
hikyuu/draw/drawplot/common.pyi
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
|
-
from hikyuu.cpp.
|
|
2
|
+
from hikyuu.cpp.core313 import Query
|
|
3
3
|
__all__ = ['Query', 'get_draw_title']
|
|
4
4
|
def get_draw_title(kdata):
|
|
5
5
|
"""
|
|
6
6
|
根据typ值,返回相应的标题,如 上证指数(日线)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
参数:kdata: KData实例
|
|
8
|
+
返回:一个包含stock名称的字符串,可用作绘图时的标题
|
|
10
9
|
"""
|
|
@@ -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
|
|
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
|
-
|
|
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)]
|
|
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" % (
|
|
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)
|
|
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
|
|
584
|
+
tchart.add(t1, y=5)
|
|
584
585
|
tchart.add(t2)
|
|
585
586
|
tchart.add(t3)
|
|
586
587
|
page.add(tchart)
|