hikyuu 2.7.3__py3-none-manylinux2014_aarch64.whl → 2.7.5__py3-none-manylinux2014_aarch64.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 +3 -1
- hikyuu/__init__.pyi +11 -10
- hikyuu/analysis/__init__.pyi +1 -0
- hikyuu/analysis/analysis.pyi +2 -1
- hikyuu/core.pyi +3 -2
- hikyuu/cpp/core310.pyi +80 -46
- hikyuu/cpp/core310.so +0 -0
- hikyuu/cpp/core311.pyi +80 -46
- hikyuu/cpp/core311.so +0 -0
- hikyuu/cpp/core312.pyi +80 -46
- hikyuu/cpp/core312.so +0 -0
- hikyuu/cpp/core313.pyi +80 -46
- hikyuu/cpp/core313.so +0 -0
- hikyuu/cpp/libhikyuu.so +0 -0
- hikyuu/cpp/libmimalloc.so +0 -0
- hikyuu/cpp/libmimalloc.so.3 +0 -0
- hikyuu/cpp/libmimalloc.so.3.1 +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 +1 -1
- 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/draw/__init__.pyi +1 -1
- hikyuu/draw/drawplot/__init__.pyi +1 -1
- hikyuu/draw/drawplot/bokeh_draw.pyi +6 -5
- hikyuu/draw/drawplot/echarts_draw.pyi +6 -5
- hikyuu/draw/drawplot/matplotlib_draw.py +19 -11
- hikyuu/draw/drawplot/matplotlib_draw.pyi +6 -5
- 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 +3 -2
- 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 +11 -10
- 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/BlockInfoDriver.h +6 -0
- hikyuu/include/hikyuu/data_driver/KDataDriver.h +4 -3
- 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/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 -2
- hikyuu/include/hikyuu/trade_sys/allocatefunds/AllocateFundsBase.h +8 -3
- hikyuu/include/hikyuu/trade_sys/condition/ConditionBase.h +5 -2
- hikyuu/include/hikyuu/trade_sys/environment/EnvironmentBase.h +6 -2
- hikyuu/include/hikyuu/trade_sys/moneymanager/MoneyManagerBase.h +5 -2
- hikyuu/include/hikyuu/trade_sys/multifactor/MultiFactorBase.h +23 -19
- hikyuu/include/hikyuu/trade_sys/multifactor/NormalizeBase.h +6 -3
- hikyuu/include/hikyuu/trade_sys/multifactor/ScoresFilterBase.h +5 -2
- 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 +5 -2
- hikyuu/include/hikyuu/trade_sys/profitgoal/ProfitGoalBase.h +4 -2
- hikyuu/include/hikyuu/trade_sys/selector/SelectorBase.h +12 -2
- 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 -2
- hikyuu/include/hikyuu/trade_sys/slippage/SlippageBase.h +5 -2
- hikyuu/include/hikyuu/trade_sys/stoploss/StoplossBase.h +5 -2
- hikyuu/include/hikyuu/trade_sys/system/System.h +5 -2
- 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/ThreadPool.h +0 -4
- hikyuu/include/hikyuu/utilities/thread/algorithm.h +286 -0
- hikyuu/include/hikyuu/version.h +4 -4
- hikyuu/plugin/libbacktest.so +0 -0
- hikyuu/plugin/libcheckdata.so +0 -0
- hikyuu/plugin/libclickhousedriver.so +0 -0
- hikyuu/plugin/libdataserver.so +0 -0
- hikyuu/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/libimport2ch.so +0 -0
- hikyuu/plugin/libimport2hdf5.so +0 -0
- hikyuu/plugin/libimport2mysql.so +0 -0
- hikyuu/plugin/libtmreport.so +0 -0
- hikyuu/test/Indicator.py +1 -2
- hikyuu/trade_manage/__init__.pyi +5 -4
- hikyuu/trade_manage/trade.pyi +5 -4
- hikyuu/util/__init__.pyi +1 -1
- hikyuu/util/singleton.pyi +1 -1
- {hikyuu-2.7.3.dist-info → hikyuu-2.7.5.dist-info}/METADATA +1 -1
- {hikyuu-2.7.3.dist-info → hikyuu-2.7.5.dist-info}/RECORD +217 -209
- {hikyuu-2.7.3.dist-info → hikyuu-2.7.5.dist-info}/WHEEL +0 -0
- {hikyuu-2.7.3.dist-info → hikyuu-2.7.5.dist-info}/entry_points.txt +0 -0
- {hikyuu-2.7.3.dist-info → hikyuu-2.7.5.dist-info}/top_level.txt +0 -0
hikyuu/extend.pyi
CHANGED
|
@@ -507,8 +507,8 @@ from hikyuu.cpp.core310 import __add__ as __old_Datetime_add__
|
|
|
507
507
|
from hikyuu.cpp.core310 import __init__ as __old_TimeDelta_init__
|
|
508
508
|
from hikyuu.cpp.core310 import __init__ as old_Query_init
|
|
509
509
|
from hikyuu.cpp.core310 import __init__ as __old_Datetime_init__
|
|
510
|
-
from hikyuu.cpp.core310 import __sub__ as __old_Datetime_sub__
|
|
511
510
|
from hikyuu.cpp.core310 import __sub__ as __old_TimeDelta_sub__
|
|
511
|
+
from hikyuu.cpp.core310 import __sub__ as __old_Datetime_sub__
|
|
512
512
|
from hikyuu.cpp.core310 import active_device
|
|
513
513
|
from hikyuu.cpp.core310 import backtest
|
|
514
514
|
from hikyuu.cpp.core310 import batch_calculate_inds
|
|
@@ -526,6 +526,7 @@ from hikyuu.cpp.core310 import crt_pf_strategy
|
|
|
526
526
|
from hikyuu.cpp.core310 import crt_sys_strategy
|
|
527
527
|
from hikyuu.cpp.core310 import dates_to_np
|
|
528
528
|
from hikyuu.cpp.core310 import df_to_krecords
|
|
529
|
+
from hikyuu.cpp.core310 import enable_kdata_cache
|
|
529
530
|
from hikyuu.cpp.core310 import fetch_trial_license
|
|
530
531
|
from hikyuu.cpp.core310 import find_optimal_system
|
|
531
532
|
from hikyuu.cpp.core310 import find_optimal_system_multi
|
|
@@ -594,7 +595,7 @@ import numpy as np
|
|
|
594
595
|
import os as os
|
|
595
596
|
import pandas as pd
|
|
596
597
|
import sys as sys
|
|
597
|
-
__all__: list[str] = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', 'AF_FixedAmount', 'AF_FixedWeight', 'AF_FixedWeightList', 'AF_MultiFactor', 'AGG_COUNT', 'AGG_FUNC', 'AGG_MAD', 'AGG_MAX', 'AGG_MEAN', 'AGG_MEDIAN', 'AGG_MIN', 'AGG_PROD', 'AGG_QUANTILE', 'AGG_STD', 'AGG_SUM', 'AGG_VAR', 'AGG_VWAP', 'ALIGN', 'AMA', 'ASIN', 'ATAN', 'ATR', 'AVEDEV', 'AllocateFundsBase', 'BACKSET', 'BARSCOUNT', 'BARSLAST', 'BARSLASTCOUNT', 'BARSSINCE', 'BARSSINCEN', 'BETWEEN', 'BLOCKSETNUM', 'BUSINESS', 'Block', 'BlockInfoDriver', 'BorrowRecord', 'BrokerPositionRecord', 'CEILING', 'CN_Bool', 'CN_OPLine', 'CONTEXT', 'CONTEXT_K', 'CORR', 'COS', 'COST', 'COUNT', 'CROSS', 'CVAL', 'CYCLE', 'C_AMO', 'C_CLOSE', 'C_HIGH', 'C_KDATA', 'C_LOW', 'C_OPEN', 'C_VOL', 'ConditionBase', 'Constant', 'CostRecord', 'DATE', 'DAY', 'DEBUG', 'DECLINE', 'DEVSQ', 'DIFF', 'DISCARD', 'DMA', 'DOWNNDAY', 'DROPNA', 'DataDriverFactory', 'Datetime', 'DatetimeList', 'DatetimeList_to_df', 'DatetimeList_to_np', 'Datetime_date', 'Datetime_datetime', 'Days', 'EMA', 'ERROR', 'EVERY', 'EV_Bool', 'EV_TwoLine', 'EXIST', 'EXP', 'EnvironmentBase', 'FATAL', 'FILTER', 'FINANCE', 'FLOOR', 'FundsRecord', 'GROUP_COUNT', 'GROUP_FUNC', 'GROUP_MAX', 'GROUP_MEAN', 'GROUP_MIN', 'GROUP_PROD', 'GROUP_SUM', 'HHV', 'HHVBARS', 'HKUException', 'HOUR', 'HSL', 'Hours', 'IC', 'ICIR', 'IF', 'INBLOCK', 'INDEXA', 'INDEXADV', 'INDEXC', 'INDEXDEC', 'INDEXH', 'INDEXL', 'INDEXO', 'INDEXV', 'INFO', 'INSUM', 'INTPART', 'IR', 'ISINF', 'ISINFA', 'ISLASTBAR', 'ISNA', 'IndParam', 'Indicator', 'IndicatorImp', 'JUMPDOWN', 'JUMPUP', 'KALMAN', 'KDATA_PART', 'KData', 'KDataDriver', 'KDataToClickHouseImporter', 'KDataToHdf5Importer', 'KDataToMySQLImporter', 'KRecord', 'KRecordList', 'LAST', 'LASTVALUE', 'LIUTONGPAN', 'LLV', 'LLVBARS', 'LN', 'LOG', 'LOG_LEVEL', 'LONGCROSS', 'LoanRecord', 'MA', 'MACD', 'MAX', 'MDD', 'MF_EqualWeight', 'MF_ICIRWeight', 'MF_ICWeight', 'MF_Weight', 'MIN', 'MINUTE', 'MM_FixedCapital', 'MM_FixedCapitalFunds', 'MM_FixedCount', 'MM_FixedCountTps', 'MM_FixedPercent', 'MM_FixedRisk', 'MM_FixedUnits', 'MM_Nothing', 'MM_WilliamsFixedRisk', 'MOD', 'MONTH', 'MRR', 'MarketInfo', 'Microseconds', 'Milliseconds', 'Minutes', 'MoneyManagerBase', 'MultiFactorBase', 'NDAY', 'NORM_MinMax', 'NORM_NOTHING', 'NORM_Quantile', 'NORM_Quantile_Uniform', 'NORM_Zscore', 'NOT', 'NormalizeBase', 'OFF', 'OrderBrokerBase', 'PF_Simple', 'PF_WithoutAF', 'PG_FixedHoldDays', 'PG_FixedPercent', 'PG_NoGoal', 'POS', 'POW', 'PRICELIST', 'Parameter', 'Parameter_items', 'Parameter_iter', 'Parameter_keys', 'Parameter_to_dict', 'Performance', 'Portfolio', 'PositionRecord', 'PositionRecordList', 'ProfitGoalBase', 'QUANTILE_TRUNC', 'Query', 'RANK', 'RECOVER_BACKWARD', 'RECOVER_EQUAL_BACKWARD', 'RECOVER_EQUAL_FORWARD', 'RECOVER_FORWARD', 'REF', 'REFX', 'REPLACE', 'RESULT', 'REVERSE', 'ROC', 'ROCP', 'ROCR', 'ROCR100', 'ROUND', 'ROUNDDOWN', 'ROUNDUP', 'RSI', 'SAFTYLOSS', 'SCFilter_AmountLimit', 'SCFilter_Group', 'SCFilter_IgnoreNan', 'SCFilter_LessOrEqualValue', 'SCFilter_Price', 'SCFilter_TopN', 'SE_EvaluateOptimal', 'SE_Fixed', 'SE_MaxFundsOptimal', 'SE_MultiFactor', 'SE_MultiFactor2', 'SE_PerformanceOptimal', 'SE_Signal', 'SGN', 'SG_Add', 'SG_AllwaysBuy', 'SG_And', 'SG_Band', 'SG_Bool', 'SG_Buy', 'SG_Cross', 'SG_CrossGold', 'SG_Cycle', 'SG_Div', 'SG_Flex', 'SG_Mul', 'SG_OneSide', 'SG_Or', 'SG_Sell', 'SG_Single', 'SG_Single2', 'SG_Sub', 'SIN', 'SLICE', 'SLOPE', 'SMA', 'SPEARMAN', 'SP_FixedPercent', 'SP_FixedValue', 'SP_LogNormal', 'SP_Normal', 'SP_TruncNormal', 'SP_Uniform', 'SQRT', 'STDEV', 'STDP', 'ST_FixedPercent', 'ST_Indicator', 'ST_Saftyloss', 'SUM', 'SUMBARS', 'SYS_Simple', 'SYS_WalkForward', 'ScoreRecord', 'ScoreRecordList', 'ScoresFilterBase', 'Seconds', 'SelectorBase', 'SignalBase', 'SlippageBase', 'SpotRecord', 'Stock', 'StockManager', 'StockTypeInfo', 'StockWeight', 'StockWeightList', 'StoplossBase', 'Strategy', 'StrategyContext', 'System', 'SystemPart', 'SystemWeight', 'SystemWeightList', 'TAN', 'TA_ACCBANDS', 'TA_ACOS', 'TA_AD', 'TA_ADD', 'TA_ADOSC', 'TA_ADX', 'TA_ADXR', 'TA_APO', 'TA_AROON', 'TA_AROONOSC', 'TA_ASIN', 'TA_ATAN', 'TA_ATR', 'TA_AVGDEV', 'TA_AVGPRICE', 'TA_BBANDS', 'TA_BETA', 'TA_BOP', 'TA_CCI', 'TA_CDL2CROWS', 'TA_CDL3BLACKCROWS', 'TA_CDL3INSIDE', 'TA_CDL3LINESTRIKE', 'TA_CDL3OUTSIDE', 'TA_CDL3STARSINSOUTH', 'TA_CDL3WHITESOLDIERS', 'TA_CDLABANDONEDBABY', 'TA_CDLADVANCEBLOCK', 'TA_CDLBELTHOLD', 'TA_CDLBREAKAWAY', 'TA_CDLCLOSINGMARUBOZU', 'TA_CDLCONCEALBABYSWALL', 'TA_CDLCOUNTERATTACK', 'TA_CDLDARKCLOUDCOVER', 'TA_CDLDOJI', 'TA_CDLDOJISTAR', 'TA_CDLDRAGONFLYDOJI', 'TA_CDLENGULFING', 'TA_CDLEVENINGDOJISTAR', 'TA_CDLEVENINGSTAR', 'TA_CDLGAPSIDESIDEWHITE', 'TA_CDLGRAVESTONEDOJI', 'TA_CDLHAMMER', 'TA_CDLHANGINGMAN', 'TA_CDLHARAMI', 'TA_CDLHARAMICROSS', 'TA_CDLHIGHWAVE', 'TA_CDLHIKKAKE', 'TA_CDLHIKKAKEMOD', 'TA_CDLHOMINGPIGEON', 'TA_CDLIDENTICAL3CROWS', 'TA_CDLINNECK', 'TA_CDLINVERTEDHAMMER', 'TA_CDLKICKING', 'TA_CDLKICKINGBYLENGTH', 'TA_CDLLADDERBOTTOM', 'TA_CDLLONGLEGGEDDOJI', 'TA_CDLLONGLINE', 'TA_CDLMARUBOZU', 'TA_CDLMATCHINGLOW', 'TA_CDLMATHOLD', 'TA_CDLMORNINGDOJISTAR', 'TA_CDLMORNINGSTAR', 'TA_CDLONNECK', 'TA_CDLPIERCING', 'TA_CDLRICKSHAWMAN', 'TA_CDLRISEFALL3METHODS', 'TA_CDLSEPARATINGLINES', 'TA_CDLSHOOTINGSTAR', 'TA_CDLSHORTLINE', 'TA_CDLSPINNINGTOP', 'TA_CDLSTALLEDPATTERN', 'TA_CDLSTICKSANDWICH', 'TA_CDLTAKURI', 'TA_CDLTASUKIGAP', 'TA_CDLTHRUSTING', 'TA_CDLTRISTAR', 'TA_CDLUNIQUE3RIVER', 'TA_CDLUPSIDEGAP2CROWS', 'TA_CDLXSIDEGAP3METHODS', 'TA_CEIL', 'TA_CMO', 'TA_CORREL', 'TA_COS', 'TA_COSH', 'TA_DEMA', 'TA_DIV', 'TA_DX', 'TA_EMA', 'TA_EXP', 'TA_FLOOR', 'TA_HT_DCPERIOD', 'TA_HT_DCPHASE', 'TA_HT_PHASOR', 'TA_HT_SINE', 'TA_HT_TRENDLINE', 'TA_HT_TRENDMODE', 'TA_IMI', 'TA_KAMA', 'TA_LINEARREG', 'TA_LINEARREG_ANGLE', 'TA_LINEARREG_INTERCEPT', 'TA_LINEARREG_SLOPE', 'TA_LN', 'TA_LOG10', 'TA_MA', 'TA_MACD', 'TA_MACDEXT', 'TA_MACDFIX', 'TA_MAMA', 'TA_MAVP', 'TA_MAX', 'TA_MAXINDEX', 'TA_MEDPRICE', 'TA_MFI', 'TA_MIDPOINT', 'TA_MIDPRICE', 'TA_MIN', 'TA_MININDEX', 'TA_MINMAX', 'TA_MINMAXINDEX', 'TA_MINUS_DI', 'TA_MINUS_DM', 'TA_MOM', 'TA_MULT', 'TA_NATR', 'TA_OBV', 'TA_PLUS_DI', 'TA_PLUS_DM', 'TA_PPO', 'TA_ROC', 'TA_ROCP', 'TA_ROCR', 'TA_ROCR100', 'TA_RSI', 'TA_SAR', 'TA_SAREXT', 'TA_SIN', 'TA_SINH', 'TA_SMA', 'TA_SQRT', 'TA_STDDEV', 'TA_STOCH', 'TA_STOCHF', 'TA_STOCHRSI', 'TA_SUB', 'TA_SUM', 'TA_T3', 'TA_TAN', 'TA_TANH', 'TA_TEMA', 'TA_TRANGE', 'TA_TRIMA', 'TA_TRIX', 'TA_TSF', 'TA_TYPPRICE', 'TA_ULTOSC', 'TA_VAR', 'TA_WCLPRICE', 'TA_WILLR', 'TA_WMA', 'TC_FixedA', 'TC_FixedA2015', 'TC_FixedA2017', 'TC_TestStub', 'TC_Zero', 'TIME', 'TIMELINE', 'TIMELINEVOL', 'TR', 'TRACE', 'TURNOVER', 'TimeDelta', 'TimeDelta_timedelta', 'TimeLineList', 'TimeLineRecord', 'TradeCostBase', 'TradeManager', 'TradeRecord', 'TradeRecordList', 'TradeRequest', 'TransList', 'TransRecord', 'UPNDAY', 'UTCOffset', 'VAR', 'VARP', 'VIGOR', 'WARN', 'WEAVE', 'WEEK', 'WINNER', 'WITHDAY', 'WITHHALFYEAR', 'WITHHOUR', 'WITHHOUR2', 'WITHHOUR4', 'WITHKTYPE', 'WITHMIN', 'WITHMIN15', 'WITHMIN30', 'WITHMIN5', 'WITHMIN60', 'WITHMONTH', 'WITHQUARTER', 'WITHWEEK', 'WITHYEAR', 'WMA', 'YEAR', 'ZHBOND10', 'ZONGGUBEN', 'ZSCORE', 'active_device', 'backtest', 'batch_calculate_inds', 'bind_email', 'can_upgrade', 'check_data', 'close_ostream_to_python', 'close_spend_time', 'combinate_ind', 'combinate_index', 'constant', 'crtBrokerTM', 'crtSEOptimal', 'crtTM', 'crt_pf_strategy', 'crt_sys_strategy', 'date', 'dates_to_np', 'datetime', 'df_to_krecords', 'fetch_trial_license', 'find_optimal_system', 'find_optimal_system_multi', 'get_block', 'get_business_name', 'get_data_from_buffer_server', 'get_date_range', 'get_expire_date', 'get_funds_list', 'get_kdata', 'get_latest_version_info', 'get_log_level', 'get_spot_from_buffer_server', 'get_stock', 'get_system_part_enum', 'get_system_part_name', 'get_version', 'get_version_git', 'get_version_with_build', 'hikyuu_init', 'inner_analysis_sys_list', 'inner_combinate_ind_analysis', 'inner_combinate_ind_analysis_with_block', 'is_valid_license', 'isinf', 'isnan', 'krecords_to_df', 'krecords_to_np', 'new_Query_init', 'np', 'old_Query_init', 'open_ostream_to_python', 'open_spend_time', 'os', 'parallel_run_pf', 'parallel_run_sys', 'pd', 'positions_to_df', 'positions_to_np', 'register_extra_ktype', 'release_extra_ktype', 'remove_license', 'roundDown', 'roundEx', 'roundUp', 'run_in_strategy', 'scorerecords_to_df', 'scorerecords_to_np', 'set_log_level', 'set_python_in_interactive', 'set_python_in_jupyter', 'spot_agent_is_connected', 'spot_agent_is_running', 'start_data_server', 'start_spot_agent', 'stop_data_server', 'stop_spot_agent', 'sys', 'systemweights_to_df', 'systemweights_to_np', 'timedelta', 'timeline_to_df', 'timeline_to_np', 'toPriceList', 'trades_to_df', 'trades_to_np', 'translist_to_df', 'translist_to_np', 'view_license', 'weights_to_df', 'weights_to_np']
|
|
598
|
+
__all__: list[str] = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', 'AF_FixedAmount', 'AF_FixedWeight', 'AF_FixedWeightList', 'AF_MultiFactor', 'AGG_COUNT', 'AGG_FUNC', 'AGG_MAD', 'AGG_MAX', 'AGG_MEAN', 'AGG_MEDIAN', 'AGG_MIN', 'AGG_PROD', 'AGG_QUANTILE', 'AGG_STD', 'AGG_SUM', 'AGG_VAR', 'AGG_VWAP', 'ALIGN', 'AMA', 'ASIN', 'ATAN', 'ATR', 'AVEDEV', 'AllocateFundsBase', 'BACKSET', 'BARSCOUNT', 'BARSLAST', 'BARSLASTCOUNT', 'BARSSINCE', 'BARSSINCEN', 'BETWEEN', 'BLOCKSETNUM', 'BUSINESS', 'Block', 'BlockInfoDriver', 'BorrowRecord', 'BrokerPositionRecord', 'CEILING', 'CN_Bool', 'CN_OPLine', 'CONTEXT', 'CONTEXT_K', 'CORR', 'COS', 'COST', 'COUNT', 'CROSS', 'CVAL', 'CYCLE', 'C_AMO', 'C_CLOSE', 'C_HIGH', 'C_KDATA', 'C_LOW', 'C_OPEN', 'C_VOL', 'ConditionBase', 'Constant', 'CostRecord', 'DATE', 'DAY', 'DEBUG', 'DECLINE', 'DEVSQ', 'DIFF', 'DISCARD', 'DMA', 'DOWNNDAY', 'DROPNA', 'DataDriverFactory', 'Datetime', 'DatetimeList', 'DatetimeList_to_df', 'DatetimeList_to_np', 'Datetime_date', 'Datetime_datetime', 'Days', 'EMA', 'ERROR', 'EVERY', 'EV_Bool', 'EV_TwoLine', 'EXIST', 'EXP', 'EnvironmentBase', 'FATAL', 'FILTER', 'FINANCE', 'FLOOR', 'FundsRecord', 'GROUP_COUNT', 'GROUP_FUNC', 'GROUP_MAX', 'GROUP_MEAN', 'GROUP_MIN', 'GROUP_PROD', 'GROUP_SUM', 'HHV', 'HHVBARS', 'HKUException', 'HOUR', 'HSL', 'Hours', 'IC', 'ICIR', 'IF', 'INBLOCK', 'INDEXA', 'INDEXADV', 'INDEXC', 'INDEXDEC', 'INDEXH', 'INDEXL', 'INDEXO', 'INDEXV', 'INFO', 'INSUM', 'INTPART', 'IR', 'ISINF', 'ISINFA', 'ISLASTBAR', 'ISNA', 'IndParam', 'Indicator', 'IndicatorImp', 'JUMPDOWN', 'JUMPUP', 'KALMAN', 'KDATA_PART', 'KData', 'KDataDriver', 'KDataToClickHouseImporter', 'KDataToHdf5Importer', 'KDataToMySQLImporter', 'KRecord', 'KRecordList', 'LAST', 'LASTVALUE', 'LIUTONGPAN', 'LLV', 'LLVBARS', 'LN', 'LOG', 'LOG_LEVEL', 'LONGCROSS', 'LoanRecord', 'MA', 'MACD', 'MAX', 'MDD', 'MF_EqualWeight', 'MF_ICIRWeight', 'MF_ICWeight', 'MF_Weight', 'MIN', 'MINUTE', 'MM_FixedCapital', 'MM_FixedCapitalFunds', 'MM_FixedCount', 'MM_FixedCountTps', 'MM_FixedPercent', 'MM_FixedRisk', 'MM_FixedUnits', 'MM_Nothing', 'MM_WilliamsFixedRisk', 'MOD', 'MONTH', 'MRR', 'MarketInfo', 'Microseconds', 'Milliseconds', 'Minutes', 'MoneyManagerBase', 'MultiFactorBase', 'NDAY', 'NORM_MinMax', 'NORM_NOTHING', 'NORM_Quantile', 'NORM_Quantile_Uniform', 'NORM_Zscore', 'NOT', 'NormalizeBase', 'OFF', 'OrderBrokerBase', 'PF_Simple', 'PF_WithoutAF', 'PG_FixedHoldDays', 'PG_FixedPercent', 'PG_NoGoal', 'POS', 'POW', 'PRICELIST', 'Parameter', 'Parameter_items', 'Parameter_iter', 'Parameter_keys', 'Parameter_to_dict', 'Performance', 'Portfolio', 'PositionRecord', 'PositionRecordList', 'ProfitGoalBase', 'QUANTILE_TRUNC', 'Query', 'RANK', 'RECOVER_BACKWARD', 'RECOVER_EQUAL_BACKWARD', 'RECOVER_EQUAL_FORWARD', 'RECOVER_FORWARD', 'REF', 'REFX', 'REPLACE', 'RESULT', 'REVERSE', 'ROC', 'ROCP', 'ROCR', 'ROCR100', 'ROUND', 'ROUNDDOWN', 'ROUNDUP', 'RSI', 'SAFTYLOSS', 'SCFilter_AmountLimit', 'SCFilter_Group', 'SCFilter_IgnoreNan', 'SCFilter_LessOrEqualValue', 'SCFilter_Price', 'SCFilter_TopN', 'SE_EvaluateOptimal', 'SE_Fixed', 'SE_MaxFundsOptimal', 'SE_MultiFactor', 'SE_MultiFactor2', 'SE_PerformanceOptimal', 'SE_Signal', 'SGN', 'SG_Add', 'SG_AllwaysBuy', 'SG_And', 'SG_Band', 'SG_Bool', 'SG_Buy', 'SG_Cross', 'SG_CrossGold', 'SG_Cycle', 'SG_Div', 'SG_Flex', 'SG_Mul', 'SG_OneSide', 'SG_Or', 'SG_Sell', 'SG_Single', 'SG_Single2', 'SG_Sub', 'SIN', 'SLICE', 'SLOPE', 'SMA', 'SPEARMAN', 'SP_FixedPercent', 'SP_FixedValue', 'SP_LogNormal', 'SP_Normal', 'SP_TruncNormal', 'SP_Uniform', 'SQRT', 'STDEV', 'STDP', 'ST_FixedPercent', 'ST_Indicator', 'ST_Saftyloss', 'SUM', 'SUMBARS', 'SYS_Simple', 'SYS_WalkForward', 'ScoreRecord', 'ScoreRecordList', 'ScoresFilterBase', 'Seconds', 'SelectorBase', 'SignalBase', 'SlippageBase', 'SpotRecord', 'Stock', 'StockManager', 'StockTypeInfo', 'StockWeight', 'StockWeightList', 'StoplossBase', 'Strategy', 'StrategyContext', 'System', 'SystemPart', 'SystemWeight', 'SystemWeightList', 'TAN', 'TA_ACCBANDS', 'TA_ACOS', 'TA_AD', 'TA_ADD', 'TA_ADOSC', 'TA_ADX', 'TA_ADXR', 'TA_APO', 'TA_AROON', 'TA_AROONOSC', 'TA_ASIN', 'TA_ATAN', 'TA_ATR', 'TA_AVGDEV', 'TA_AVGPRICE', 'TA_BBANDS', 'TA_BETA', 'TA_BOP', 'TA_CCI', 'TA_CDL2CROWS', 'TA_CDL3BLACKCROWS', 'TA_CDL3INSIDE', 'TA_CDL3LINESTRIKE', 'TA_CDL3OUTSIDE', 'TA_CDL3STARSINSOUTH', 'TA_CDL3WHITESOLDIERS', 'TA_CDLABANDONEDBABY', 'TA_CDLADVANCEBLOCK', 'TA_CDLBELTHOLD', 'TA_CDLBREAKAWAY', 'TA_CDLCLOSINGMARUBOZU', 'TA_CDLCONCEALBABYSWALL', 'TA_CDLCOUNTERATTACK', 'TA_CDLDARKCLOUDCOVER', 'TA_CDLDOJI', 'TA_CDLDOJISTAR', 'TA_CDLDRAGONFLYDOJI', 'TA_CDLENGULFING', 'TA_CDLEVENINGDOJISTAR', 'TA_CDLEVENINGSTAR', 'TA_CDLGAPSIDESIDEWHITE', 'TA_CDLGRAVESTONEDOJI', 'TA_CDLHAMMER', 'TA_CDLHANGINGMAN', 'TA_CDLHARAMI', 'TA_CDLHARAMICROSS', 'TA_CDLHIGHWAVE', 'TA_CDLHIKKAKE', 'TA_CDLHIKKAKEMOD', 'TA_CDLHOMINGPIGEON', 'TA_CDLIDENTICAL3CROWS', 'TA_CDLINNECK', 'TA_CDLINVERTEDHAMMER', 'TA_CDLKICKING', 'TA_CDLKICKINGBYLENGTH', 'TA_CDLLADDERBOTTOM', 'TA_CDLLONGLEGGEDDOJI', 'TA_CDLLONGLINE', 'TA_CDLMARUBOZU', 'TA_CDLMATCHINGLOW', 'TA_CDLMATHOLD', 'TA_CDLMORNINGDOJISTAR', 'TA_CDLMORNINGSTAR', 'TA_CDLONNECK', 'TA_CDLPIERCING', 'TA_CDLRICKSHAWMAN', 'TA_CDLRISEFALL3METHODS', 'TA_CDLSEPARATINGLINES', 'TA_CDLSHOOTINGSTAR', 'TA_CDLSHORTLINE', 'TA_CDLSPINNINGTOP', 'TA_CDLSTALLEDPATTERN', 'TA_CDLSTICKSANDWICH', 'TA_CDLTAKURI', 'TA_CDLTASUKIGAP', 'TA_CDLTHRUSTING', 'TA_CDLTRISTAR', 'TA_CDLUNIQUE3RIVER', 'TA_CDLUPSIDEGAP2CROWS', 'TA_CDLXSIDEGAP3METHODS', 'TA_CEIL', 'TA_CMO', 'TA_CORREL', 'TA_COS', 'TA_COSH', 'TA_DEMA', 'TA_DIV', 'TA_DX', 'TA_EMA', 'TA_EXP', 'TA_FLOOR', 'TA_HT_DCPERIOD', 'TA_HT_DCPHASE', 'TA_HT_PHASOR', 'TA_HT_SINE', 'TA_HT_TRENDLINE', 'TA_HT_TRENDMODE', 'TA_IMI', 'TA_KAMA', 'TA_LINEARREG', 'TA_LINEARREG_ANGLE', 'TA_LINEARREG_INTERCEPT', 'TA_LINEARREG_SLOPE', 'TA_LN', 'TA_LOG10', 'TA_MA', 'TA_MACD', 'TA_MACDEXT', 'TA_MACDFIX', 'TA_MAMA', 'TA_MAVP', 'TA_MAX', 'TA_MAXINDEX', 'TA_MEDPRICE', 'TA_MFI', 'TA_MIDPOINT', 'TA_MIDPRICE', 'TA_MIN', 'TA_MININDEX', 'TA_MINMAX', 'TA_MINMAXINDEX', 'TA_MINUS_DI', 'TA_MINUS_DM', 'TA_MOM', 'TA_MULT', 'TA_NATR', 'TA_OBV', 'TA_PLUS_DI', 'TA_PLUS_DM', 'TA_PPO', 'TA_ROC', 'TA_ROCP', 'TA_ROCR', 'TA_ROCR100', 'TA_RSI', 'TA_SAR', 'TA_SAREXT', 'TA_SIN', 'TA_SINH', 'TA_SMA', 'TA_SQRT', 'TA_STDDEV', 'TA_STOCH', 'TA_STOCHF', 'TA_STOCHRSI', 'TA_SUB', 'TA_SUM', 'TA_T3', 'TA_TAN', 'TA_TANH', 'TA_TEMA', 'TA_TRANGE', 'TA_TRIMA', 'TA_TRIX', 'TA_TSF', 'TA_TYPPRICE', 'TA_ULTOSC', 'TA_VAR', 'TA_WCLPRICE', 'TA_WILLR', 'TA_WMA', 'TC_FixedA', 'TC_FixedA2015', 'TC_FixedA2017', 'TC_TestStub', 'TC_Zero', 'TIME', 'TIMELINE', 'TIMELINEVOL', 'TR', 'TRACE', 'TURNOVER', 'TimeDelta', 'TimeDelta_timedelta', 'TimeLineList', 'TimeLineRecord', 'TradeCostBase', 'TradeManager', 'TradeRecord', 'TradeRecordList', 'TradeRequest', 'TransList', 'TransRecord', 'UPNDAY', 'UTCOffset', 'VAR', 'VARP', 'VIGOR', 'WARN', 'WEAVE', 'WEEK', 'WINNER', 'WITHDAY', 'WITHHALFYEAR', 'WITHHOUR', 'WITHHOUR2', 'WITHHOUR4', 'WITHKTYPE', 'WITHMIN', 'WITHMIN15', 'WITHMIN30', 'WITHMIN5', 'WITHMIN60', 'WITHMONTH', 'WITHQUARTER', 'WITHWEEK', 'WITHYEAR', 'WMA', 'YEAR', 'ZHBOND10', 'ZONGGUBEN', 'ZSCORE', 'active_device', 'backtest', 'batch_calculate_inds', 'bind_email', 'can_upgrade', 'check_data', 'close_ostream_to_python', 'close_spend_time', 'combinate_ind', 'combinate_index', 'constant', 'crtBrokerTM', 'crtSEOptimal', 'crtTM', 'crt_pf_strategy', 'crt_sys_strategy', 'date', 'dates_to_np', 'datetime', 'df_to_krecords', 'enable_kdata_cache', 'fetch_trial_license', 'find_optimal_system', 'find_optimal_system_multi', 'get_block', 'get_business_name', 'get_data_from_buffer_server', 'get_date_range', 'get_expire_date', 'get_funds_list', 'get_kdata', 'get_latest_version_info', 'get_log_level', 'get_spot_from_buffer_server', 'get_stock', 'get_system_part_enum', 'get_system_part_name', 'get_version', 'get_version_git', 'get_version_with_build', 'hikyuu_init', 'inner_analysis_sys_list', 'inner_combinate_ind_analysis', 'inner_combinate_ind_analysis_with_block', 'is_valid_license', 'isinf', 'isnan', 'krecords_to_df', 'krecords_to_np', 'new_Query_init', 'np', 'old_Query_init', 'open_ostream_to_python', 'open_spend_time', 'os', 'parallel_run_pf', 'parallel_run_sys', 'pd', 'positions_to_df', 'positions_to_np', 'register_extra_ktype', 'release_extra_ktype', 'remove_license', 'roundDown', 'roundEx', 'roundUp', 'run_in_strategy', 'scorerecords_to_df', 'scorerecords_to_np', 'set_log_level', 'set_python_in_interactive', 'set_python_in_jupyter', 'spot_agent_is_connected', 'spot_agent_is_running', 'start_data_server', 'start_spot_agent', 'stop_data_server', 'stop_spot_agent', 'sys', 'systemweights_to_df', 'systemweights_to_np', 'timedelta', 'timeline_to_df', 'timeline_to_np', 'toPriceList', 'trades_to_df', 'trades_to_np', 'translist_to_df', 'translist_to_np', 'view_license', 'weights_to_df', 'weights_to_np']
|
|
598
599
|
def DatetimeList_to_df(data: hikyuu.cpp.core310.DatetimeList):
|
|
599
600
|
...
|
|
600
601
|
def DatetimeList_to_np(data: hikyuu.cpp.core310.DatetimeList):
|
|
@@ -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 0xffff22891b40; 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 ffff2288bd80>
|
|
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 0xffff228929e0; 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 ffff228cc9f0>
|
|
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 0xffff22892f20; 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 ffff228cd990>
|
|
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};
|