hikyuu 2.7.2__py3-none-win_amd64.whl → 2.7.5__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 +21 -7
- hikyuu/__init__.pyi +16 -14
- hikyuu/analysis/__init__.pyi +2 -0
- hikyuu/analysis/analysis.pyi +3 -1
- hikyuu/core.pyi +4 -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 +123 -62
- hikyuu/cpp/core311.pyd +0 -0
- hikyuu/cpp/core311.pyi +123 -62
- hikyuu/cpp/core312.pyd +0 -0
- hikyuu/cpp/core312.pyi +123 -62
- hikyuu/cpp/core313.pyd +0 -0
- hikyuu/cpp/core313.pyi +123 -62
- hikyuu/cpp/hikyuu.dll +0 -0
- hikyuu/cpp/hikyuu.lib +0 -0
- hikyuu/cpp/i18n/zh_CN/hikyuu.mo +0 -0
- hikyuu/cpp/mimalloc-redirect.dll +0 -0
- hikyuu/cpp/mimalloc.dll +0 -0
- hikyuu/data/clickhouse_upgrade/0002.sql +9 -0
- hikyuu/data/common_mysql.py +1 -1
- hikyuu/data/em_block_to_mysql.py +16 -4
- hikyuu/data/em_block_to_sqlite.py +16 -4
- hikyuu/data/hku_config_template.py +21 -3
- hikyuu/data/mysql_upgrade/0030.sql +3 -0
- hikyuu/data/pytdx_to_h5.py +2 -2
- hikyuu/data/pytdx_to_mysql.py +5 -5
- hikyuu/data/sqlite_upgrade/0030.sql +5 -0
- hikyuu/data/tdx_to_clickhouse.py +2 -2
- hikyuu/data/tdx_to_h5.py +11 -11
- hikyuu/data/tdx_to_mysql.py +2 -2
- hikyuu/draw/__init__.pyi +1 -1
- hikyuu/draw/drawplot/bokeh_draw.pyi +8 -6
- hikyuu/draw/drawplot/echarts_draw.pyi +8 -6
- hikyuu/draw/drawplot/matplotlib_draw.py +19 -11
- hikyuu/draw/drawplot/matplotlib_draw.pyi +8 -6
- hikyuu/examples/notebook/001-overview.ipynb +112 -78
- hikyuu/examples/notebook/004-IndicatorOverview.ipynb +52 -65
- hikyuu/examples/notebook/006-TradeManager.ipynb +402 -291
- hikyuu/examples/notebook/008-Pickle.ipynb +25 -17
- hikyuu/examples/notebook/009-RealData.ipynb +36 -38
- hikyuu/examples/notebook/Demo/Demo2.ipynb +146 -116
- hikyuu/extend.pyi +5 -3
- hikyuu/gui/HikyuuTDX.py +20 -0
- hikyuu/gui/data/MainWindow.py +169 -133
- hikyuu/gui/data/UseTdxImportToH5Thread.py +4 -2
- hikyuu/gui/start_qmt.py +1 -1
- hikyuu/hub.pyi +6 -6
- hikyuu/include/hikyuu/Block.h +9 -9
- hikyuu/include/hikyuu/HistoryFinanceInfo.h +3 -3
- hikyuu/include/hikyuu/KData.h +51 -28
- hikyuu/include/hikyuu/KDataImp.h +12 -7
- hikyuu/include/hikyuu/KDataPrivatedBufferImp.h +13 -7
- hikyuu/include/hikyuu/KDataSharedBufferImp.h +8 -6
- hikyuu/include/hikyuu/KQuery.h +11 -11
- hikyuu/include/hikyuu/KRecord.h +1 -1
- hikyuu/include/hikyuu/MarketInfo.h +10 -10
- hikyuu/include/hikyuu/Stock.h +30 -30
- hikyuu/include/hikyuu/StockManager.h +24 -12
- hikyuu/include/hikyuu/StockTypeInfo.h +9 -9
- hikyuu/include/hikyuu/StockWeight.h +9 -9
- hikyuu/include/hikyuu/TimeLineRecord.h +1 -1
- hikyuu/include/hikyuu/TransRecord.h +1 -1
- hikyuu/include/hikyuu/data_driver/BaseInfoDriver.h +2 -1
- hikyuu/include/hikyuu/data_driver/BlockInfoDriver.h +6 -0
- hikyuu/include/hikyuu/data_driver/KDataDriver.h +6 -7
- hikyuu/include/hikyuu/data_driver/kdata/mysql/MySQLKDataDriver.h +5 -1
- hikyuu/include/hikyuu/data_driver/kdata/sqlite/SQLiteKDataDriver.h +1 -1
- hikyuu/include/hikyuu/global/sysinfo.h +1 -1
- hikyuu/include/hikyuu/indicator/IndParam.h +1 -1
- hikyuu/include/hikyuu/indicator/Indicator.h +56 -27
- hikyuu/include/hikyuu/indicator/Indicator2InImp.h +0 -4
- hikyuu/include/hikyuu/indicator/IndicatorImp.h +146 -73
- hikyuu/include/hikyuu/indicator/crt/CONTEXT.h +11 -1
- hikyuu/include/hikyuu/indicator/crt/IC.h +19 -14
- hikyuu/include/hikyuu/indicator/crt/ICIR.h +4 -7
- hikyuu/include/hikyuu/indicator/imp/IAbs.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IAcos.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IAd.h +0 -2
- hikyuu/include/hikyuu/indicator/imp/IAdvance.h +3 -0
- hikyuu/include/hikyuu/indicator/imp/IAma.h +3 -0
- hikyuu/include/hikyuu/indicator/imp/IAsin.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IAtan.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IAtr.h +2 -3
- hikyuu/include/hikyuu/indicator/imp/IBackset.h +2 -4
- hikyuu/include/hikyuu/indicator/imp/IBlockSetNum.h +3 -0
- hikyuu/include/hikyuu/indicator/imp/ICeil.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IContext.h +0 -3
- hikyuu/include/hikyuu/indicator/imp/ICorr.h +3 -0
- hikyuu/include/hikyuu/indicator/imp/ICos.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/ICost.h +0 -2
- hikyuu/include/hikyuu/indicator/imp/ICount.h +2 -1
- hikyuu/include/hikyuu/indicator/imp/ICval.h +1 -4
- hikyuu/include/hikyuu/indicator/imp/ICycle.h +0 -2
- hikyuu/include/hikyuu/indicator/imp/IDecline.h +3 -0
- hikyuu/include/hikyuu/indicator/imp/IDevsq.h +4 -1
- hikyuu/include/hikyuu/indicator/imp/IDiff.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IDma.h +2 -0
- hikyuu/include/hikyuu/indicator/imp/IDropna.h +0 -4
- hikyuu/include/hikyuu/indicator/imp/IEma.h +3 -1
- hikyuu/include/hikyuu/indicator/imp/IEvery.h +5 -1
- hikyuu/include/hikyuu/indicator/imp/IExist.h +5 -1
- hikyuu/include/hikyuu/indicator/imp/IExp.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IFilter.h +4 -5
- hikyuu/include/hikyuu/indicator/imp/IFinance.h +1 -2
- hikyuu/include/hikyuu/indicator/imp/IFloor.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IHhvbars.h +5 -1
- hikyuu/include/hikyuu/indicator/imp/IHighLine.h +5 -1
- hikyuu/include/hikyuu/indicator/imp/IHsl.h +0 -2
- hikyuu/include/hikyuu/indicator/imp/IIc.h +3 -6
- hikyuu/include/hikyuu/indicator/imp/IInBlock.h +1 -2
- hikyuu/include/hikyuu/indicator/imp/IIntpart.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IIsInf.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IIsInfa.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IIsLastBar.h +0 -1
- hikyuu/include/hikyuu/indicator/imp/IIsNa.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IJumpDown.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IJumpUp.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IKData.h +1 -2
- hikyuu/include/hikyuu/indicator/imp/ILiuTongPan.h +0 -2
- hikyuu/include/hikyuu/indicator/imp/ILn.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/ILog.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/ILowLine.h +5 -1
- hikyuu/include/hikyuu/indicator/imp/ILowLineBars.h +5 -1
- hikyuu/include/hikyuu/indicator/imp/IMa.h +6 -1
- hikyuu/include/hikyuu/indicator/imp/IMacd.h +2 -0
- hikyuu/include/hikyuu/indicator/imp/INot.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IPow.h +3 -1
- hikyuu/include/hikyuu/indicator/imp/IQuantileTrunc.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IRecover.h +3 -0
- hikyuu/include/hikyuu/indicator/imp/IRef.h +3 -1
- hikyuu/include/hikyuu/indicator/imp/IResult.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IReverse.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IRoc.h +6 -1
- hikyuu/include/hikyuu/indicator/imp/IRocp.h +5 -1
- hikyuu/include/hikyuu/indicator/imp/IRocr.h +5 -1
- hikyuu/include/hikyuu/indicator/imp/IRocr100.h +5 -1
- hikyuu/include/hikyuu/indicator/imp/IRound.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IRoundDown.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IRoundUp.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/ISaftyLoss.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/ISign.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/ISin.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/ISlope.h +5 -1
- hikyuu/include/hikyuu/indicator/imp/ISma.h +2 -0
- hikyuu/include/hikyuu/indicator/imp/ISpearman.h +3 -0
- hikyuu/include/hikyuu/indicator/imp/ISqrt.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/IStdev.h +5 -1
- hikyuu/include/hikyuu/indicator/imp/IStdp.h +5 -1
- hikyuu/include/hikyuu/indicator/imp/ISum.h +6 -1
- hikyuu/include/hikyuu/indicator/imp/ITan.h +1 -0
- hikyuu/include/hikyuu/indicator/imp/ITime.h +1 -2
- hikyuu/include/hikyuu/indicator/imp/ITimeLine.h +0 -2
- hikyuu/include/hikyuu/indicator/imp/ITr.h +1 -2
- hikyuu/include/hikyuu/indicator/imp/IVar.h +5 -1
- hikyuu/include/hikyuu/indicator/imp/IVarp.h +5 -1
- hikyuu/include/hikyuu/indicator/imp/IVigor.h +0 -2
- hikyuu/include/hikyuu/indicator/imp/IWma.h +5 -1
- hikyuu/include/hikyuu/indicator/imp/IZongGuBen.h +1 -2
- hikyuu/include/hikyuu/indicator_talib/imp/TaAdosc.h +0 -2
- hikyuu/include/hikyuu/indicator_talib/imp/TaSar.h +0 -2
- hikyuu/include/hikyuu/indicator_talib/imp/TaSarext.h +0 -4
- hikyuu/include/hikyuu/indicator_talib/imp/TaStoch.h +0 -3
- hikyuu/include/hikyuu/indicator_talib/imp/TaStochf.h +0 -2
- hikyuu/include/hikyuu/indicator_talib/imp/TaUltosc.h +0 -2
- hikyuu/include/hikyuu/indicator_talib/imp/ta_defines.h +2 -4
- hikyuu/include/hikyuu/indicator_talib/imp/ta_imp.h +70 -90
- hikyuu/include/hikyuu/plugin/extind.h +3 -0
- hikyuu/include/hikyuu/plugin/hkuextra.h +2 -0
- hikyuu/include/hikyuu/plugin/interface/HkuExtraPluginInterface.h +2 -0
- hikyuu/include/hikyuu/python/pybind_utils.h +22 -5
- hikyuu/include/hikyuu/trade_manage/TradeCostBase.h +5 -3
- hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +9 -3
- hikyuu/include/hikyuu/trade_sys/allocatefunds/AllocateFundsBase.h +8 -4
- hikyuu/include/hikyuu/trade_sys/condition/ConditionBase.h +5 -3
- hikyuu/include/hikyuu/trade_sys/environment/EnvironmentBase.h +6 -3
- hikyuu/include/hikyuu/trade_sys/moneymanager/MoneyManagerBase.h +5 -3
- hikyuu/include/hikyuu/trade_sys/multifactor/MultiFactorBase.h +23 -20
- hikyuu/include/hikyuu/trade_sys/multifactor/NormalizeBase.h +6 -4
- hikyuu/include/hikyuu/trade_sys/multifactor/ScoresFilterBase.h +5 -3
- hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_EqualWeight.h +3 -3
- hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_ICIRWeight.h +4 -4
- hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_ICWeight.h +4 -4
- hikyuu/include/hikyuu/trade_sys/multifactor/crt/MF_Weight.h +4 -4
- hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +16 -13
- hikyuu/include/hikyuu/trade_sys/profitgoal/ProfitGoalBase.h +4 -3
- hikyuu/include/hikyuu/trade_sys/selector/SelectorBase.h +12 -3
- hikyuu/include/hikyuu/trade_sys/selector/crt/SE_MultiFactor.h +1 -1
- hikyuu/include/hikyuu/trade_sys/selector/crt/SE_MultiFactor2.h +1 -1
- hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector.h +1 -0
- hikyuu/include/hikyuu/trade_sys/selector/imp/MultiFactorSelector2.h +1 -0
- hikyuu/include/hikyuu/trade_sys/selector/imp/optimal/OptimalSelectorBase.h +0 -2
- hikyuu/include/hikyuu/trade_sys/selector/imp/optimal/PerformanceOptimalSelector.h +0 -4
- hikyuu/include/hikyuu/trade_sys/signal/SignalBase.h +5 -3
- hikyuu/include/hikyuu/trade_sys/slippage/SlippageBase.h +5 -3
- hikyuu/include/hikyuu/trade_sys/stoploss/StoplossBase.h +5 -3
- hikyuu/include/hikyuu/trade_sys/system/System.h +6 -4
- hikyuu/include/hikyuu/utilities/LruCache.h +299 -0
- hikyuu/include/hikyuu/utilities/arithmetic.h +2 -2
- hikyuu/include/hikyuu/utilities/omp_macro.h +25 -0
- hikyuu/include/hikyuu/utilities/plugin/PluginManager.h +5 -0
- hikyuu/include/hikyuu/utilities/thread/GlobalStealThreadPool.h +72 -19
- hikyuu/include/hikyuu/utilities/thread/GlobalThreadPool.h +0 -4
- hikyuu/include/hikyuu/utilities/thread/MQStealThreadPool.h +1 -0
- hikyuu/include/hikyuu/utilities/thread/MQThreadPool.h +1 -0
- hikyuu/include/hikyuu/utilities/thread/StealThreadPool.h +1 -0
- hikyuu/include/hikyuu/utilities/thread/ThreadPool.h +1 -4
- hikyuu/include/hikyuu/utilities/thread/algorithm.h +286 -0
- hikyuu/include/hikyuu/version.h +4 -4
- hikyuu/plugin/backtest.dll +0 -0
- hikyuu/plugin/checkdata.dll +0 -0
- hikyuu/plugin/clickhousedriver.dll +0 -0
- hikyuu/plugin/dataserver.dll +0 -0
- hikyuu/plugin/dataserver_parquet.dll +0 -0
- hikyuu/plugin/device.dll +0 -0
- hikyuu/plugin/extind.dll +0 -0
- hikyuu/plugin/hkuextra.dll +0 -0
- hikyuu/plugin/import2ch.dll +0 -0
- hikyuu/plugin/import2hdf5.dll +0 -0
- hikyuu/plugin/import2mysql.dll +0 -0
- hikyuu/plugin/tmreport.dll +0 -0
- hikyuu/test/Indicator.py +1 -2
- hikyuu/trade_manage/__init__.pyi +7 -5
- hikyuu/trade_manage/trade.pyi +7 -5
- hikyuu/util/singleton.pyi +1 -1
- {hikyuu-2.7.2.dist-info → hikyuu-2.7.5.dist-info}/METADATA +2 -13
- {hikyuu-2.7.2.dist-info → hikyuu-2.7.5.dist-info}/RECORD +232 -225
- {hikyuu-2.7.2.dist-info → hikyuu-2.7.5.dist-info}/WHEEL +1 -1
- {hikyuu-2.7.2.dist-info → hikyuu-2.7.5.dist-info}/entry_points.txt +0 -0
- {hikyuu-2.7.2.dist-info → hikyuu-2.7.5.dist-info}/top_level.txt +0 -0
|
@@ -94,8 +94,10 @@ class UseTdxImportToH5Thread(QThread):
|
|
|
94
94
|
self.tasks.append(
|
|
95
95
|
ImportHistoryFinanceTask(self.log_queue, self.queue, self.config, dest_dir))
|
|
96
96
|
|
|
97
|
-
self.
|
|
98
|
-
|
|
97
|
+
if self.config.getboolean('block', 'enable', fallback=True):
|
|
98
|
+
self.tasks.append(ImportBlockInfoTask(self.log_queue, self.queue,
|
|
99
|
+
self.config)) # '概念板块', '地域板块',
|
|
100
|
+
|
|
99
101
|
self.tasks.append(ImportZhBond10Task(self.log_queue, self.queue, self.config))
|
|
100
102
|
|
|
101
103
|
task_count = 0
|
hikyuu/gui/start_qmt.py
CHANGED
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 0x2805900f220; 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 2805901dda0>
|
|
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 0x2805900fca0; 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 2805904eb10>
|
|
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 0x280590607f0; 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 2805904f970>
|
|
154
154
|
def __init__(self, **kwargs):
|
|
155
155
|
"""
|
|
156
156
|
A simple constructor that allows initialization from kwargs.
|
hikyuu/include/hikyuu/Block.h
CHANGED
|
@@ -43,29 +43,29 @@ public:
|
|
|
43
43
|
return iter;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
bool isNull() const {
|
|
46
|
+
bool isNull() const noexcept {
|
|
47
47
|
return !m_data;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
uint64_t id() const {
|
|
50
|
+
uint64_t id() const noexcept {
|
|
51
51
|
return m_data ? (uint64_t)m_data.get() : 0;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
bool operator==(const Block& blk) const {
|
|
54
|
+
bool operator==(const Block& blk) const noexcept {
|
|
55
55
|
return m_data == blk.m_data;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
bool operator!=(const Block& blk) const {
|
|
58
|
+
bool operator!=(const Block& blk) const noexcept {
|
|
59
59
|
return m_data != blk.m_data;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/** 获取板块类别 */
|
|
63
|
-
string category() const {
|
|
63
|
+
string category() const noexcept {
|
|
64
64
|
return m_data ? m_data->m_category : "";
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
/** 获取板块名称 */
|
|
68
|
-
string name() const {
|
|
68
|
+
string name() const noexcept {
|
|
69
69
|
return m_data ? m_data->m_name : "";
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -130,12 +130,12 @@ public:
|
|
|
130
130
|
bool remove(const Stock& stock);
|
|
131
131
|
|
|
132
132
|
/** 包含的证券数量 */
|
|
133
|
-
size_t size() const {
|
|
133
|
+
size_t size() const noexcept {
|
|
134
134
|
return m_data ? m_data->m_stockDict.size() : 0;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
/** 是否为空 */
|
|
138
|
-
bool empty() const {
|
|
138
|
+
bool empty() const noexcept {
|
|
139
139
|
return size() ? false : true;
|
|
140
140
|
}
|
|
141
141
|
|
|
@@ -146,7 +146,7 @@ public:
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
/** 获取对应的指数,可能为空 Stock */
|
|
149
|
-
Stock getIndexStock() const {
|
|
149
|
+
Stock getIndexStock() const noexcept {
|
|
150
150
|
return m_data ? m_data->m_indexStock : Stock();
|
|
151
151
|
}
|
|
152
152
|
|
|
@@ -23,13 +23,13 @@ struct HKU_API HistoryFinanceInfo {
|
|
|
23
23
|
|
|
24
24
|
HistoryFinanceInfo() = default;
|
|
25
25
|
HistoryFinanceInfo(const HistoryFinanceInfo&) = default;
|
|
26
|
-
HistoryFinanceInfo(HistoryFinanceInfo&& rv)
|
|
26
|
+
HistoryFinanceInfo(HistoryFinanceInfo&& rv) noexcept
|
|
27
27
|
: fileDate(std::move(rv.fileDate)),
|
|
28
28
|
reportDate(std::move(rv.reportDate)),
|
|
29
29
|
values(std::move(rv.values)) {}
|
|
30
30
|
|
|
31
|
-
HistoryFinanceInfo& operator=(const HistoryFinanceInfo&);
|
|
32
|
-
HistoryFinanceInfo& operator=(HistoryFinanceInfo&&);
|
|
31
|
+
HistoryFinanceInfo& operator=(const HistoryFinanceInfo&) noexcept;
|
|
32
|
+
HistoryFinanceInfo& operator=(HistoryFinanceInfo&&) noexcept;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
} // namespace hku
|
hikyuu/include/hikyuu/KData.h
CHANGED
|
@@ -22,33 +22,34 @@ class HKU_API Indicator;
|
|
|
22
22
|
class HKU_API KData {
|
|
23
23
|
public:
|
|
24
24
|
KData();
|
|
25
|
-
KData(const KData&);
|
|
25
|
+
KData(const KData&) noexcept;
|
|
26
26
|
KData(const Stock& stock, const KQuery& query);
|
|
27
|
+
explicit KData(KDataImpPtr imp);
|
|
27
28
|
virtual ~KData() {}
|
|
28
29
|
|
|
29
|
-
KData& operator=(const KData&);
|
|
30
|
+
KData& operator=(const KData&) noexcept;
|
|
30
31
|
|
|
31
32
|
// 移动语义对 KData 没有实际用处,而且会导致 KData 可能存在空 imp 的情况
|
|
32
33
|
// 主要是 boost::any_cast 需要,予以保留,但使用时不要到 KData 执行 std::move
|
|
33
34
|
KData(KData&&);
|
|
34
35
|
KData& operator=(KData&&);
|
|
35
36
|
|
|
36
|
-
size_t size() const;
|
|
37
|
-
bool empty() const;
|
|
37
|
+
size_t size() const noexcept;
|
|
38
|
+
bool empty() const noexcept;
|
|
38
39
|
|
|
39
|
-
bool operator==(const KData&) const;
|
|
40
|
-
bool operator!=(const KData&) const;
|
|
40
|
+
bool operator==(const KData&) const noexcept;
|
|
41
|
+
bool operator!=(const KData&) const noexcept;
|
|
41
42
|
|
|
42
43
|
DatetimeList getDatetimeList() const;
|
|
43
44
|
|
|
44
45
|
/** 获取指定位置的KRecord,未作越界检查 */
|
|
45
|
-
const KRecord& getKRecord(size_t pos) const;
|
|
46
|
+
const KRecord& getKRecord(size_t pos) const noexcept;
|
|
46
47
|
|
|
47
48
|
/** 按日期查询KRecord */
|
|
48
|
-
const KRecord& getKRecord(Datetime datetime) const;
|
|
49
|
+
const KRecord& getKRecord(Datetime datetime) const noexcept;
|
|
49
50
|
|
|
50
51
|
/** 同getKRecord @see getKRecord */
|
|
51
|
-
const KRecord& operator[](size_t pos) const {
|
|
52
|
+
const KRecord& operator[](size_t pos) const noexcept {
|
|
52
53
|
return getKRecord(pos);
|
|
53
54
|
}
|
|
54
55
|
|
|
@@ -68,6 +69,8 @@ public:
|
|
|
68
69
|
*/
|
|
69
70
|
KData getKData(const Datetime& start, const Datetime& end) const;
|
|
70
71
|
|
|
72
|
+
KData getKData(const KQuery& query) const;
|
|
73
|
+
|
|
71
74
|
/**
|
|
72
75
|
* 获取相同时间范围内的其他类型K线数据,如日线下对应的分钟线数据
|
|
73
76
|
* @param ktype
|
|
@@ -81,10 +84,25 @@ public:
|
|
|
81
84
|
* @param end 结束索引
|
|
82
85
|
* @return KData
|
|
83
86
|
*/
|
|
84
|
-
KData
|
|
87
|
+
KData getSubKData(int64_t start, int64_t end = Null<int64_t>()) const;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* 特殊用途!谨慎!按当前K线范围,获取指定日期范围的其他类型的按日期查询的 Query 条件
|
|
91
|
+
* @note
|
|
92
|
+
* 1. 指定日期范围必须在当前K线数据范围内,否则截断在 K 线范围内
|
|
93
|
+
* 2. start_datetime/end_datetime 的精度应和当前 KData 一致
|
|
94
|
+
* 3. 如果原截止条件为 Null<Datetime>()且未指定end_datetime, 则返回的查询条件为
|
|
95
|
+
* Null<Datetime>()
|
|
96
|
+
* @param start_datetime
|
|
97
|
+
* @param end_datetime
|
|
98
|
+
* @param ktype
|
|
99
|
+
* @return KData
|
|
100
|
+
*/
|
|
101
|
+
KQuery getOtherQueryByDate(const Datetime& start_datetime, const Datetime& end_datetime,
|
|
102
|
+
const KQuery::KType& ktype) const;
|
|
85
103
|
|
|
86
104
|
/** 按日期查询对应的索引位置,注:是 KData 中的位置,不是在 Stock 中原始K记录的位置 */
|
|
87
|
-
size_t getPos(const Datetime& datetime) const;
|
|
105
|
+
size_t getPos(const Datetime& datetime) const noexcept;
|
|
88
106
|
|
|
89
107
|
/** 按日期获取在原始 K 线记录中的位置 */
|
|
90
108
|
size_t getPosInStock(Datetime datetime) const;
|
|
@@ -128,8 +146,10 @@ public:
|
|
|
128
146
|
Indicator amo() const;
|
|
129
147
|
|
|
130
148
|
public:
|
|
131
|
-
const KRecord* data() const;
|
|
132
|
-
KRecord* data(); // 谨慎使用(用于强制调整数据)
|
|
149
|
+
const KRecord* data() const noexcept;
|
|
150
|
+
KRecord* data() noexcept; // 谨慎使用(用于强制调整数据)
|
|
151
|
+
|
|
152
|
+
KDataImpPtr getImp() const noexcept;
|
|
133
153
|
|
|
134
154
|
// 常量迭代器定义
|
|
135
155
|
class const_iterator {
|
|
@@ -192,7 +212,8 @@ public:
|
|
|
192
212
|
|
|
193
213
|
private:
|
|
194
214
|
std::shared_ptr<KDataImp>& get_null_kdata_imp() {
|
|
195
|
-
static std::shared_ptr<KDataImp> instance =
|
|
215
|
+
static std::shared_ptr<KDataImp> instance =
|
|
216
|
+
std::make_shared<KDataImp>(); // 第一次调用时初始化
|
|
196
217
|
return instance;
|
|
197
218
|
}
|
|
198
219
|
|
|
@@ -249,22 +270,20 @@ KData HKU_API getKData(const string& market_code, int64_t start = 0, int64_t end
|
|
|
249
270
|
const KQuery::KType& ktype = KQuery::DAY,
|
|
250
271
|
KQuery::RecoverType recoverType = KQuery::NO_RECOVER);
|
|
251
272
|
|
|
252
|
-
inline KData::KData(const KData& x) : m_imp(x.m_imp) {}
|
|
273
|
+
inline KData::KData(const KData& x) noexcept : m_imp(x.m_imp) {}
|
|
253
274
|
|
|
254
275
|
inline KData::KData(KData&& x) : m_imp(std::move(x.m_imp)) {
|
|
255
276
|
x.m_imp = get_null_kdata_imp();
|
|
256
277
|
}
|
|
257
278
|
|
|
258
|
-
inline KData& KData::operator=(const KData& x) {
|
|
259
|
-
|
|
260
|
-
return *this;
|
|
279
|
+
inline KData& KData::operator=(const KData& x) noexcept {
|
|
280
|
+
HKU_IF_RETURN(this == &x, *this);
|
|
261
281
|
m_imp = x.m_imp;
|
|
262
282
|
return *this;
|
|
263
283
|
}
|
|
264
284
|
|
|
265
285
|
inline KData& KData::operator=(KData&& x) {
|
|
266
|
-
|
|
267
|
-
return *this;
|
|
286
|
+
HKU_IF_RETURN(this == &x, *this);
|
|
268
287
|
m_imp = std::move(x.m_imp);
|
|
269
288
|
x.m_imp = get_null_kdata_imp();
|
|
270
289
|
return *this;
|
|
@@ -274,24 +293,24 @@ inline DatetimeList KData::getDatetimeList() const {
|
|
|
274
293
|
return m_imp->getDatetimeList();
|
|
275
294
|
}
|
|
276
295
|
|
|
277
|
-
inline const KRecord& KData::getKRecord(size_t pos) const {
|
|
296
|
+
inline const KRecord& KData::getKRecord(size_t pos) const noexcept {
|
|
278
297
|
return m_imp->getKRecord(pos); // 不会抛出异常
|
|
279
298
|
}
|
|
280
299
|
|
|
281
|
-
inline const KRecord& KData::getKRecord(Datetime datetime) const {
|
|
300
|
+
inline const KRecord& KData::getKRecord(Datetime datetime) const noexcept {
|
|
282
301
|
size_t pos = getPos(datetime);
|
|
283
302
|
return pos != Null<size_t>() ? getKRecord(pos) : KRecord::NullKRecord;
|
|
284
303
|
}
|
|
285
304
|
|
|
286
|
-
inline size_t KData::getPos(const Datetime& datetime) const {
|
|
305
|
+
inline size_t KData::getPos(const Datetime& datetime) const noexcept {
|
|
287
306
|
return m_imp->getPos(datetime);
|
|
288
307
|
}
|
|
289
308
|
|
|
290
|
-
inline size_t KData::size() const {
|
|
309
|
+
inline size_t KData::size() const noexcept {
|
|
291
310
|
return m_imp->size();
|
|
292
311
|
}
|
|
293
312
|
|
|
294
|
-
inline bool KData::empty() const {
|
|
313
|
+
inline bool KData::empty() const noexcept {
|
|
295
314
|
return m_imp->empty();
|
|
296
315
|
}
|
|
297
316
|
|
|
@@ -323,18 +342,22 @@ inline size_t KData::lastPos() const {
|
|
|
323
342
|
return m_imp->lastPos();
|
|
324
343
|
}
|
|
325
344
|
|
|
326
|
-
inline bool KData::operator!=(const KData& other) const {
|
|
345
|
+
inline bool KData::operator!=(const KData& other) const noexcept {
|
|
327
346
|
return !(*this == other);
|
|
328
347
|
}
|
|
329
348
|
|
|
330
|
-
inline const KRecord* KData::data() const {
|
|
349
|
+
inline const KRecord* KData::data() const noexcept {
|
|
331
350
|
return m_imp->data();
|
|
332
351
|
}
|
|
333
352
|
|
|
334
|
-
inline KRecord* KData::data() {
|
|
353
|
+
inline KRecord* KData::data() noexcept {
|
|
335
354
|
return m_imp->data();
|
|
336
355
|
}
|
|
337
356
|
|
|
357
|
+
inline KDataImpPtr KData::getImp() const noexcept {
|
|
358
|
+
return m_imp;
|
|
359
|
+
}
|
|
360
|
+
|
|
338
361
|
} /* namespace hku */
|
|
339
362
|
|
|
340
363
|
#if FMT_VERSION >= 90000
|
hikyuu/include/hikyuu/KDataImp.h
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
namespace hku {
|
|
13
13
|
|
|
14
|
-
class HKU_API KDataImp {
|
|
14
|
+
class HKU_API KDataImp : public enable_shared_from_this<KDataImp> {
|
|
15
15
|
public:
|
|
16
16
|
KDataImp() = default;
|
|
17
17
|
KDataImp(const Stock& stock, const KQuery& query);
|
|
@@ -25,11 +25,11 @@ public:
|
|
|
25
25
|
return m_stock;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
virtual bool empty() const {
|
|
28
|
+
virtual bool empty() const noexcept {
|
|
29
29
|
return true;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
virtual size_t size() const {
|
|
32
|
+
virtual size_t size() const noexcept {
|
|
33
33
|
return 0;
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -45,11 +45,11 @@ public:
|
|
|
45
45
|
return 0;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
virtual size_t getPos(const Datetime& datetime) const {
|
|
48
|
+
virtual size_t getPos(const Datetime& datetime) const noexcept {
|
|
49
49
|
return Null<size_t>();
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
virtual const KRecord& getKRecord(size_t pos) const {
|
|
52
|
+
virtual const KRecord& getKRecord(size_t pos) const noexcept {
|
|
53
53
|
return KRecord::NullKRecord;
|
|
54
54
|
}
|
|
55
55
|
|
|
@@ -61,11 +61,11 @@ public:
|
|
|
61
61
|
return KRecord::NullKRecord;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
virtual const KRecord* data() const {
|
|
64
|
+
virtual const KRecord* data() const noexcept {
|
|
65
65
|
return nullptr;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
virtual KRecord* data() {
|
|
68
|
+
virtual KRecord* data() noexcept {
|
|
69
69
|
return nullptr;
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -73,6 +73,11 @@ public:
|
|
|
73
73
|
return DatetimeList();
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
typedef shared_ptr<KDataImp> KDataImpPtr;
|
|
77
|
+
virtual KDataImpPtr getOtherFromSelf(const KQuery& query) const {
|
|
78
|
+
return std::make_shared<KDataImp>(m_stock, query);
|
|
79
|
+
}
|
|
80
|
+
|
|
76
81
|
protected:
|
|
77
82
|
KQuery m_query;
|
|
78
83
|
Stock m_stock;
|
|
@@ -17,11 +17,11 @@ public:
|
|
|
17
17
|
KDataPrivatedBufferImp(const Stock& stock, const KQuery& query);
|
|
18
18
|
virtual ~KDataPrivatedBufferImp() override;
|
|
19
19
|
|
|
20
|
-
virtual bool empty() const override {
|
|
20
|
+
virtual bool empty() const noexcept override {
|
|
21
21
|
return m_buffer.empty();
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
virtual size_t size() const override {
|
|
24
|
+
virtual size_t size() const noexcept override {
|
|
25
25
|
return m_buffer.size();
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -29,9 +29,9 @@ public:
|
|
|
29
29
|
virtual size_t endPos() const override;
|
|
30
30
|
virtual size_t lastPos() const override;
|
|
31
31
|
|
|
32
|
-
virtual size_t getPos(const Datetime& datetime) const override;
|
|
32
|
+
virtual size_t getPos(const Datetime& datetime) const noexcept override;
|
|
33
33
|
|
|
34
|
-
virtual const KRecord& getKRecord(size_t pos) const override {
|
|
34
|
+
virtual const KRecord& getKRecord(size_t pos) const noexcept override {
|
|
35
35
|
return m_buffer[pos];
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -43,24 +43,30 @@ public:
|
|
|
43
43
|
return m_buffer.back();
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
virtual const KRecord* data() const override {
|
|
46
|
+
virtual const KRecord* data() const noexcept override {
|
|
47
47
|
return m_buffer.data();
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
virtual KRecord* data() override {
|
|
50
|
+
virtual KRecord* data() noexcept override {
|
|
51
51
|
return m_buffer.data();
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
virtual DatetimeList getDatetimeList() const override;
|
|
55
55
|
|
|
56
|
+
virtual KDataImpPtr getOtherFromSelf(const KQuery& query) const override;
|
|
57
|
+
|
|
56
58
|
private:
|
|
57
59
|
void _getPosInStock() const;
|
|
60
|
+
void _recover();
|
|
58
61
|
void _recoverForward();
|
|
59
62
|
void _recoverBackward();
|
|
60
63
|
void _recoverEqualForward();
|
|
61
64
|
void _recoverEqualBackward();
|
|
62
65
|
void _recoverForUpDay();
|
|
63
66
|
|
|
67
|
+
KDataImpPtr _getOtherFromSelfByIndex(const KQuery& query) const;
|
|
68
|
+
KDataImpPtr _getOtherFromSelfByDate(const KQuery& query) const;
|
|
69
|
+
|
|
64
70
|
private:
|
|
65
71
|
KRecordList m_buffer;
|
|
66
72
|
mutable size_t m_start{0};
|
|
@@ -68,6 +74,6 @@ private:
|
|
|
68
74
|
mutable bool m_have_pos_in_stock{false};
|
|
69
75
|
};
|
|
70
76
|
|
|
71
|
-
typedef shared_ptr<KDataPrivatedBufferImp> KDataPrivatedBufferImpPtr;
|
|
77
|
+
// typedef shared_ptr<KDataPrivatedBufferImp> KDataPrivatedBufferImpPtr;
|
|
72
78
|
|
|
73
79
|
} /* namespace hku */
|
|
@@ -17,11 +17,11 @@ public:
|
|
|
17
17
|
KDataSharedBufferImp(const Stock& stock, const KQuery& query);
|
|
18
18
|
virtual ~KDataSharedBufferImp() override;
|
|
19
19
|
|
|
20
|
-
virtual bool empty() const override {
|
|
20
|
+
virtual bool empty() const noexcept override {
|
|
21
21
|
return m_size == 0;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
virtual size_t size() const override {
|
|
24
|
+
virtual size_t size() const noexcept override {
|
|
25
25
|
return m_size;
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -37,9 +37,9 @@ public:
|
|
|
37
37
|
return m_end == 0 ? 0 : m_end - 1;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
virtual size_t getPos(const Datetime& datetime) const override;
|
|
40
|
+
virtual size_t getPos(const Datetime& datetime) const noexcept override;
|
|
41
41
|
|
|
42
|
-
virtual const KRecord& getKRecord(size_t pos) const override;
|
|
42
|
+
virtual const KRecord& getKRecord(size_t pos) const noexcept override;
|
|
43
43
|
|
|
44
44
|
virtual const KRecord& front() const override {
|
|
45
45
|
return m_data[0];
|
|
@@ -49,16 +49,18 @@ public:
|
|
|
49
49
|
return m_data[m_size - 1];
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
virtual const KRecord* data() const override {
|
|
52
|
+
virtual const KRecord* data() const noexcept override {
|
|
53
53
|
return m_data;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
virtual KRecord* data() override {
|
|
56
|
+
virtual KRecord* data() noexcept override {
|
|
57
57
|
return m_data;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
virtual DatetimeList getDatetimeList() const override;
|
|
61
61
|
|
|
62
|
+
virtual KDataImpPtr getOtherFromSelf(const KQuery& query) const override;
|
|
63
|
+
|
|
62
64
|
private:
|
|
63
65
|
size_t m_start{0};
|
|
64
66
|
size_t m_end{0};
|
hikyuu/include/hikyuu/KQuery.h
CHANGED
|
@@ -58,20 +58,20 @@ public:
|
|
|
58
58
|
static bool isValidKType(const string& ktype);
|
|
59
59
|
|
|
60
60
|
/** 判断是否为有效 ktype */
|
|
61
|
-
static bool isBaseKType(const string& ktype);
|
|
61
|
+
static bool isBaseKType(const string& ktype) noexcept;
|
|
62
62
|
|
|
63
63
|
/** 判断是否为扩展 ktype */
|
|
64
64
|
static bool isExtraKType(const string& ktype);
|
|
65
65
|
|
|
66
66
|
/** 获取所有的 KType */
|
|
67
|
-
static vector<KType> getBaseKTypeList();
|
|
67
|
+
static vector<KType> getBaseKTypeList() noexcept;
|
|
68
68
|
|
|
69
69
|
/** 获取所有扩展 KType */
|
|
70
70
|
static vector<KType> getExtraKTypeList();
|
|
71
71
|
|
|
72
72
|
static int32_t getKTypeInMin(const KType& ktype);
|
|
73
73
|
|
|
74
|
-
static int32_t getBaseKTypeInMin(const KType& ktype);
|
|
74
|
+
static int32_t getBaseKTypeInMin(const KType& ktype) noexcept;
|
|
75
75
|
|
|
76
76
|
static int64_t getKTypeInSeconds(const KType& ktype);
|
|
77
77
|
|
|
@@ -129,14 +129,14 @@ public:
|
|
|
129
129
|
/**
|
|
130
130
|
* 按索引方式查询时,返回指定的起始索引,否则返回Null<int64_t>()
|
|
131
131
|
*/
|
|
132
|
-
int64_t start() const {
|
|
132
|
+
int64_t start() const noexcept {
|
|
133
133
|
return m_queryType != INDEX ? Null<int64_t>() : m_start;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
/**
|
|
137
137
|
* 按索引方式查询时,返回指定的结束索引,否则返回Null<int64_t>()
|
|
138
138
|
*/
|
|
139
|
-
int64_t end() const {
|
|
139
|
+
int64_t end() const noexcept {
|
|
140
140
|
return m_queryType != INDEX ? Null<int64_t>() : m_end;
|
|
141
141
|
}
|
|
142
142
|
|
|
@@ -151,23 +151,23 @@ public:
|
|
|
151
151
|
Datetime endDatetime() const;
|
|
152
152
|
|
|
153
153
|
/** 获取查询条件类型 */
|
|
154
|
-
QueryType queryType() const {
|
|
154
|
+
QueryType queryType() const noexcept {
|
|
155
155
|
return m_queryType;
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
/** 获取K线数据类型 */
|
|
159
159
|
// KType kType() const { return m_dataType; }
|
|
160
|
-
const string& kType() const {
|
|
160
|
+
const string& kType() const noexcept {
|
|
161
161
|
return m_dataType;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
/** 获取复权类型 */
|
|
165
|
-
RecoverType recoverType() const {
|
|
165
|
+
RecoverType recoverType() const noexcept {
|
|
166
166
|
return m_recoverType;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
/** 设置复权类型 */
|
|
170
|
-
void recoverType(RecoverType recoverType) {
|
|
170
|
+
void recoverType(RecoverType recoverType) noexcept {
|
|
171
171
|
m_recoverType = recoverType;
|
|
172
172
|
}
|
|
173
173
|
|
|
@@ -261,8 +261,8 @@ HKU_API std::ostream& operator<<(std::ostream& os, const KQuery& query);
|
|
|
261
261
|
// 关系比较函数, 不直接在类中定义是为了支持 Null<>() == d,Null可以放在左边
|
|
262
262
|
//
|
|
263
263
|
///////////////////////////////////////////////////////////////////////////////
|
|
264
|
-
bool HKU_API operator==(const KQuery&, const KQuery&);
|
|
265
|
-
bool HKU_API operator!=(const KQuery&, const KQuery&);
|
|
264
|
+
bool HKU_API operator==(const KQuery&, const KQuery&) noexcept;
|
|
265
|
+
bool HKU_API operator!=(const KQuery&, const KQuery&) noexcept;
|
|
266
266
|
|
|
267
267
|
/**
|
|
268
268
|
* 提供KQuery的Null值
|
hikyuu/include/hikyuu/KRecord.h
CHANGED
|
@@ -40,51 +40,51 @@ public:
|
|
|
40
40
|
MarketInfo(const MarketInfo&) = default;
|
|
41
41
|
MarketInfo& operator=(const MarketInfo&) = default;
|
|
42
42
|
|
|
43
|
-
MarketInfo(MarketInfo&&);
|
|
43
|
+
MarketInfo(MarketInfo&&) noexcept;
|
|
44
44
|
MarketInfo& operator=(MarketInfo&&) noexcept;
|
|
45
45
|
|
|
46
46
|
/** 获取市场简称 */
|
|
47
|
-
const string& market() const {
|
|
47
|
+
const string& market() const noexcept {
|
|
48
48
|
return m_market;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
/** 获取市场名称 */
|
|
52
|
-
const string& name() const {
|
|
52
|
+
const string& name() const noexcept {
|
|
53
53
|
return m_name;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/** 获取市场描述 */
|
|
57
|
-
const string& description() const {
|
|
57
|
+
const string& description() const noexcept {
|
|
58
58
|
return m_description;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
/** 获取该市场对应的指数代码 */
|
|
62
|
-
const string& code() const {
|
|
62
|
+
const string& code() const noexcept {
|
|
63
63
|
return m_code;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/** 获取市场数据的最后更新日期 */
|
|
67
|
-
Datetime lastDate() const {
|
|
67
|
+
Datetime lastDate() const noexcept {
|
|
68
68
|
return m_lastDate;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/** 开市时间1 */
|
|
72
|
-
TimeDelta openTime1() const {
|
|
72
|
+
TimeDelta openTime1() const noexcept {
|
|
73
73
|
return m_openTime1;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/** 闭市时间1 */
|
|
77
|
-
TimeDelta closeTime1() const {
|
|
77
|
+
TimeDelta closeTime1() const noexcept {
|
|
78
78
|
return m_closeTime1;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/** 开市时间2 */
|
|
82
|
-
TimeDelta openTime2() const {
|
|
82
|
+
TimeDelta openTime2() const noexcept {
|
|
83
83
|
return m_openTime2;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
/** 闭市时间2 */
|
|
87
|
-
TimeDelta closeTime2() const {
|
|
87
|
+
TimeDelta closeTime2() const noexcept {
|
|
88
88
|
return m_closeTime2;
|
|
89
89
|
}
|
|
90
90
|
|