hikyuu 2.6.8.4__py3-none-manylinux2014_x86_64.whl → 2.7.0__py3-none-manylinux2014_x86_64.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 +31 -17
- hikyuu/__init__.pyi +610 -590
- hikyuu/analysis/__init__.pyi +584 -563
- hikyuu/analysis/analysis.pyi +585 -564
- hikyuu/core.py +2 -0
- hikyuu/core.pyi +586 -565
- hikyuu/cpp/__init__.pyi +2 -2
- hikyuu/cpp/core310.pyi +501 -108
- hikyuu/cpp/core310.so +0 -0
- hikyuu/cpp/core311.pyi +495 -108
- hikyuu/cpp/core311.so +0 -0
- hikyuu/cpp/core312.pyi +495 -108
- hikyuu/cpp/core312.so +0 -0
- hikyuu/cpp/core313.pyi +501 -108
- hikyuu/cpp/core313.so +0 -0
- hikyuu/cpp/i18n/zh_CN/hikyuu.mo +0 -0
- hikyuu/cpp/libboost_charconv-mt.so +0 -0
- hikyuu/cpp/libboost_charconv-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_chrono-mt.so +0 -0
- hikyuu/cpp/libboost_chrono-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_date_time-mt.so +0 -0
- hikyuu/cpp/libboost_date_time-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_serialization-mt.so +0 -0
- hikyuu/cpp/libboost_serialization-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_system-mt.so +0 -0
- hikyuu/cpp/libboost_system-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_thread-mt.so +0 -0
- hikyuu/cpp/libboost_thread-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libboost_wserialization-mt.so +0 -0
- hikyuu/cpp/libboost_wserialization-mt.so.1.88.0 +0 -0
- hikyuu/cpp/libhikyuu.so +0 -0
- hikyuu/cpp/libsqlite3.so +0 -0
- hikyuu/data/clickhouse_upgrade/createdb.sql +105 -105
- hikyuu/data/common.py +3 -3
- hikyuu/data/common_clickhouse.py +1 -1
- hikyuu/data/download_block.py +351 -0
- hikyuu/data/em_block_to_clickhouse.py +26 -74
- hikyuu/data/em_block_to_mysql.py +25 -75
- hikyuu/data/em_block_to_sqlite.py +26 -78
- hikyuu/data/hku_config_template.py +3 -3
- hikyuu/data/pytdx_to_clickhouse.py +15 -11
- hikyuu/data/pytdx_to_h5.py +6 -2
- hikyuu/data/pytdx_to_mysql.py +5 -1
- hikyuu/data/pytdx_weight_to_clickhouse.py +1 -1
- hikyuu/data/pytdx_weight_to_mysql.py +1 -1
- hikyuu/data/pytdx_weight_to_sqlite.py +1 -1
- hikyuu/data/zh_bond10_to_clickhouse.py +1 -1
- hikyuu/draw/__init__.pyi +1 -1
- hikyuu/draw/drawplot/__init__.pyi +9 -9
- hikyuu/draw/drawplot/bokeh_draw.pyi +600 -580
- hikyuu/draw/drawplot/common.pyi +1 -1
- hikyuu/draw/drawplot/echarts_draw.pyi +602 -582
- hikyuu/draw/drawplot/matplotlib_draw.py +4 -74
- hikyuu/draw/drawplot/matplotlib_draw.pyi +612 -592
- hikyuu/draw/elder.pyi +11 -11
- hikyuu/draw/kaufman.pyi +18 -18
- hikyuu/draw/volume.pyi +10 -10
- hikyuu/examples/notebook/Demo/Demo1.ipynb +48 -33
- hikyuu/extend.py +0 -7
- hikyuu/extend.pyi +594 -573
- hikyuu/fetcher/stock/zh_block_em.py +12 -40
- hikyuu/gui/HikyuuTDX.py +99 -31
- hikyuu/gui/data/CollectSpotThread.py +1 -1
- hikyuu/gui/data/EscapetimeThread.py +8 -14
- hikyuu/gui/data/ImportBlockInfoTask.py +3 -10
- hikyuu/gui/data/MainWindow.py +1196 -717
- hikyuu/gui/data/SchedImportThread.py +2 -2
- hikyuu/gui/data/UsePytdxImportToH5Thread.py +3 -3
- hikyuu/gui/data/UseQmtImportToH5Thread.py +2 -2
- hikyuu/gui/data/UseTdxImportToH5Thread.py +3 -3
- hikyuu/gui/data/tool.py +32 -25
- hikyuu/gui/dataserver.py +5 -3
- hikyuu/gui/images/liandongxiaopu.png +0 -0
- hikyuu/hub.pyi +6 -6
- hikyuu/include/hikyuu/DataType.h +4 -16
- hikyuu/include/hikyuu/KData.h +6 -3
- hikyuu/include/hikyuu/KDataPrivatedBufferImp.h +1 -1
- hikyuu/include/hikyuu/KDataSharedBufferImp.h +1 -1
- hikyuu/include/hikyuu/KQuery.h +2 -2
- hikyuu/include/hikyuu/Stock.h +4 -1
- hikyuu/include/hikyuu/StockManager.h +13 -3
- hikyuu/include/hikyuu/data_driver/BaseInfoDriver.h +8 -0
- hikyuu/include/hikyuu/data_driver/BlockInfoDriver.h +6 -0
- hikyuu/include/hikyuu/data_driver/KDataDriver.h +26 -1
- hikyuu/include/hikyuu/data_driver/base_info/mysql/MySQLBaseInfoDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/base_info/sqlite/SQLiteBaseInfoDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/block_info/mysql/MySQLBlockInfoDriver.h +2 -1
- hikyuu/include/hikyuu/data_driver/block_info/qianlong/QLBlockInfoDriver.h +2 -1
- hikyuu/include/hikyuu/data_driver/block_info/sqlite/SQLiteBlockInfoDriver.h +2 -1
- hikyuu/include/hikyuu/data_driver/kdata/DoNothingKDataDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/cvs/KDataTempCsvDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/hdf5/H5KDataDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/mysql/MySQLKDataDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/sqlite/SQLiteKDataDriver.h +1 -1
- hikyuu/include/hikyuu/data_driver/kdata/tdx/TdxKDataDriver.h +1 -1
- hikyuu/include/hikyuu/hikyuu.h +1 -1
- hikyuu/include/hikyuu/indicator/build_in.h +1 -0
- hikyuu/include/hikyuu/indicator/crt/CYCLE.h +4 -4
- hikyuu/include/hikyuu/indicator/crt/HSL.h +2 -2
- hikyuu/include/hikyuu/indicator/crt/QUANTILE_TRUNC.h +30 -0
- hikyuu/include/hikyuu/indicator/crt/TURNOVER.h +1 -0
- hikyuu/include/hikyuu/indicator/crt/ZSCORE.h +2 -2
- hikyuu/include/hikyuu/indicator/imp/IQuantileTrunc.h +25 -0
- hikyuu/include/hikyuu/misc.h +38 -0
- hikyuu/include/hikyuu/plugin/dataserver.h +2 -1
- hikyuu/include/hikyuu/plugin/device.h +10 -0
- hikyuu/include/hikyuu/plugin/extind.h +37 -0
- hikyuu/include/hikyuu/plugin/hkuextra.h +0 -18
- hikyuu/include/hikyuu/plugin/interface/DataServerPluginInterface.h +2 -2
- hikyuu/include/hikyuu/plugin/interface/DevicePluginInterface.h +2 -0
- hikyuu/include/hikyuu/plugin/interface/ExtendIndicatorsPluginInterface.h +12 -0
- hikyuu/include/hikyuu/plugin/interface/HkuExtraPluginInterface.h +0 -14
- hikyuu/include/hikyuu/plugin/interface/plugins.h +3 -1
- hikyuu/include/hikyuu/python/pybind_utils.h +1 -8
- hikyuu/include/hikyuu/strategy/RunSystemInStrategy.h +3 -0
- hikyuu/include/hikyuu/trade_manage/Performance.h +4 -4
- hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +10 -1
- hikyuu/include/hikyuu/trade_sys/moneymanager/imp/FixedCapitalFundsMM.h +0 -4
- hikyuu/include/hikyuu/trade_sys/multifactor/MultiFactorBase.h +36 -3
- hikyuu/include/hikyuu/trade_sys/multifactor/NormalizeBase.h +125 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/ScoresFilterBase.h +125 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/build_in.h +3 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/buildin_norm.h +36 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/buildin_scfilter.h +51 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/GroupSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/IgnoreLessOrEqualValueSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/IgnoreNanSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/MinAmountPercentSCFilter.h +25 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/PriceSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/filter/TopNSCFilter.h +24 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/EqualWeightMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/ICIRMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/ICMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/imp/WeightMultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormMinMax.h +23 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormQuantile.h +28 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormQuantileUniform.h +28 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/NormZScore.h +25 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/__init__.py +1 -0
- hikyuu/include/hikyuu/trade_sys/multifactor/normalize/quantile_trunc.h +16 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +7 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/imp/SimplePortfolio.h +7 -0
- hikyuu/include/hikyuu/trade_sys/portfolio/imp/WithoutAFPortfolio.h +7 -0
- hikyuu/include/hikyuu/trade_sys/selector/SelectorBase.h +49 -0
- hikyuu/include/hikyuu/trade_sys/selector/build_in.h +1 -0
- hikyuu/include/hikyuu/trade_sys/selector/crt/SE_MultiFactor2.h +40 -0
- hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector.h +0 -3
- hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector2.h +49 -0
- hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorSelector.h +1 -1
- hikyuu/include/hikyuu/trade_sys/selector/imp/logic/OperatorValueSelector.h +1 -1
- hikyuu/include/hikyuu/trade_sys/signal/imp/BandSignal2.h +0 -4
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/AddValueSignal.h +2 -2
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/DivValueSignal.h +2 -2
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/MulValueSignal.h +2 -2
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorSignal.h +1 -1
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorValueSignal.h +4 -4
- hikyuu/include/hikyuu/trade_sys/signal/imp/logic/SubValueSignal.h +2 -2
- hikyuu/include/hikyuu/trade_sys/slippage/build_in.h +5 -1
- hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_LogNormal.h +22 -0
- hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_Normal.h +22 -0
- hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_TruncNormal.h +25 -0
- hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_Uniform.h +23 -0
- hikyuu/include/hikyuu/trade_sys/slippage/imp/LogNormalSlippage.h +28 -0
- hikyuu/include/hikyuu/trade_sys/slippage/imp/NormalSlippage.h +28 -0
- hikyuu/include/hikyuu/trade_sys/slippage/imp/TruncNormalSlippage.h +28 -0
- hikyuu/include/hikyuu/trade_sys/slippage/imp/UniformSlippage.h +24 -0
- hikyuu/include/hikyuu/trade_sys/system/System.h +14 -1
- hikyuu/include/hikyuu/utilities/SpendTimer.h +17 -7
- hikyuu/include/hikyuu/utilities/arithmetic.h +55 -0
- hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLConnect.h +1 -1
- hikyuu/include/hikyuu/utilities/db_connect/mysql/MySQLStatement.h +1 -1
- hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteConnect.h +1 -1
- hikyuu/include/hikyuu/utilities/db_connect/sqlite/SQLiteStatement.h +1 -1
- hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +4 -1
- hikyuu/include/hikyuu/version.h +5 -5
- hikyuu/plugin/libbacktest.so +0 -0
- hikyuu/plugin/libclickhousedriver.so +0 -0
- hikyuu/plugin/libdataserver.so +0 -0
- hikyuu/{cpp/core39.so → plugin/libdataserver_parquet.so} +0 -0
- hikyuu/plugin/libdevice.so +0 -0
- hikyuu/plugin/libextind.so +0 -0
- hikyuu/plugin/libhkuextra.so +0 -0
- hikyuu/plugin/libimport2hdf5.so +0 -0
- hikyuu/plugin/libtmreport.so +0 -0
- hikyuu/trade_manage/__init__.pyi +599 -579
- hikyuu/trade_manage/broker.pyi +3 -3
- hikyuu/trade_manage/broker_easytrader.pyi +1 -1
- hikyuu/trade_manage/trade.py +0 -2
- hikyuu/trade_manage/trade.pyi +599 -579
- hikyuu/util/__init__.pyi +1 -1
- hikyuu/util/singleton.pyi +1 -1
- {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/METADATA +36 -32
- {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/RECORD +197 -164
- {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/top_level.txt +2 -2
- hikyuu/cpp/core39.pyi +0 -14385
- hikyuu/data_driver/__init__.py +0 -49
- hikyuu/data_driver/jqdata_data_driver.py +0 -277
- hikyuu/data_driver/pytdx_data_driver.py +0 -292
- hikyuu/fetcher/stock/zh_stock_a_huatai.py +0 -51
- hikyuu/fetcher/stock/zh_stock_a_pytdx.py +0 -129
- hikyuu/gui/data/CollectToMemThread.py +0 -123
- hikyuu/gui/data/CollectToMySQLThread.py +0 -178
- hikyuu/gui/start_huatai_insight.py +0 -510
- hikyuu/include/hikyuu/views/arrow_common.h +0 -38
- hikyuu/include/hikyuu/views/arrow_views.h +0 -117
- hikyuu/tools/update_block_info.py +0 -168
- /hikyuu/include/hikyuu/{views → trade_sys/multifactor/filter}/__init__.py +0 -0
- {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/WHEEL +0 -0
- {hikyuu-2.6.8.4.dist-info → hikyuu-2.7.0.dist-info}/entry_points.txt +0 -0
|
@@ -6,14 +6,14 @@ import logging
|
|
|
6
6
|
import time
|
|
7
7
|
import datetime
|
|
8
8
|
from math import ceil
|
|
9
|
-
from
|
|
9
|
+
from PySide6.QtCore import QThread, QWaitCondition, QMutex, Signal
|
|
10
10
|
|
|
11
11
|
from hikyuu.util import *
|
|
12
12
|
from hikyuu import Datetime, TimeDelta
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class SchedImportThread(QThread):
|
|
16
|
-
message =
|
|
16
|
+
message = Signal()
|
|
17
17
|
|
|
18
18
|
def __init__(self, config):
|
|
19
19
|
super(self.__class__, self).__init__()
|
|
@@ -28,7 +28,7 @@ import datetime
|
|
|
28
28
|
import mysql.connector
|
|
29
29
|
import queue
|
|
30
30
|
from multiprocessing import Queue, Process
|
|
31
|
-
from
|
|
31
|
+
from PySide6.QtCore import QThread, Signal
|
|
32
32
|
from hikyuu.gui.data.ImportWeightToSqliteTask import ImportWeightToSqliteTask
|
|
33
33
|
from hikyuu.gui.data.ImportPytdxToH5Task import ImportPytdxToH5
|
|
34
34
|
from hikyuu.gui.data.ImportPytdxTransToH5Task import ImportPytdxTransToH5
|
|
@@ -58,7 +58,7 @@ from hikyuu.util.mylog import class_logger
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
class UsePytdxImportToH5Thread(QThread):
|
|
61
|
-
message =
|
|
61
|
+
message = Signal(list)
|
|
62
62
|
|
|
63
63
|
def __init__(self, parent, config):
|
|
64
64
|
super(UsePytdxImportToH5Thread, self).__init__()
|
|
@@ -98,7 +98,7 @@ class UsePytdxImportToH5Thread(QThread):
|
|
|
98
98
|
|
|
99
99
|
if self.config.getboolean('block', 'enable', fallback=True):
|
|
100
100
|
self.tasks.append(ImportBlockInfoTask(self.log_queue, self.queue,
|
|
101
|
-
self.config
|
|
101
|
+
self.config)) # '概念板块', '地域板块',
|
|
102
102
|
|
|
103
103
|
self.tasks.append(ImportZhBond10Task(self.log_queue, self.queue, self.config))
|
|
104
104
|
|
|
@@ -28,7 +28,7 @@ import datetime
|
|
|
28
28
|
import mysql.connector
|
|
29
29
|
import queue
|
|
30
30
|
from multiprocessing import Queue, Process
|
|
31
|
-
from
|
|
31
|
+
from PySide6.QtCore import QThread, Signal
|
|
32
32
|
from hikyuu.gui.data.ImportQmtToH5Task import ImportQmtToH5Task
|
|
33
33
|
from hikyuu.gui.data.ImportWeightToSqliteTask import ImportWeightToSqliteTask
|
|
34
34
|
from hikyuu.gui.data.ImportQmtToH5Task import ImportQmtToH5Task
|
|
@@ -51,7 +51,7 @@ from hikyuu.util.mylog import class_logger
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
class UseQmtImportToH5Thread(QThread):
|
|
54
|
-
message =
|
|
54
|
+
message = Signal(list)
|
|
55
55
|
|
|
56
56
|
def __init__(self, parent, config):
|
|
57
57
|
super(UseQmtImportToH5Thread, self).__init__()
|
|
@@ -28,7 +28,7 @@ import datetime
|
|
|
28
28
|
import mysql.connector
|
|
29
29
|
import queue
|
|
30
30
|
from multiprocessing import Queue, Process
|
|
31
|
-
from
|
|
31
|
+
from PySide6.QtCore import QThread, Signal
|
|
32
32
|
from hikyuu.gui.data.ImportTdxToH5Task import ImportTdxToH5Task
|
|
33
33
|
from hikyuu.gui.data.ImportWeightToSqliteTask import ImportWeightToSqliteTask
|
|
34
34
|
from hikyuu.gui.data.ImportTdxToH5Task import ImportTdxToH5Task
|
|
@@ -55,7 +55,7 @@ from hikyuu.util.mylog import class_logger
|
|
|
55
55
|
|
|
56
56
|
|
|
57
57
|
class UseTdxImportToH5Thread(QThread):
|
|
58
|
-
message =
|
|
58
|
+
message = Signal(list)
|
|
59
59
|
|
|
60
60
|
def __init__(self, parent, config):
|
|
61
61
|
super(UseTdxImportToH5Thread, self).__init__()
|
|
@@ -95,7 +95,7 @@ class UseTdxImportToH5Thread(QThread):
|
|
|
95
95
|
ImportHistoryFinanceTask(self.log_queue, self.queue, self.config, dest_dir))
|
|
96
96
|
|
|
97
97
|
self.tasks.append(ImportBlockInfoTask(self.log_queue, self.queue,
|
|
98
|
-
self.config
|
|
98
|
+
self.config)) # '概念板块', '地域板块'
|
|
99
99
|
self.tasks.append(ImportZhBond10Task(self.log_queue, self.queue, self.config))
|
|
100
100
|
|
|
101
101
|
task_count = 0
|
hikyuu/gui/data/tool.py
CHANGED
|
@@ -6,38 +6,45 @@
|
|
|
6
6
|
|
|
7
7
|
'''
|
|
8
8
|
|
|
9
|
-
import os
|
|
10
|
-
import os.path
|
|
9
|
+
import os
|
|
10
|
+
import os.path
|
|
11
11
|
|
|
12
|
-
# UI文件所在的路径
|
|
13
|
-
dir = './'
|
|
12
|
+
# UI文件所在的路径
|
|
13
|
+
dir = './'
|
|
14
14
|
|
|
15
15
|
# 列出目录下的所有ui文件
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def listUiFile():
|
|
19
|
+
list = []
|
|
20
|
+
files = os.listdir(dir)
|
|
21
|
+
for filename in files:
|
|
22
|
+
# print( dir + os.sep + f )
|
|
23
|
+
# print(filename)
|
|
24
|
+
if os.path.splitext(filename)[1] == '.ui':
|
|
25
|
+
list.append(filename)
|
|
26
|
+
|
|
27
|
+
return list
|
|
28
|
+
|
|
29
|
+
# 把后缀为ui的文件改成后缀为py的文件名
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def transPyFile(filename):
|
|
33
|
+
return os.path.splitext(filename)[0] + '.py'
|
|
30
34
|
|
|
31
35
|
# 调用系统命令把ui转换成py
|
|
36
|
+
|
|
37
|
+
|
|
32
38
|
def runMain():
|
|
33
39
|
list = listUiFile()
|
|
34
|
-
for uifile in list
|
|
40
|
+
for uifile in list:
|
|
35
41
|
pyfile = transPyFile(uifile)
|
|
36
|
-
cmd = '
|
|
37
|
-
#cmd = 'pyside2-uic -o {pyfile} {uifile}'.format(pyfile=pyfile, uifile=uifile)
|
|
38
|
-
|
|
42
|
+
cmd = 'pyside6-uic -o {pyfile} {uifile}'.format(pyfile=pyfile, uifile=uifile)
|
|
43
|
+
# cmd = 'pyside2-uic -o {pyfile} {uifile}'.format(pyfile=pyfile, uifile=uifile)
|
|
44
|
+
# print(cmd)
|
|
39
45
|
os.system(cmd)
|
|
40
46
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
|
|
48
|
+
# 程序的主入口
|
|
49
|
+
if __name__ == "__main__":
|
|
50
|
+
runMain()
|
hikyuu/gui/dataserver.py
CHANGED
|
@@ -11,13 +11,15 @@ import click
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
@click.command()
|
|
14
|
-
@click.option('--addr', '-addr', default="tcp://
|
|
14
|
+
@click.option('--addr', '-addr', default="tcp://0.0.0.0:9201", help='自身对外提供的服务地址, 如需外部机器访问,请使用 tcp://0.0.0.0:port')
|
|
15
15
|
@click.option('--work_num', '-n', default=2, type=int, help='行情接收处理线程数')
|
|
16
16
|
@click.option('--save', '-save', default=False, type=bool, help='保存行情数据(仅支持clickhouse)')
|
|
17
17
|
@click.option('--buf', '-buf', default=False, type=bool, help='缓存行情数据')
|
|
18
|
-
|
|
18
|
+
@click.option('--parquet_path', '-parquet_path', default="", help='Parquet 文件存储路径, 空字符串表示不保存')
|
|
19
|
+
def main(addr, work_num, save, buf, parquet_path):
|
|
20
|
+
# 如需其他机器访问,addr 参数需为 tcp://0.0.0.0:port
|
|
19
21
|
try:
|
|
20
|
-
start_data_server(addr, work_num, save_tick=save, buf_tick=buf)
|
|
22
|
+
start_data_server(addr, work_num, save_tick=save, buf_tick=buf, parquet_path=parquet_path)
|
|
21
23
|
|
|
22
24
|
while True:
|
|
23
25
|
try:
|
|
Binary file
|
hikyuu/hub.pyi
CHANGED
|
@@ -28,11 +28,11 @@ import sys as sys
|
|
|
28
28
|
import typing
|
|
29
29
|
__all__: list = ['add_remote_hub', 'add_local_hub', 'update_hub', 'remove_hub', 'build_hub', 'help_part', 'get_part', 'get_part_list', 'get_hub_path', 'get_part_info', 'get_part_module', 'print_part_info', 'get_hub_name_list', 'get_part_name_list', 'get_current_hub', 'search_part']
|
|
30
30
|
class ConfigModel(sqlalchemy.orm.decl_api.Base):
|
|
31
|
-
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at
|
|
31
|
+
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x7314456bfa00; ConfigModel>
|
|
32
32
|
__table__: typing.ClassVar[sqlalchemy.sql.schema.Table] # value = Table('hub_config', MetaData(), Column('id', Integer(), table=<hub_config>, primary_key=True, nullable=False, default=Sequence('config_id_seq', metadata=MetaData())), Column('key', String(), table=<hub_config>), Column('value', String(), table=<hub_config>), schema=None)
|
|
33
33
|
__table_args__: typing.ClassVar[tuple] # value = (UniqueConstraint(Column('key', String(), table=<hub_config>)))
|
|
34
34
|
__tablename__: typing.ClassVar[str] = 'hub_config'
|
|
35
|
-
_sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.ConfigModel'> at
|
|
35
|
+
_sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.ConfigModel'> at 7314456da3e0>
|
|
36
36
|
def __init__(self, **kwargs):
|
|
37
37
|
"""
|
|
38
38
|
A simple constructor that allows initialization from kwargs.
|
|
@@ -109,11 +109,11 @@ class HubManager:
|
|
|
109
109
|
def print_part_info(self, name):
|
|
110
110
|
...
|
|
111
111
|
class HubModel(sqlalchemy.orm.decl_api.Base):
|
|
112
|
-
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at
|
|
112
|
+
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x731445704310; HubModel>
|
|
113
113
|
__table__: typing.ClassVar[sqlalchemy.sql.schema.Table] # value = Table('hub_repo', MetaData(), Column('id', Integer(), table=<hub_repo>, primary_key=True, nullable=False, default=Sequence('remote_id_seq', metadata=MetaData())), Column('name', String(), table=<hub_repo>), Column('hub_type', String(), table=<hub_repo>), Column('local_base', String(), table=<hub_repo>), Column('local', String(), table=<hub_repo>), Column('url', String(), table=<hub_repo>), Column('branch', String(), table=<hub_repo>), schema=None)
|
|
114
114
|
__table_args__: typing.ClassVar[tuple] # value = (UniqueConstraint(Column('name', String(), table=<hub_repo>)))
|
|
115
115
|
__tablename__: typing.ClassVar[str] = 'hub_repo'
|
|
116
|
-
_sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.HubModel'> at
|
|
116
|
+
_sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.HubModel'> at 7314456fef20>
|
|
117
117
|
def __init__(self, **kwargs):
|
|
118
118
|
"""
|
|
119
119
|
A simple constructor that allows initialization from kwargs.
|
|
@@ -146,11 +146,11 @@ class ModuleConflictError(Exception):
|
|
|
146
146
|
def __str__(self):
|
|
147
147
|
...
|
|
148
148
|
class PartModel(sqlalchemy.orm.decl_api.Base):
|
|
149
|
-
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at
|
|
149
|
+
__mapper__: typing.ClassVar[sqlalchemy.orm.mapper.Mapper] # value = <Mapper at 0x731445704eb0; PartModel>
|
|
150
150
|
__table__: typing.ClassVar[sqlalchemy.sql.schema.Table] # value = Table('hub_part', MetaData(), Column('id', Integer(), table=<hub_part>, primary_key=True, nullable=False, default=Sequence('part_id_seq', metadata=MetaData())), Column('hub_name', String(), table=<hub_part>), Column('part', String(), table=<hub_part>), Column('name', String(), table=<hub_part>), Column('author', String(), table=<hub_part>), Column('version', String(), table=<hub_part>), Column('doc', String(), table=<hub_part>), Column('module_name', String(), table=<hub_part>), Column('label', String(), table=<hub_part>), schema=None)
|
|
151
151
|
__table_args__: typing.ClassVar[tuple] # value = (UniqueConstraint(Column('name', String(), table=<hub_part>)))
|
|
152
152
|
__tablename__: typing.ClassVar[str] = 'hub_part'
|
|
153
|
-
_sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.PartModel'> at
|
|
153
|
+
_sa_class_manager: typing.ClassVar[sqlalchemy.orm.instrumentation.ClassManager] # value = <ClassManager of <class 'hikyuu.hub.PartModel'> at 7314456ffec0>
|
|
154
154
|
def __init__(self, **kwargs):
|
|
155
155
|
"""
|
|
156
156
|
A simple constructor that allows initialization from kwargs.
|
hikyuu/include/hikyuu/DataType.h
CHANGED
|
@@ -42,6 +42,10 @@
|
|
|
42
42
|
#include "utilities/config.h"
|
|
43
43
|
#include "lang.h"
|
|
44
44
|
|
|
45
|
+
#if HKU_OS_OSX
|
|
46
|
+
#include <MacTypes.h>
|
|
47
|
+
#endif
|
|
48
|
+
|
|
45
49
|
#if HKU_SUPPORT_SERIALIZATION
|
|
46
50
|
#include <boost/serialization/nvp.hpp>
|
|
47
51
|
#include <boost/serialization/split_free.hpp>
|
|
@@ -156,22 +160,6 @@ inline bool iszero(price_t num) {
|
|
|
156
160
|
|
|
157
161
|
using fmt::format;
|
|
158
162
|
|
|
159
|
-
inline std::ostream &operator<<(std::ostream &os, const PriceList &p) {
|
|
160
|
-
size_t len = p.size();
|
|
161
|
-
const size_t print = 3;
|
|
162
|
-
os << "[";
|
|
163
|
-
for (size_t i = 0; i < len; i++) {
|
|
164
|
-
if ((i < print) || (i >= len - print)) {
|
|
165
|
-
os << p[i];
|
|
166
|
-
if (i != len - 1)
|
|
167
|
-
os << ", ";
|
|
168
|
-
} else if (i == 3)
|
|
169
|
-
os << "..., ";
|
|
170
|
-
}
|
|
171
|
-
os << "]";
|
|
172
|
-
return os;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
163
|
/** @} */
|
|
176
164
|
|
|
177
165
|
} // namespace hku
|
hikyuu/include/hikyuu/KData.h
CHANGED
|
@@ -191,7 +191,10 @@ public:
|
|
|
191
191
|
}
|
|
192
192
|
|
|
193
193
|
private:
|
|
194
|
-
|
|
194
|
+
std::shared_ptr<KDataImp>& get_null_kdata_imp() {
|
|
195
|
+
static std::shared_ptr<KDataImp> instance = std::make_shared<KDataImp>(); // 第一次调用时初始化
|
|
196
|
+
return instance;
|
|
197
|
+
}
|
|
195
198
|
|
|
196
199
|
private:
|
|
197
200
|
KDataImpPtr m_imp;
|
|
@@ -249,7 +252,7 @@ KData HKU_API getKData(const string& market_code, int64_t start = 0, int64_t end
|
|
|
249
252
|
inline KData::KData(const KData& x) : m_imp(x.m_imp) {}
|
|
250
253
|
|
|
251
254
|
inline KData::KData(KData&& x) : m_imp(std::move(x.m_imp)) {
|
|
252
|
-
x.m_imp =
|
|
255
|
+
x.m_imp = get_null_kdata_imp();
|
|
253
256
|
}
|
|
254
257
|
|
|
255
258
|
inline KData& KData::operator=(const KData& x) {
|
|
@@ -263,7 +266,7 @@ inline KData& KData::operator=(KData&& x) {
|
|
|
263
266
|
if (this == &x)
|
|
264
267
|
return *this;
|
|
265
268
|
m_imp = std::move(x.m_imp);
|
|
266
|
-
x.m_imp =
|
|
269
|
+
x.m_imp = get_null_kdata_imp();
|
|
267
270
|
return *this;
|
|
268
271
|
}
|
|
269
272
|
|
|
@@ -15,7 +15,7 @@ class HKU_API KDataPrivatedBufferImp : public KDataImp {
|
|
|
15
15
|
public:
|
|
16
16
|
KDataPrivatedBufferImp();
|
|
17
17
|
KDataPrivatedBufferImp(const Stock& stock, const KQuery& query);
|
|
18
|
-
virtual ~KDataPrivatedBufferImp();
|
|
18
|
+
virtual ~KDataPrivatedBufferImp() override;
|
|
19
19
|
|
|
20
20
|
virtual bool empty() const override {
|
|
21
21
|
return m_buffer.empty();
|
|
@@ -15,7 +15,7 @@ class HKU_API KDataSharedBufferImp : public KDataImp {
|
|
|
15
15
|
public:
|
|
16
16
|
KDataSharedBufferImp() = default;
|
|
17
17
|
KDataSharedBufferImp(const Stock& stock, const KQuery& query);
|
|
18
|
-
virtual ~KDataSharedBufferImp();
|
|
18
|
+
virtual ~KDataSharedBufferImp() override;
|
|
19
19
|
|
|
20
20
|
virtual bool empty() const override {
|
|
21
21
|
return m_size == 0;
|
hikyuu/include/hikyuu/KQuery.h
CHANGED
|
@@ -157,7 +157,7 @@ public:
|
|
|
157
157
|
|
|
158
158
|
/** 获取K线数据类型 */
|
|
159
159
|
// KType kType() const { return m_dataType; }
|
|
160
|
-
string kType() const {
|
|
160
|
+
const string& kType() const {
|
|
161
161
|
return m_dataType;
|
|
162
162
|
}
|
|
163
163
|
|
|
@@ -191,7 +191,7 @@ public:
|
|
|
191
191
|
static string getQueryTypeName(QueryType);
|
|
192
192
|
|
|
193
193
|
/** 获取KType名称,用于显示输出 */
|
|
194
|
-
static string getKTypeName(KType);
|
|
194
|
+
static string getKTypeName(const KType&);
|
|
195
195
|
|
|
196
196
|
/** 获取recoverType名称,用于显示输出 */
|
|
197
197
|
static string getRecoverTypeName(RecoverType);
|
hikyuu/include/hikyuu/Stock.h
CHANGED
|
@@ -240,6 +240,8 @@ public:
|
|
|
240
240
|
/** 指定类型的K线数据是否被缓存 */
|
|
241
241
|
bool isBuffer(KQuery::KType) const;
|
|
242
242
|
|
|
243
|
+
bool isPreload(KQuery::KType ktype) const;
|
|
244
|
+
|
|
243
245
|
/** 是否为Null */
|
|
244
246
|
bool isNull() const;
|
|
245
247
|
|
|
@@ -274,7 +276,8 @@ private:
|
|
|
274
276
|
// 仅供 StockManager 初始化时调用
|
|
275
277
|
void setPreload(const vector<KQuery::KType>& preload_ktypes);
|
|
276
278
|
|
|
277
|
-
|
|
279
|
+
void loadKDataToBufferFromKRecordList(const KQuery::KType& ktype, KRecordList&& ks) const;
|
|
280
|
+
void setHistoryFinance(vector<HistoryFinanceInfo>&&);
|
|
278
281
|
|
|
279
282
|
private:
|
|
280
283
|
struct HKU_API Data;
|
|
@@ -130,6 +130,9 @@ public:
|
|
|
130
130
|
/** 获取市场简称列表 */
|
|
131
131
|
StringList getAllMarket() const;
|
|
132
132
|
|
|
133
|
+
/** 获取所有板块分类 */
|
|
134
|
+
StringList getAllCategory();
|
|
135
|
+
|
|
133
136
|
/**
|
|
134
137
|
* 获取预定义的板块
|
|
135
138
|
* @param category 板块分类
|
|
@@ -265,6 +268,11 @@ public:
|
|
|
265
268
|
/** 设置多语言支持路径(仅在初始化之前有效) */
|
|
266
269
|
void setLanguagePath(const std::string& path);
|
|
267
270
|
|
|
271
|
+
/** 取消加载,退出时使用 */
|
|
272
|
+
void cancelLoad() {
|
|
273
|
+
m_cancel_load = true;
|
|
274
|
+
}
|
|
275
|
+
|
|
268
276
|
public:
|
|
269
277
|
typedef StockMapIterator const_iterator;
|
|
270
278
|
const_iterator begin() const {
|
|
@@ -280,6 +288,7 @@ private:
|
|
|
280
288
|
|
|
281
289
|
/* 加载 K线数据至缓存 */
|
|
282
290
|
void loadAllKData();
|
|
291
|
+
std::unordered_set<string> tryLoadAllKDataFromColumnFirst(const vector<KQuery::KType>& ktypes);
|
|
283
292
|
|
|
284
293
|
/* 加载节假日信息 */
|
|
285
294
|
void loadAllHolidays();
|
|
@@ -307,9 +316,10 @@ private:
|
|
|
307
316
|
|
|
308
317
|
private:
|
|
309
318
|
static StockManager* m_sm;
|
|
310
|
-
std::atomic_bool m_initializing;
|
|
311
|
-
std::atomic_bool
|
|
312
|
-
std::
|
|
319
|
+
std::atomic_bool m_initializing{false};
|
|
320
|
+
std::atomic_bool m_cancel_load{false}; // 取消加载, 用于退出指示
|
|
321
|
+
std::atomic_bool m_data_ready{false}; // 用于指示是否所有数据准备完毕
|
|
322
|
+
std::thread::id m_thread_id; // 记录线程id,用于判断Stratege是以独立进程方式还是线程方式运行
|
|
313
323
|
string m_tmpdir;
|
|
314
324
|
string m_datadir;
|
|
315
325
|
BaseInfoDriverPtr m_baseInfoDriver;
|
|
@@ -216,6 +216,14 @@ public:
|
|
|
216
216
|
*/
|
|
217
217
|
virtual ZhBond10List getAllZhBond10() = 0;
|
|
218
218
|
|
|
219
|
+
/**
|
|
220
|
+
* 获取所有历史财务信息, 用于列式存储时数据初始化使用
|
|
221
|
+
*/
|
|
222
|
+
virtual unordered_map<string, vector<HistoryFinanceInfo>> getAllHistoryFinance() {
|
|
223
|
+
HKU_ERROR("Not support getAllHistoryFinance()!");
|
|
224
|
+
return unordered_map<string, vector<HistoryFinanceInfo>>();
|
|
225
|
+
}
|
|
226
|
+
|
|
219
227
|
private:
|
|
220
228
|
bool checkType();
|
|
221
229
|
|
|
@@ -119,6 +119,21 @@ public:
|
|
|
119
119
|
*/
|
|
120
120
|
virtual TransList getTransList(const string& market, const string& code, const KQuery& query);
|
|
121
121
|
|
|
122
|
+
//---------------------------------------------------
|
|
123
|
+
// 以下为列式数据库接口
|
|
124
|
+
//---------------------------------------------------
|
|
125
|
+
|
|
126
|
+
/** 是否列优先(列数据库存储K线数据) */
|
|
127
|
+
virtual bool isColumnFirst() const {
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
virtual std::unordered_map<std::string, KRecordList> getAllKRecordList(
|
|
132
|
+
const KQuery::KType& ktype, const Datetime& start_date,
|
|
133
|
+
const std::atomic<bool>& cancel_flag) {
|
|
134
|
+
HKU_THROW("Not support getAllKRecordList");
|
|
135
|
+
}
|
|
136
|
+
|
|
122
137
|
protected:
|
|
123
138
|
virtual bool isPythonObject() const {
|
|
124
139
|
return false;
|
|
@@ -169,7 +184,7 @@ public:
|
|
|
169
184
|
return m_driver->canParallelLoad();
|
|
170
185
|
}
|
|
171
186
|
|
|
172
|
-
size_t getCount(const string& market, const string& code, KQuery::KType kType) {
|
|
187
|
+
size_t getCount(const string& market, const string& code, const KQuery::KType& kType) {
|
|
173
188
|
return m_driver->getCount(market, code, kType);
|
|
174
189
|
}
|
|
175
190
|
|
|
@@ -190,6 +205,16 @@ public:
|
|
|
190
205
|
return m_driver->getTransList(market, code, query);
|
|
191
206
|
}
|
|
192
207
|
|
|
208
|
+
bool isColumnFirst() const {
|
|
209
|
+
return m_driver->isColumnFirst();
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
std::unordered_map<std::string, KRecordList> getAllKRecordList(
|
|
213
|
+
const KQuery::KType& ktype, const Datetime& start_date,
|
|
214
|
+
const std::atomic<bool>& cancel_flag) {
|
|
215
|
+
return m_driver->getAllKRecordList(ktype, start_date, cancel_flag);
|
|
216
|
+
}
|
|
217
|
+
|
|
193
218
|
private:
|
|
194
219
|
KDataDriverPtr m_driver;
|
|
195
220
|
};
|
|
@@ -24,7 +24,7 @@ namespace hku {
|
|
|
24
24
|
class MySQLBaseInfoDriver : public BaseInfoDriver {
|
|
25
25
|
public:
|
|
26
26
|
MySQLBaseInfoDriver();
|
|
27
|
-
virtual ~MySQLBaseInfoDriver();
|
|
27
|
+
virtual ~MySQLBaseInfoDriver() override;
|
|
28
28
|
|
|
29
29
|
virtual bool _init() override;
|
|
30
30
|
virtual vector<StockInfo> getAllStockInfo() override;
|
|
@@ -20,7 +20,7 @@ namespace hku {
|
|
|
20
20
|
class SQLiteBaseInfoDriver : public BaseInfoDriver {
|
|
21
21
|
public:
|
|
22
22
|
SQLiteBaseInfoDriver();
|
|
23
|
-
virtual ~SQLiteBaseInfoDriver();
|
|
23
|
+
virtual ~SQLiteBaseInfoDriver() override;
|
|
24
24
|
|
|
25
25
|
virtual bool _init() override;
|
|
26
26
|
virtual vector<MarketInfo> getAllMarketInfo() override;
|
|
@@ -15,10 +15,11 @@ namespace hku {
|
|
|
15
15
|
class MySQLBlockInfoDriver : public BlockInfoDriver {
|
|
16
16
|
public:
|
|
17
17
|
MySQLBlockInfoDriver() : BlockInfoDriver("mysql") {};
|
|
18
|
-
virtual ~MySQLBlockInfoDriver();
|
|
18
|
+
virtual ~MySQLBlockInfoDriver() override;
|
|
19
19
|
|
|
20
20
|
virtual void load() override;
|
|
21
21
|
virtual bool _init() override;
|
|
22
|
+
virtual StringList getAllCategory() override;
|
|
22
23
|
virtual Block getBlock(const string&, const string&) override;
|
|
23
24
|
virtual BlockList getBlockList(const string& category) override;
|
|
24
25
|
virtual BlockList getBlockList() override;
|
|
@@ -16,9 +16,10 @@ namespace hku {
|
|
|
16
16
|
class QLBlockInfoDriver : public BlockInfoDriver {
|
|
17
17
|
public:
|
|
18
18
|
QLBlockInfoDriver() : BlockInfoDriver("qianlong") {};
|
|
19
|
-
virtual ~QLBlockInfoDriver();
|
|
19
|
+
virtual ~QLBlockInfoDriver() override;
|
|
20
20
|
|
|
21
21
|
virtual bool _init() override;
|
|
22
|
+
virtual StringList getAllCategory() override;
|
|
22
23
|
virtual Block getBlock(const string&, const string&) override;
|
|
23
24
|
virtual BlockList getBlockList(const string& category) override;
|
|
24
25
|
virtual BlockList getBlockList() override;
|
|
@@ -15,10 +15,11 @@ namespace hku {
|
|
|
15
15
|
class SQLiteBlockInfoDriver : public BlockInfoDriver {
|
|
16
16
|
public:
|
|
17
17
|
SQLiteBlockInfoDriver() : BlockInfoDriver("sqlite3") {};
|
|
18
|
-
virtual ~SQLiteBlockInfoDriver();
|
|
18
|
+
virtual ~SQLiteBlockInfoDriver() override;
|
|
19
19
|
|
|
20
20
|
virtual void load() override;
|
|
21
21
|
virtual bool _init() override;
|
|
22
|
+
virtual StringList getAllCategory() override;
|
|
22
23
|
virtual Block getBlock(const string&, const string&) override;
|
|
23
24
|
virtual BlockList getBlockList(const string& category) override;
|
|
24
25
|
virtual BlockList getBlockList() override;
|
|
@@ -15,7 +15,7 @@ namespace hku {
|
|
|
15
15
|
class DoNothingKDataDriver : public KDataDriver {
|
|
16
16
|
public:
|
|
17
17
|
DoNothingKDataDriver() : KDataDriver("DoNothing") {}
|
|
18
|
-
virtual ~DoNothingKDataDriver() = default;
|
|
18
|
+
virtual ~DoNothingKDataDriver() override = default;
|
|
19
19
|
|
|
20
20
|
virtual KDataDriverPtr _clone() override {
|
|
21
21
|
return std::make_shared<DoNothingKDataDriver>();
|
|
@@ -21,7 +21,7 @@ class KDataTempCsvDriver : public KDataDriver {
|
|
|
21
21
|
public:
|
|
22
22
|
KDataTempCsvDriver();
|
|
23
23
|
KDataTempCsvDriver(const string& day_filename, const string& min_filename);
|
|
24
|
-
virtual ~KDataTempCsvDriver();
|
|
24
|
+
virtual ~KDataTempCsvDriver() override;
|
|
25
25
|
|
|
26
26
|
void setDayFileName(const string& day_filename) {
|
|
27
27
|
m_day_filename = day_filename;
|
|
@@ -17,7 +17,7 @@ namespace hku {
|
|
|
17
17
|
class HKU_API H5KDataDriver : public KDataDriver {
|
|
18
18
|
public:
|
|
19
19
|
H5KDataDriver();
|
|
20
|
-
virtual ~H5KDataDriver();
|
|
20
|
+
virtual ~H5KDataDriver() override;
|
|
21
21
|
|
|
22
22
|
virtual KDataDriverPtr _clone() override {
|
|
23
23
|
return std::make_shared<H5KDataDriver>();
|
|
@@ -24,7 +24,7 @@ namespace hku {
|
|
|
24
24
|
class MySQLKDataDriver : public KDataDriver {
|
|
25
25
|
public:
|
|
26
26
|
MySQLKDataDriver();
|
|
27
|
-
virtual ~MySQLKDataDriver();
|
|
27
|
+
virtual ~MySQLKDataDriver() override;
|
|
28
28
|
|
|
29
29
|
virtual KDataDriverPtr _clone() override {
|
|
30
30
|
return std::make_shared<MySQLKDataDriver>();
|
|
@@ -17,7 +17,7 @@ namespace hku {
|
|
|
17
17
|
class SQLiteKDataDriver : public KDataDriver {
|
|
18
18
|
public:
|
|
19
19
|
SQLiteKDataDriver();
|
|
20
|
-
virtual ~SQLiteKDataDriver();
|
|
20
|
+
virtual ~SQLiteKDataDriver() override;
|
|
21
21
|
|
|
22
22
|
virtual KDataDriverPtr _clone() override {
|
|
23
23
|
return std::make_shared<SQLiteKDataDriver>();
|
hikyuu/include/hikyuu/hikyuu.h
CHANGED
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
#include "Stock.h"
|
|
14
14
|
#include "StockManager.h"
|
|
15
15
|
#include "utilities/Parameter.h"
|
|
16
|
-
#include "indicator/build_in.h"
|
|
17
16
|
#include "trade_manage/build_in.h"
|
|
18
17
|
#include "trade_sys/all.h"
|
|
19
18
|
#include "strategy/Strategy.h"
|
|
19
|
+
#include "indicator/build_in.h"
|
|
20
20
|
|
|
21
21
|
namespace hku {
|
|
22
22
|
|
|
@@ -19,9 +19,9 @@ namespace hku {
|
|
|
19
19
|
* @param delay_to_trading_day 延迟至交易日,当调仓日为非交易日时,自动延迟至下一个交易日作为调仓日
|
|
20
20
|
* @ingroup Indicator
|
|
21
21
|
*/
|
|
22
|
-
Indicator CYCLE(const KData& k, int adjust_cycle = 1, const string& adjust_mode = "query",
|
|
23
|
-
|
|
24
|
-
Indicator CYCLE(int adjust_cycle = 1, const string& adjust_mode = "query",
|
|
25
|
-
|
|
22
|
+
Indicator HKU_API CYCLE(const KData& k, int adjust_cycle = 1, const string& adjust_mode = "query",
|
|
23
|
+
bool delay_to_trading_day = true);
|
|
24
|
+
Indicator HKU_API CYCLE(int adjust_cycle = 1, const string& adjust_mode = "query",
|
|
25
|
+
bool delay_to_trading_day = true);
|
|
26
26
|
|
|
27
27
|
} // namespace hku
|