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.
Files changed (58) hide show
  1. hikyuu/__init__.pyi +515 -516
  2. hikyuu/analysis/__init__.pyi +490 -490
  3. hikyuu/analysis/analysis.pyi +490 -490
  4. hikyuu/core.pyi +491 -491
  5. hikyuu/cpp/__init__.pyi +2 -2
  6. hikyuu/cpp/core310.pyd +0 -0
  7. hikyuu/cpp/core310.pyi +3 -2
  8. hikyuu/cpp/core311.pyd +0 -0
  9. hikyuu/cpp/core311.pyi +3 -2
  10. hikyuu/cpp/core312.pyd +0 -0
  11. hikyuu/cpp/core312.pyi +3 -2
  12. hikyuu/cpp/core313.pyd +0 -0
  13. hikyuu/cpp/core313.pyi +3 -2
  14. hikyuu/cpp/core38.pyd +0 -0
  15. hikyuu/cpp/core38.pyi +3 -2
  16. hikyuu/cpp/core39.pyd +0 -0
  17. hikyuu/cpp/core39.pyi +3 -2
  18. hikyuu/cpp/hikyuu.dll +0 -0
  19. hikyuu/cpp/hikyuu.lib +0 -0
  20. hikyuu/cpp/sqlite3.dll +0 -0
  21. hikyuu/data/tdx_to_mysql.py +15 -15
  22. hikyuu/draw/drawplot/__init__.pyi +8 -8
  23. hikyuu/draw/drawplot/bokeh_draw.pyi +505 -506
  24. hikyuu/draw/drawplot/common.pyi +1 -1
  25. hikyuu/draw/drawplot/echarts_draw.pyi +507 -508
  26. hikyuu/draw/drawplot/matplotlib_draw.pyi +516 -517
  27. hikyuu/draw/elder.pyi +11 -11
  28. hikyuu/draw/kaufman.pyi +18 -18
  29. hikyuu/draw/volume.pyi +10 -10
  30. hikyuu/extend.pyi +500 -501
  31. hikyuu/gui/data/UseTdxImportToH5Thread.py +2 -2
  32. hikyuu/hub.py +7 -13
  33. hikyuu/hub.pyi +9 -6
  34. hikyuu/include/hikyuu/utilities/config.h +1 -1
  35. hikyuu/include/hikyuu/utilities/datetime/Datetime.h +3 -3
  36. hikyuu/include/hikyuu/utilities/datetime/TimeDelta.h +8 -0
  37. hikyuu/include/hikyuu/utilities/plugin/PluginBase.h +47 -0
  38. hikyuu/include/hikyuu/utilities/plugin/PluginClient.h +55 -0
  39. hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +64 -0
  40. hikyuu/include/hikyuu/utilities/plugin/__init__.py +1 -0
  41. hikyuu/include/hikyuu/utilities/thread/MQStealThreadPool.h +1 -1
  42. hikyuu/include/hikyuu/utilities/thread/MQThreadPool.h +1 -1
  43. hikyuu/include/hikyuu/utilities/thread/StealThreadPool.h +1 -1
  44. hikyuu/include/hikyuu/utilities/thread/ThreadPool.h +1 -1
  45. hikyuu/include/hikyuu/version.h +4 -4
  46. hikyuu/indicator/indicator.py +1 -1
  47. hikyuu/trade_manage/__init__.pyi +505 -506
  48. hikyuu/trade_manage/broker.pyi +3 -3
  49. hikyuu/trade_manage/broker_easytrader.pyi +1 -1
  50. hikyuu/trade_manage/trade.pyi +505 -506
  51. hikyuu/util/__init__.pyi +1 -1
  52. hikyuu/util/singleton.pyi +1 -1
  53. {hikyuu-2.5.5.dist-info → hikyuu-2.5.6.dist-info}/METADATA +1 -1
  54. {hikyuu-2.5.5.dist-info → hikyuu-2.5.6.dist-info}/RECORD +58 -54
  55. {hikyuu-2.5.5.dist-info → hikyuu-2.5.6.dist-info}/top_level.txt +1 -0
  56. {hikyuu-2.5.5.dist-info → hikyuu-2.5.6.dist-info}/LICENSE +0 -0
  57. {hikyuu-2.5.5.dist-info → hikyuu-2.5.6.dist-info}/WHEEL +0 -0
  58. {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 core38
3
- __all__ = ['core38']
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, arg0: Datetime, arg1: float) -> None:
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
- 为防止内存占用过大,end如果超出系统明日日期,则强制为系统明日日期。
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, arg0: Datetime, arg1: float) -> None:
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
- 为防止内存占用过大,end如果超出系统明日日期,则强制为系统明日日期。
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, arg0: Datetime, arg1: float) -> None:
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
- 为防止内存占用过大,end如果超出系统明日日期,则强制为系统明日日期。
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, arg0: Datetime, arg1: float) -> None:
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
- 为防止内存占用过大,end如果超出系统明日日期,则强制为系统明日日期。
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, arg0: Datetime, arg1: float) -> None:
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
- 为防止内存占用过大,end如果超出系统明日日期,则强制为系统明日日期。
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, arg0: Datetime, arg1: float) -> None:
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
- 为防止内存占用过大,end如果超出系统明日日期,则强制为系统明日日期。
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
@@ -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
- and record[2] >= record[4] >= record[3] > 0 \
181
- and record[5] >= 0 \
182
- and record[6] >= 0:
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
- #update_hdf5_extern_data(h5file, market.upper() + stock[2], 'DAY')
371
+ update_extern_data(connect, market.upper(), stock[2], "DAY")
372
372
  pass
373
373
  elif ktype == '5MIN':
374
- #update_hdf5_extern_data(h5file, market.upper() + stock[2], '5MIN')
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.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
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