hikyuu 2.6.5__py3-none-win_amd64.whl → 2.6.6__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 +6 -0
- hikyuu/__init__.pyi +548 -545
- hikyuu/analysis/__init__.pyi +519 -518
- hikyuu/analysis/analysis.pyi +520 -519
- hikyuu/core.pyi +521 -520
- hikyuu/cpp/__init__.pyi +2 -2
- hikyuu/cpp/boost_date_time-mt.dll +0 -0
- hikyuu/cpp/boost_serialization-mt.dll +0 -0
- hikyuu/cpp/boost_wserialization-mt.dll +0 -0
- hikyuu/cpp/core310.pyd +0 -0
- hikyuu/cpp/core310.pyi +35 -25
- hikyuu/cpp/core311.pyd +0 -0
- hikyuu/cpp/core311.pyi +35 -25
- hikyuu/cpp/core312.pyd +0 -0
- hikyuu/cpp/core312.pyi +35 -25
- hikyuu/cpp/core313.pyd +0 -0
- hikyuu/cpp/core313.pyi +35 -25
- hikyuu/cpp/core39.pyd +0 -0
- hikyuu/cpp/core39.pyi +35 -25
- hikyuu/cpp/hikyuu.dll +0 -0
- hikyuu/cpp/hikyuu.lib +0 -0
- hikyuu/cpp/i18n/__init__.py +0 -0
- hikyuu/cpp/i18n/zh_CN.mo +0 -0
- hikyuu/cpp/sqlite3.dll +0 -0
- hikyuu/data/clickhouse_upgrade/__init__.py +1 -0
- hikyuu/data/clickhouse_upgrade/createdb.sql +1085 -0
- hikyuu/data/common_clickhouse.py +512 -0
- hikyuu/data/em_block_to_clickhouse.py +120 -0
- hikyuu/data/hku_config_template.py +58 -3
- hikyuu/data/pytdx_finance_to_clickhouse.py +107 -0
- hikyuu/data/pytdx_to_clickhouse.py +841 -0
- hikyuu/data/pytdx_to_mysql.py +4 -4
- hikyuu/data/pytdx_weight_to_clickhouse.py +191 -0
- hikyuu/data/tdx_to_clickhouse.py +448 -0
- hikyuu/data/zh_bond10_to_clickhouse.py +49 -0
- hikyuu/draw/drawplot/__init__.pyi +9 -9
- hikyuu/draw/drawplot/bokeh_draw.pyi +537 -534
- hikyuu/draw/drawplot/common.pyi +1 -1
- hikyuu/draw/drawplot/echarts_draw.pyi +539 -536
- hikyuu/draw/drawplot/matplotlib_draw.pyi +549 -546
- hikyuu/draw/elder.pyi +11 -11
- hikyuu/draw/kaufman.pyi +18 -18
- hikyuu/draw/volume.pyi +10 -10
- hikyuu/extend.pyi +527 -526
- hikyuu/fetcher/stock/zh_stock_a_pytdx.py +9 -20
- hikyuu/fetcher/stock/zh_stock_a_qmt.py +4 -5
- hikyuu/fetcher/stock/zh_stock_a_sina_qq.py +16 -60
- hikyuu/flat/Spot.py +96 -200
- hikyuu/gui/HikyuuTDX.py +132 -3
- hikyuu/gui/data/ImportBlockInfoTask.py +11 -0
- hikyuu/gui/data/ImportHistoryFinanceTask.py +15 -1
- hikyuu/gui/data/ImportPytdxTimeToH5Task.py +11 -1
- hikyuu/gui/data/ImportPytdxToH5Task.py +13 -1
- hikyuu/gui/data/ImportPytdxTransToH5Task.py +11 -1
- hikyuu/gui/data/ImportTdxToH5Task.py +13 -1
- hikyuu/gui/data/ImportWeightToSqliteTask.py +14 -1
- hikyuu/gui/data/ImportZhBond10Task.py +11 -0
- hikyuu/gui/data/MainWindow.py +76 -12
- hikyuu/gui/data/UsePytdxImportToH5Thread.py +45 -26
- hikyuu/gui/data/UseTdxImportToH5Thread.py +19 -1
- hikyuu/gui/dataserver.py +12 -4
- hikyuu/gui/spot_server.py +30 -40
- hikyuu/gui/start_qmt.py +20 -3
- hikyuu/hub.pyi +6 -6
- hikyuu/include/hikyuu/DataType.h +11 -0
- hikyuu/include/hikyuu/StockManager.h +8 -0
- hikyuu/include/hikyuu/data_driver/kdata/mysql/KRecordTable.h +1 -0
- hikyuu/include/hikyuu/global/GlobalSpotAgent.h +1 -1
- hikyuu/include/hikyuu/global/SpotRecord.h +15 -31
- hikyuu/include/hikyuu/global/agent/spot_generated.h +48 -232
- hikyuu/include/hikyuu/global/schedule/scheduler.h +1 -1
- hikyuu/include/hikyuu/plugin/KDataToHdf5Importer.h +3 -0
- hikyuu/include/hikyuu/plugin/dataserver.h +26 -1
- hikyuu/include/hikyuu/plugin/device.h +2 -1
- hikyuu/include/hikyuu/plugin/interface/DataDriverPluginInterface.h +27 -0
- hikyuu/include/hikyuu/plugin/interface/DataServerPluginInterface.h +2 -1
- hikyuu/include/hikyuu/plugin/interface/DevicePluginInterface.h +1 -1
- hikyuu/include/hikyuu/plugin/interface/ImportKDataToHdf5PluginInterface.h +3 -0
- hikyuu/include/hikyuu/plugin/interface/plugins.h +2 -0
- hikyuu/include/hikyuu/strategy/Strategy.h +0 -9
- hikyuu/include/hikyuu/utilities/config.h +1 -1
- hikyuu/include/hikyuu/utilities/mo/mo.h +30 -14
- hikyuu/include/hikyuu/utilities/os.h +6 -0
- hikyuu/include/hikyuu/version.h +4 -4
- 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/import2hdf5.dll +0 -0
- hikyuu/plugin/tmreport.dll +0 -0
- hikyuu/trade_manage/__init__.pyi +537 -534
- hikyuu/trade_manage/broker.pyi +3 -3
- hikyuu/trade_manage/broker_easytrader.pyi +1 -1
- hikyuu/trade_manage/trade.pyi +537 -534
- hikyuu/util/__init__.py +1 -0
- hikyuu/util/__init__.pyi +4 -3
- hikyuu/util/check.py +8 -0
- hikyuu/util/check.pyi +5 -1
- hikyuu/util/singleton.pyi +1 -1
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.6.dist-info}/METADATA +2 -2
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.6.dist-info}/RECORD +106 -95
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.6.dist-info}/top_level.txt +2 -2
- hikyuu/include/hikyuu/global/agent/hikyuu/__init__.py +0 -1
- hikyuu/include/hikyuu/global/agent/hikyuu/flat/__init__.py +0 -1
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.6.dist-info}/LICENSE +0 -0
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.6.dist-info}/WHEEL +0 -0
- {hikyuu-2.6.5.dist-info → hikyuu-2.6.6.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/python
|
|
2
|
+
# -*- coding: utf8 -*-
|
|
3
|
+
#
|
|
4
|
+
# Create on: 2024-03-01
|
|
5
|
+
# Author: fasiondog
|
|
6
|
+
|
|
7
|
+
import datetime
|
|
8
|
+
from hikyuu.data.common import get_china_bond10_rate
|
|
9
|
+
from hikyuu.util import *
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@hku_catch(trace=True)
|
|
13
|
+
def import_zh_bond10_to_clickhouse(connect):
|
|
14
|
+
sql = "select max(date) from hku_base.zh_bond10"
|
|
15
|
+
start_date = connect.command(sql)
|
|
16
|
+
if type(start_date) == int:
|
|
17
|
+
start_date = "19901219"
|
|
18
|
+
else:
|
|
19
|
+
last_date = start_date
|
|
20
|
+
year = last_date // 10000
|
|
21
|
+
month = last_date // 100 - year * 100
|
|
22
|
+
day = last_date - year * 10000 - month * 100
|
|
23
|
+
start_date = (datetime.date(year, month, day) + datetime.timedelta(1)).strftime('%Y%m%d')
|
|
24
|
+
rates = get_china_bond10_rate(start_date)
|
|
25
|
+
if rates:
|
|
26
|
+
ic = connect.create_insert_context(table='zh_bond10', database='hku_base',
|
|
27
|
+
column_names=['date', 'value'],
|
|
28
|
+
data=rates)
|
|
29
|
+
connect.insert(context=ic)
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
if __name__ == "__main__":
|
|
33
|
+
import os
|
|
34
|
+
from configparser import ConfigParser
|
|
35
|
+
dev_config = ConfigParser()
|
|
36
|
+
dev_config.read(os.path.expanduser("~") + '/workspace/dev.ini')
|
|
37
|
+
db = 'clickhouse54-http'
|
|
38
|
+
user = dev_config.get(db, 'user')
|
|
39
|
+
password = dev_config.get(db, 'pwd')
|
|
40
|
+
host = dev_config.get(db, 'host')
|
|
41
|
+
port = dev_config.getint(db, 'port')
|
|
42
|
+
|
|
43
|
+
import clickhouse_connect
|
|
44
|
+
client = clickhouse_connect.get_client(
|
|
45
|
+
host=host, username=user, password=password)
|
|
46
|
+
|
|
47
|
+
import_zh_bond10_to_clickhouse(client)
|
|
48
|
+
|
|
49
|
+
client.close()
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
|
-
from hikyuu.cpp.
|
|
3
|
-
from hikyuu.cpp.
|
|
4
|
-
from hikyuu.cpp.
|
|
5
|
-
from hikyuu.cpp.
|
|
6
|
-
from hikyuu.cpp.
|
|
7
|
-
from hikyuu.cpp.
|
|
8
|
-
from hikyuu.cpp.
|
|
9
|
-
from hikyuu.cpp.
|
|
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
|
|
9
|
+
from hikyuu.cpp.core312 import TradeManager
|
|
10
10
|
from hikyuu.draw.drawplot.bokeh_draw import ax_draw_macd as bk_ax_draw_macd
|
|
11
11
|
from hikyuu.draw.drawplot.bokeh_draw import ax_draw_macd2 as bk_ax_draw_macd2
|
|
12
12
|
from hikyuu.draw.drawplot.bokeh_draw import create_figure as bk_create_figure
|
|
@@ -25,8 +25,8 @@ from hikyuu.draw.drawplot.echarts_draw import sys_performance as ec_sys_performa
|
|
|
25
25
|
from hikyuu.draw.drawplot.echarts_draw import sysplot as ec_sysplot
|
|
26
26
|
from hikyuu.draw.drawplot.matplotlib_draw import DRAWBAND
|
|
27
27
|
from hikyuu.draw.drawplot.matplotlib_draw import DRAWICON
|
|
28
|
-
from hikyuu.draw.drawplot.matplotlib_draw import DRAWIMG as DRAWBMP
|
|
29
28
|
from hikyuu.draw.drawplot.matplotlib_draw import DRAWIMG
|
|
29
|
+
from hikyuu.draw.drawplot.matplotlib_draw import DRAWIMG as DRAWBMP
|
|
30
30
|
from hikyuu.draw.drawplot.matplotlib_draw import DRAWLINE
|
|
31
31
|
from hikyuu.draw.drawplot.matplotlib_draw import DRAWNUMBER
|
|
32
32
|
from hikyuu.draw.drawplot.matplotlib_draw import DRAWNUMBER_FIX
|