hikyuu 2.5.5__py3-none-win_amd64.whl → 2.5.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__.pyi +515 -516
- hikyuu/analysis/__init__.pyi +490 -490
- hikyuu/analysis/analysis.pyi +490 -490
- hikyuu/core.pyi +491 -491
- hikyuu/cpp/__init__.pyi +2 -2
- hikyuu/cpp/core310.pyd +0 -0
- hikyuu/cpp/core310.pyi +3 -2
- hikyuu/cpp/core311.pyd +0 -0
- hikyuu/cpp/core311.pyi +3 -2
- hikyuu/cpp/core312.pyd +0 -0
- hikyuu/cpp/core312.pyi +3 -2
- hikyuu/cpp/core313.pyd +0 -0
- hikyuu/cpp/core313.pyi +3 -2
- hikyuu/cpp/core38.pyd +0 -0
- hikyuu/cpp/core38.pyi +3 -2
- hikyuu/cpp/core39.pyd +0 -0
- hikyuu/cpp/core39.pyi +3 -2
- hikyuu/cpp/hikyuu.dll +0 -0
- hikyuu/cpp/hikyuu.lib +0 -0
- hikyuu/cpp/sqlite3.dll +0 -0
- hikyuu/data/tdx_to_mysql.py +15 -15
- hikyuu/draw/drawplot/__init__.pyi +8 -8
- hikyuu/draw/drawplot/bokeh_draw.pyi +505 -506
- hikyuu/draw/drawplot/common.pyi +1 -1
- hikyuu/draw/drawplot/echarts_draw.pyi +507 -508
- hikyuu/draw/drawplot/matplotlib_draw.pyi +516 -517
- hikyuu/draw/elder.pyi +11 -11
- hikyuu/draw/kaufman.pyi +18 -18
- hikyuu/draw/volume.pyi +10 -10
- hikyuu/extend.pyi +500 -501
- hikyuu/gui/data/UseTdxImportToH5Thread.py +2 -2
- hikyuu/hub.py +7 -13
- hikyuu/hub.pyi +9 -6
- hikyuu/include/hikyuu/utilities/config.h +1 -1
- hikyuu/include/hikyuu/utilities/datetime/Datetime.h +3 -3
- hikyuu/include/hikyuu/utilities/datetime/TimeDelta.h +8 -0
- hikyuu/include/hikyuu/utilities/plugin/PluginBase.h +47 -0
- hikyuu/include/hikyuu/utilities/plugin/PluginClient.h +55 -0
- hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +64 -0
- hikyuu/include/hikyuu/utilities/plugin/__init__.py +1 -0
- hikyuu/include/hikyuu/utilities/thread/MQStealThreadPool.h +1 -1
- hikyuu/include/hikyuu/utilities/thread/MQThreadPool.h +1 -1
- hikyuu/include/hikyuu/utilities/thread/StealThreadPool.h +1 -1
- hikyuu/include/hikyuu/utilities/thread/ThreadPool.h +1 -1
- hikyuu/include/hikyuu/version.h +4 -4
- hikyuu/indicator/indicator.py +1 -1
- hikyuu/trade_manage/__init__.pyi +505 -506
- hikyuu/trade_manage/broker.pyi +3 -3
- hikyuu/trade_manage/broker_easytrader.pyi +1 -1
- hikyuu/trade_manage/trade.pyi +505 -506
- hikyuu/util/__init__.pyi +1 -1
- hikyuu/util/singleton.pyi +1 -1
- {hikyuu-2.5.5.dist-info → hikyuu-2.5.6.dist-info}/METADATA +1 -1
- {hikyuu-2.5.5.dist-info → hikyuu-2.5.6.dist-info}/RECORD +58 -54
- {hikyuu-2.5.5.dist-info → hikyuu-2.5.6.dist-info}/top_level.txt +1 -0
- {hikyuu-2.5.5.dist-info → hikyuu-2.5.6.dist-info}/LICENSE +0 -0
- {hikyuu-2.5.5.dist-info → hikyuu-2.5.6.dist-info}/WHEEL +0 -0
- {hikyuu-2.5.5.dist-info → hikyuu-2.5.6.dist-info}/entry_points.txt +0 -0
hikyuu/cpp/__init__.pyi
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
|
-
from . import
|
|
3
|
-
__all__ = ['
|
|
2
|
+
from . import core312
|
|
3
|
+
__all__ = ['core312']
|
hikyuu/cpp/core310.pyd
CHANGED
|
Binary file
|
hikyuu/cpp/core310.pyi
CHANGED
|
@@ -1373,13 +1373,14 @@ class EnvironmentBase:
|
|
|
1373
1373
|
...
|
|
1374
1374
|
def __truediv__(self, arg0: EnvironmentBase) -> EnvironmentBase:
|
|
1375
1375
|
...
|
|
1376
|
-
def _add_valid(self,
|
|
1376
|
+
def _add_valid(self, datetime: Datetime, value: float = 1.0) -> None:
|
|
1377
1377
|
"""
|
|
1378
1378
|
_add_valid(self, datetime)
|
|
1379
1379
|
|
|
1380
1380
|
加入有效时间,在_calculate中调用
|
|
1381
1381
|
|
|
1382
1382
|
:param Datetime datetime: 有效时间
|
|
1383
|
+
:param float value: 默认值为1.0, 大于0表示有效, 小于等于0表示无效
|
|
1383
1384
|
"""
|
|
1384
1385
|
def _calculate(self) -> None:
|
|
1385
1386
|
"""
|
|
@@ -12967,7 +12968,7 @@ def get_date_range(start: Datetime, end: Datetime) -> DatetimeList:
|
|
|
12967
12968
|
get_date_range(start, end)
|
|
12968
12969
|
|
|
12969
12970
|
获取指定 [start, end) 日期时间范围的自然日日历日期列表,仅支持到日
|
|
12970
|
-
|
|
12971
|
+
注意: 如果 end 日期为空,将使用 Datetime 的最大日期,可能会使用过量内存
|
|
12971
12972
|
|
|
12972
12973
|
:param Datetime start: 起始日期
|
|
12973
12974
|
:param Datetime end: 结束日期
|
hikyuu/cpp/core311.pyd
CHANGED
|
Binary file
|
hikyuu/cpp/core311.pyi
CHANGED
|
@@ -1373,13 +1373,14 @@ class EnvironmentBase:
|
|
|
1373
1373
|
...
|
|
1374
1374
|
def __truediv__(self, arg0: EnvironmentBase) -> EnvironmentBase:
|
|
1375
1375
|
...
|
|
1376
|
-
def _add_valid(self,
|
|
1376
|
+
def _add_valid(self, datetime: Datetime, value: float = 1.0) -> None:
|
|
1377
1377
|
"""
|
|
1378
1378
|
_add_valid(self, datetime)
|
|
1379
1379
|
|
|
1380
1380
|
加入有效时间,在_calculate中调用
|
|
1381
1381
|
|
|
1382
1382
|
:param Datetime datetime: 有效时间
|
|
1383
|
+
:param float value: 默认值为1.0, 大于0表示有效, 小于等于0表示无效
|
|
1383
1384
|
"""
|
|
1384
1385
|
def _calculate(self) -> None:
|
|
1385
1386
|
"""
|
|
@@ -12967,7 +12968,7 @@ def get_date_range(start: Datetime, end: Datetime) -> DatetimeList:
|
|
|
12967
12968
|
get_date_range(start, end)
|
|
12968
12969
|
|
|
12969
12970
|
获取指定 [start, end) 日期时间范围的自然日日历日期列表,仅支持到日
|
|
12970
|
-
|
|
12971
|
+
注意: 如果 end 日期为空,将使用 Datetime 的最大日期,可能会使用过量内存
|
|
12971
12972
|
|
|
12972
12973
|
:param Datetime start: 起始日期
|
|
12973
12974
|
:param Datetime end: 结束日期
|
hikyuu/cpp/core312.pyd
CHANGED
|
Binary file
|
hikyuu/cpp/core312.pyi
CHANGED
|
@@ -1373,13 +1373,14 @@ class EnvironmentBase:
|
|
|
1373
1373
|
...
|
|
1374
1374
|
def __truediv__(self, arg0: EnvironmentBase) -> EnvironmentBase:
|
|
1375
1375
|
...
|
|
1376
|
-
def _add_valid(self,
|
|
1376
|
+
def _add_valid(self, datetime: Datetime, value: float = 1.0) -> None:
|
|
1377
1377
|
"""
|
|
1378
1378
|
_add_valid(self, datetime)
|
|
1379
1379
|
|
|
1380
1380
|
加入有效时间,在_calculate中调用
|
|
1381
1381
|
|
|
1382
1382
|
:param Datetime datetime: 有效时间
|
|
1383
|
+
:param float value: 默认值为1.0, 大于0表示有效, 小于等于0表示无效
|
|
1383
1384
|
"""
|
|
1384
1385
|
def _calculate(self) -> None:
|
|
1385
1386
|
"""
|
|
@@ -12967,7 +12968,7 @@ def get_date_range(start: Datetime, end: Datetime) -> DatetimeList:
|
|
|
12967
12968
|
get_date_range(start, end)
|
|
12968
12969
|
|
|
12969
12970
|
获取指定 [start, end) 日期时间范围的自然日日历日期列表,仅支持到日
|
|
12970
|
-
|
|
12971
|
+
注意: 如果 end 日期为空,将使用 Datetime 的最大日期,可能会使用过量内存
|
|
12971
12972
|
|
|
12972
12973
|
:param Datetime start: 起始日期
|
|
12973
12974
|
:param Datetime end: 结束日期
|
hikyuu/cpp/core313.pyd
CHANGED
|
Binary file
|
hikyuu/cpp/core313.pyi
CHANGED
|
@@ -1368,13 +1368,14 @@ class EnvironmentBase:
|
|
|
1368
1368
|
...
|
|
1369
1369
|
def __truediv__(self, arg0: EnvironmentBase) -> EnvironmentBase:
|
|
1370
1370
|
...
|
|
1371
|
-
def _add_valid(self,
|
|
1371
|
+
def _add_valid(self, datetime: Datetime, value: float = 1.0) -> None:
|
|
1372
1372
|
"""
|
|
1373
1373
|
_add_valid(self, datetime)
|
|
1374
1374
|
|
|
1375
1375
|
加入有效时间,在_calculate中调用
|
|
1376
1376
|
|
|
1377
1377
|
:param Datetime datetime: 有效时间
|
|
1378
|
+
:param float value: 默认值为1.0, 大于0表示有效, 小于等于0表示无效
|
|
1378
1379
|
"""
|
|
1379
1380
|
def _calculate(self) -> None:
|
|
1380
1381
|
"""
|
|
@@ -12945,7 +12946,7 @@ def get_date_range(start: Datetime, end: Datetime) -> DatetimeList:
|
|
|
12945
12946
|
get_date_range(start, end)
|
|
12946
12947
|
|
|
12947
12948
|
获取指定 [start, end) 日期时间范围的自然日日历日期列表,仅支持到日
|
|
12948
|
-
|
|
12949
|
+
注意: 如果 end 日期为空,将使用 Datetime 的最大日期,可能会使用过量内存
|
|
12949
12950
|
|
|
12950
12951
|
:param Datetime start: 起始日期
|
|
12951
12952
|
:param Datetime end: 结束日期
|
hikyuu/cpp/core38.pyd
CHANGED
|
Binary file
|
hikyuu/cpp/core38.pyi
CHANGED
|
@@ -1373,13 +1373,14 @@ class EnvironmentBase:
|
|
|
1373
1373
|
...
|
|
1374
1374
|
def __truediv__(self, arg0: EnvironmentBase) -> EnvironmentBase:
|
|
1375
1375
|
...
|
|
1376
|
-
def _add_valid(self,
|
|
1376
|
+
def _add_valid(self, datetime: Datetime, value: float = 1.0) -> None:
|
|
1377
1377
|
"""
|
|
1378
1378
|
_add_valid(self, datetime)
|
|
1379
1379
|
|
|
1380
1380
|
加入有效时间,在_calculate中调用
|
|
1381
1381
|
|
|
1382
1382
|
:param Datetime datetime: 有效时间
|
|
1383
|
+
:param float value: 默认值为1.0, 大于0表示有效, 小于等于0表示无效
|
|
1383
1384
|
"""
|
|
1384
1385
|
def _calculate(self) -> None:
|
|
1385
1386
|
"""
|
|
@@ -12967,7 +12968,7 @@ def get_date_range(start: Datetime, end: Datetime) -> DatetimeList:
|
|
|
12967
12968
|
get_date_range(start, end)
|
|
12968
12969
|
|
|
12969
12970
|
获取指定 [start, end) 日期时间范围的自然日日历日期列表,仅支持到日
|
|
12970
|
-
|
|
12971
|
+
注意: 如果 end 日期为空,将使用 Datetime 的最大日期,可能会使用过量内存
|
|
12971
12972
|
|
|
12972
12973
|
:param Datetime start: 起始日期
|
|
12973
12974
|
:param Datetime end: 结束日期
|
hikyuu/cpp/core39.pyd
CHANGED
|
Binary file
|
hikyuu/cpp/core39.pyi
CHANGED
|
@@ -1373,13 +1373,14 @@ class EnvironmentBase:
|
|
|
1373
1373
|
...
|
|
1374
1374
|
def __truediv__(self, arg0: EnvironmentBase) -> EnvironmentBase:
|
|
1375
1375
|
...
|
|
1376
|
-
def _add_valid(self,
|
|
1376
|
+
def _add_valid(self, datetime: Datetime, value: float = 1.0) -> None:
|
|
1377
1377
|
"""
|
|
1378
1378
|
_add_valid(self, datetime)
|
|
1379
1379
|
|
|
1380
1380
|
加入有效时间,在_calculate中调用
|
|
1381
1381
|
|
|
1382
1382
|
:param Datetime datetime: 有效时间
|
|
1383
|
+
:param float value: 默认值为1.0, 大于0表示有效, 小于等于0表示无效
|
|
1383
1384
|
"""
|
|
1384
1385
|
def _calculate(self) -> None:
|
|
1385
1386
|
"""
|
|
@@ -12967,7 +12968,7 @@ def get_date_range(start: Datetime, end: Datetime) -> DatetimeList:
|
|
|
12967
12968
|
get_date_range(start, end)
|
|
12968
12969
|
|
|
12969
12970
|
获取指定 [start, end) 日期时间范围的自然日日历日期列表,仅支持到日
|
|
12970
|
-
|
|
12971
|
+
注意: 如果 end 日期为空,将使用 Datetime 的最大日期,可能会使用过量内存
|
|
12971
12972
|
|
|
12972
12973
|
:param Datetime start: 起始日期
|
|
12973
12974
|
:param Datetime end: 结束日期
|
hikyuu/cpp/hikyuu.dll
CHANGED
|
Binary file
|
hikyuu/cpp/hikyuu.lib
CHANGED
|
Binary file
|
hikyuu/cpp/sqlite3.dll
CHANGED
|
Binary file
|
hikyuu/data/tdx_to_mysql.py
CHANGED
|
@@ -35,7 +35,7 @@ from io import SEEK_END, SEEK_SET
|
|
|
35
35
|
|
|
36
36
|
from hikyuu.data.common import get_stktype_list, MARKETID
|
|
37
37
|
from hikyuu.data.common_mysql import (
|
|
38
|
-
create_database, get_marketid, get_codepre_list, get_table, get_lastdatetime
|
|
38
|
+
create_database, get_marketid, get_codepre_list, get_table, get_lastdatetime, update_extern_data
|
|
39
39
|
)
|
|
40
40
|
|
|
41
41
|
from hikyuu.data.weight_to_mysql import qianlong_import_weight
|
|
@@ -122,14 +122,14 @@ def tdx_import_stock_name_from_file(connect, filename, market, quotations=None):
|
|
|
122
122
|
length = len(codepre[0])
|
|
123
123
|
if code[:length] == codepre[0]:
|
|
124
124
|
count += 1
|
|
125
|
-
#print(market, code, newStockDict[code], codepre)
|
|
125
|
+
# print(market, code, newStockDict[code], codepre)
|
|
126
126
|
sql = "insert into `hku_base`.`stock` (marketid, code, name, type, valid, startDate, endDate) \
|
|
127
127
|
values (%s, '%s', '%s', %s, %s, %s, %s)" \
|
|
128
128
|
% (marketid, code, newStockDict[code], codepre[1], 1, today, 99999999)
|
|
129
129
|
cur.execute(sql)
|
|
130
130
|
break
|
|
131
131
|
|
|
132
|
-
#print('%s新增股票数:%i' % (market.upper(), count))
|
|
132
|
+
# print('%s新增股票数:%i' % (market.upper(), count))
|
|
133
133
|
connect.commit()
|
|
134
134
|
cur.close()
|
|
135
135
|
return count
|
|
@@ -177,9 +177,9 @@ def tdx_import_day_data_from_file(connect, filename, ktype, market, stock_record
|
|
|
177
177
|
continue
|
|
178
178
|
|
|
179
179
|
if record[2] >= record[1] >= record[3] > 0 \
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
180
|
+
and record[2] >= record[4] >= record[3] > 0 \
|
|
181
|
+
and record[5] >= 0 \
|
|
182
|
+
and record[6] >= 0:
|
|
183
183
|
buf.append(
|
|
184
184
|
(
|
|
185
185
|
record[0] * 10000, record[1] * 0.01, record[2] * 0.01, record[3] * 0.01,
|
|
@@ -197,7 +197,7 @@ def tdx_import_day_data_from_file(connect, filename, ktype, market, stock_record
|
|
|
197
197
|
cur.executemany(sql, buf)
|
|
198
198
|
connect.commit()
|
|
199
199
|
|
|
200
|
-
|
|
200
|
+
# 更新基础信息数据库中股票对应的起止日期及其有效标志
|
|
201
201
|
if valid == 0:
|
|
202
202
|
sql = "update `hku_base`.`stock` set valid=1, " \
|
|
203
203
|
"startdate=(select min(date)/10000 from {table}), " \
|
|
@@ -206,7 +206,7 @@ def tdx_import_day_data_from_file(connect, filename, ktype, market, stock_record
|
|
|
206
206
|
cur.execute("sql")
|
|
207
207
|
connect.commit()
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
# 记录最新更新日期
|
|
210
210
|
if (code == '000001' and marketid == MARKETID.SH) \
|
|
211
211
|
or (code == '399001' and marketid == MARKETID.SZ):
|
|
212
212
|
sql = "update `hku_base`.`market` set lastdate=(select max(date)/10000 from {table}) " \
|
|
@@ -217,7 +217,7 @@ def tdx_import_day_data_from_file(connect, filename, ktype, market, stock_record
|
|
|
217
217
|
print(sql)
|
|
218
218
|
connect.commit()
|
|
219
219
|
|
|
220
|
-
#connect.commit()
|
|
220
|
+
# connect.commit()
|
|
221
221
|
|
|
222
222
|
cur.close()
|
|
223
223
|
return add_record_count
|
|
@@ -299,9 +299,9 @@ def tdx_import_min_data_from_file(connect, filename, ktype, market, stock_record
|
|
|
299
299
|
while data:
|
|
300
300
|
record = struct.unpack('HHfffffii', data)
|
|
301
301
|
if record[3] >= record[2] >= record[4] > 0\
|
|
302
|
-
and record[3] >= record[5] >= record[4] >0\
|
|
303
|
-
and record[5] >=0 \
|
|
304
|
-
and record[6] >=0:
|
|
302
|
+
and record[3] >= record[5] >= record[4] > 0\
|
|
303
|
+
and record[5] >= 0 \
|
|
304
|
+
and record[6] >= 0:
|
|
305
305
|
sql = "INSERT INTO {tablename} (date, open, high, low, close, amount, count) " \
|
|
306
306
|
"VALUES (%s, %s, %s, %s, %s, %s, %s)".format(tablename=table)
|
|
307
307
|
cur.execute(
|
|
@@ -368,10 +368,10 @@ def tdx_import_data(connect, market, ktype, quotations, src_dir, progress=Progre
|
|
|
368
368
|
add_record_count += this_count
|
|
369
369
|
if this_count > 0:
|
|
370
370
|
if ktype == 'DAY':
|
|
371
|
-
|
|
371
|
+
update_extern_data(connect, market.upper(), stock[2], "DAY")
|
|
372
372
|
pass
|
|
373
373
|
elif ktype == '5MIN':
|
|
374
|
-
|
|
374
|
+
update_extern_data(connect, market.upper(), stock[2], "5MIN")
|
|
375
375
|
pass
|
|
376
376
|
if progress:
|
|
377
377
|
progress(i, total)
|
|
@@ -391,7 +391,7 @@ if __name__ == '__main__':
|
|
|
391
391
|
pwd = ''
|
|
392
392
|
|
|
393
393
|
src_dir = "D:\\TdxW_HuaTai"
|
|
394
|
-
quotations = ['stock', 'fund']
|
|
394
|
+
quotations = ['stock', 'fund'] # 通达信盘后数据没有债券
|
|
395
395
|
|
|
396
396
|
connect = mysql.connector.connect(user=usr, password=pwd, host=host, port=port)
|
|
397
397
|
create_database(connect)
|
|
@@ -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
|