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
hikyuu/cpp/core313.pyi
CHANGED
|
@@ -3,7 +3,7 @@ import collections.abc
|
|
|
3
3
|
import numpy
|
|
4
4
|
import numpy.typing
|
|
5
5
|
import typing
|
|
6
|
-
__all__ = ['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', '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', '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', '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', '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', 'dates_to_np', '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', 'open_ostream_to_python', 'open_spend_time', 'parallel_run_pf', 'parallel_run_sys', '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', 'systemweights_to_df', 'systemweights_to_np', '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']
|
|
6
|
+
__all__ = ['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', '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', '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', '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', 'dates_to_np', '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', 'open_ostream_to_python', 'open_spend_time', 'parallel_run_pf', 'parallel_run_sys', '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', 'systemweights_to_df', 'systemweights_to_np', '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']
|
|
7
7
|
class AllocateFundsBase:
|
|
8
8
|
"""
|
|
9
9
|
资产分配算法基类, 子类接口:
|
|
@@ -1571,6 +1571,7 @@ class Indicator:
|
|
|
1571
1571
|
"""
|
|
1572
1572
|
技术指标
|
|
1573
1573
|
"""
|
|
1574
|
+
enable_increment_calculate: typing.ClassVar[bool] = True
|
|
1574
1575
|
@staticmethod
|
|
1575
1576
|
def _pybind11_conduit_v1_(*args, **kwargs):
|
|
1576
1577
|
...
|
|
@@ -1825,6 +1826,12 @@ class Indicator:
|
|
|
1825
1826
|
"""
|
|
1826
1827
|
def equal(self, arg0: Indicator) -> bool:
|
|
1827
1828
|
...
|
|
1829
|
+
def extend(self) -> None:
|
|
1830
|
+
"""
|
|
1831
|
+
extend(self)
|
|
1832
|
+
|
|
1833
|
+
在有上下文时,自动将上下文扩展至当前最新数据并计算
|
|
1834
|
+
"""
|
|
1828
1835
|
def formula(self) -> str:
|
|
1829
1836
|
"""
|
|
1830
1837
|
formula(self)
|
|
@@ -1938,7 +1945,7 @@ class Indicator:
|
|
|
1938
1945
|
"""
|
|
1939
1946
|
def have_ind_param(self, arg0: str) -> bool:
|
|
1940
1947
|
"""
|
|
1941
|
-
|
|
1948
|
+
是否存在指定的动态周期指标参数
|
|
1942
1949
|
"""
|
|
1943
1950
|
def have_param(self, arg0: str) -> bool:
|
|
1944
1951
|
"""
|
|
@@ -1996,10 +2003,6 @@ class Indicator:
|
|
|
1996
2003
|
:type value: int | bool | float | string | Query | KData | Stock | DatetimeList
|
|
1997
2004
|
:raises logic_error: Unsupported type! 不支持的参数类型
|
|
1998
2005
|
"""
|
|
1999
|
-
def support_ind_param(self) -> bool:
|
|
2000
|
-
"""
|
|
2001
|
-
是否支持动态指标参数
|
|
2002
|
-
"""
|
|
2003
2006
|
def to_array(self, result_index: typing.SupportsInt = 0) -> numpy.typing.NDArray[numpy.float64]:
|
|
2004
2007
|
"""
|
|
2005
2008
|
将指定结果集转化为numpy.array
|
|
@@ -2038,6 +2041,9 @@ class Indicator:
|
|
|
2038
2041
|
@name.setter
|
|
2039
2042
|
def name(self, arg1: str) -> None:
|
|
2040
2043
|
...
|
|
2044
|
+
@property
|
|
2045
|
+
def optype(self) -> str:
|
|
2046
|
+
...
|
|
2041
2047
|
class IndicatorImp:
|
|
2042
2048
|
"""
|
|
2043
2049
|
指标实现类,定义新指标时,应从此类继承
|
|
@@ -2127,8 +2133,6 @@ class IndicatorImp:
|
|
|
2127
2133
|
...
|
|
2128
2134
|
def set_param(self, arg0: str, arg1: any) -> None:
|
|
2129
2135
|
...
|
|
2130
|
-
def support_ind_param(self) -> bool:
|
|
2131
|
-
...
|
|
2132
2136
|
@property
|
|
2133
2137
|
def discard(self) -> int:
|
|
2134
2138
|
"""
|
|
@@ -2278,14 +2282,12 @@ class KData:
|
|
|
2278
2282
|
:rtype: KData
|
|
2279
2283
|
"""
|
|
2280
2284
|
@typing.overload
|
|
2281
|
-
def get_kdata(self,
|
|
2285
|
+
def get_kdata(self, arg0: Query) -> KData:
|
|
2282
2286
|
"""
|
|
2283
|
-
get_kdata(
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
:param int start: 索引起始位置
|
|
2288
|
-
:param int end: 索引结束位置
|
|
2287
|
+
get_kdata(query)
|
|
2288
|
+
|
|
2289
|
+
通过当前 KData 获取获取另一个 KData,不一定是其子集
|
|
2290
|
+
|
|
2289
2291
|
:rtype: KData
|
|
2290
2292
|
"""
|
|
2291
2293
|
def get_pos(self, arg0: Datetime) -> typing.Any:
|
|
@@ -2322,6 +2324,16 @@ class KData:
|
|
|
2322
2324
|
|
|
2323
2325
|
:rtype: Stock
|
|
2324
2326
|
"""
|
|
2327
|
+
def get_sub_kdata(self, start: typing.SupportsInt, end: typing.SupportsInt = 9223372036854775807) -> KData:
|
|
2328
|
+
"""
|
|
2329
|
+
get_sub_kdata(start, end = Null<int64_t>)
|
|
2330
|
+
|
|
2331
|
+
通过索引获取自身子集
|
|
2332
|
+
|
|
2333
|
+
:param int start: 起始索引
|
|
2334
|
+
:param int end: 结束索引
|
|
2335
|
+
:rtype: KData
|
|
2336
|
+
"""
|
|
2325
2337
|
def to_df(self, with_stock: bool = False) -> typing.Any:
|
|
2326
2338
|
"""
|
|
2327
2339
|
to_df(self, with_stock=False) -> pandas.DataFrame
|
|
@@ -3102,7 +3114,7 @@ class MultiFactorBase:
|
|
|
3102
3114
|
...
|
|
3103
3115
|
def __str__(self) -> str:
|
|
3104
3116
|
...
|
|
3105
|
-
def add_special_normalize(self, name: str, norm:
|
|
3117
|
+
def add_special_normalize(self, name: str, norm: typing.Any = None, category: str = '', style_inds: collections.abc.Sequence[Indicator] = []) -> None:
|
|
3106
3118
|
"""
|
|
3107
3119
|
add_special_normalize(self, name[, norm=None, category="", style_inds=[]])
|
|
3108
3120
|
|
|
@@ -3217,7 +3229,7 @@ class MultiFactorBase:
|
|
|
3217
3229
|
"""
|
|
3218
3230
|
是否存在指定参数
|
|
3219
3231
|
"""
|
|
3220
|
-
def set_normalize(self, norm:
|
|
3232
|
+
def set_normalize(self, norm: typing.Any) -> None:
|
|
3221
3233
|
"""
|
|
3222
3234
|
set_normalize(self, norm)
|
|
3223
3235
|
|
|
@@ -3650,7 +3662,7 @@ class Portfolio:
|
|
|
3650
3662
|
设置或获取资产分配算法
|
|
3651
3663
|
"""
|
|
3652
3664
|
@af.setter
|
|
3653
|
-
def af(self, arg1:
|
|
3665
|
+
def af(self, arg1: typing.Any) -> None:
|
|
3654
3666
|
...
|
|
3655
3667
|
@property
|
|
3656
3668
|
def name(self) -> str:
|
|
@@ -3679,7 +3691,7 @@ class Portfolio:
|
|
|
3679
3691
|
设置或获取交易对象选择算法
|
|
3680
3692
|
"""
|
|
3681
3693
|
@se.setter
|
|
3682
|
-
def se(self, arg1:
|
|
3694
|
+
def se(self, arg1: typing.Any) -> None:
|
|
3683
3695
|
...
|
|
3684
3696
|
@property
|
|
3685
3697
|
def tm(self) -> TradeManager:
|
|
@@ -3687,7 +3699,7 @@ class Portfolio:
|
|
|
3687
3699
|
设置或获取交易管理对象
|
|
3688
3700
|
"""
|
|
3689
3701
|
@tm.setter
|
|
3690
|
-
def tm(self, arg1:
|
|
3702
|
+
def tm(self, arg1: typing.Any) -> None:
|
|
3691
3703
|
...
|
|
3692
3704
|
class PositionRecord:
|
|
3693
3705
|
"""
|
|
@@ -4552,7 +4564,7 @@ class SelectorBase:
|
|
|
4552
4564
|
"""
|
|
4553
4565
|
子类复位操作实现
|
|
4554
4566
|
"""
|
|
4555
|
-
def add_scores_filter(self, arg0:
|
|
4567
|
+
def add_scores_filter(self, arg0: typing.Any) -> None:
|
|
4556
4568
|
"""
|
|
4557
4569
|
add_scores_filter(self, filter)
|
|
4558
4570
|
|
|
@@ -4569,7 +4581,7 @@ class SelectorBase:
|
|
|
4569
4581
|
:param Stock stock: 加入的初始标的
|
|
4570
4582
|
:param System sys: 系统策略原型
|
|
4571
4583
|
"""
|
|
4572
|
-
def add_stock_list(self, stk_list:
|
|
4584
|
+
def add_stock_list(self, stk_list: typing.Any, sys: ...) -> None:
|
|
4573
4585
|
"""
|
|
4574
4586
|
add_stock_list(self, stk_list, sys)
|
|
4575
4587
|
|
|
@@ -4642,7 +4654,7 @@ class SelectorBase:
|
|
|
4642
4654
|
:param value: 参数值
|
|
4643
4655
|
:raises logic_error: Unsupported type! 不支持的参数类型
|
|
4644
4656
|
"""
|
|
4645
|
-
def set_scores_filter(self, arg0:
|
|
4657
|
+
def set_scores_filter(self, arg0: typing.Any) -> None:
|
|
4646
4658
|
"""
|
|
4647
4659
|
set_scores_filter(self, filter)
|
|
4648
4660
|
|
|
@@ -4655,6 +4667,9 @@ class SelectorBase:
|
|
|
4655
4667
|
"""
|
|
4656
4668
|
获取关联的 MF
|
|
4657
4669
|
"""
|
|
4670
|
+
@mf.setter
|
|
4671
|
+
def mf(self, arg1: typing.Any) -> None:
|
|
4672
|
+
...
|
|
4658
4673
|
@property
|
|
4659
4674
|
def name(self) -> str:
|
|
4660
4675
|
"""
|
|
@@ -5291,7 +5306,7 @@ class Stock:
|
|
|
5291
5306
|
|
|
5292
5307
|
:param Query.KType ktype: K线类型
|
|
5293
5308
|
"""
|
|
5294
|
-
def set_kdata_from_df(self, df: typing.Any, cols: collections.abc.Sequence[str], ktype: str = 'DAY') -> None:
|
|
5309
|
+
def set_kdata_from_df(self, df: typing.Any, cols: collections.abc.Sequence[str] = ['datetime', 'open', 'high', 'low', 'close', 'amount', 'volume'], ktype: str = 'DAY') -> None:
|
|
5295
5310
|
"""
|
|
5296
5311
|
set_kdata_from_df(self, df, cols, [ktype=Query.DAY])
|
|
5297
5312
|
|
|
@@ -5488,6 +5503,10 @@ class StockManager:
|
|
|
5488
5503
|
:return: 加入的Stock
|
|
5489
5504
|
:rtype: Stock
|
|
5490
5505
|
"""
|
|
5506
|
+
def cancel_load(self) -> None:
|
|
5507
|
+
"""
|
|
5508
|
+
取消所有数据加载
|
|
5509
|
+
"""
|
|
5491
5510
|
def datadir(self) -> str:
|
|
5492
5511
|
"""
|
|
5493
5512
|
datadir(self) -> str
|
|
@@ -5523,6 +5542,16 @@ class StockManager:
|
|
|
5523
5542
|
:return: 板块列表
|
|
5524
5543
|
:rtype: BlockList
|
|
5525
5544
|
"""
|
|
5545
|
+
def get_block_list_by_index_stock(self, index_stk: ...) -> list[...]:
|
|
5546
|
+
"""
|
|
5547
|
+
get_block_list_by_index_stock(self, index_stk)
|
|
5548
|
+
|
|
5549
|
+
获取指定指数的板块列表
|
|
5550
|
+
|
|
5551
|
+
:param Stock index_stk: 指数
|
|
5552
|
+
:return: 板块列表
|
|
5553
|
+
:rtype: BlockList
|
|
5554
|
+
"""
|
|
5526
5555
|
def get_block_parameter(self) -> ...:
|
|
5527
5556
|
"""
|
|
5528
5557
|
获取当前板块信息驱动参数
|
|
@@ -6536,7 +6565,7 @@ class System:
|
|
|
6536
6565
|
系统有效条件
|
|
6537
6566
|
"""
|
|
6538
6567
|
@cn.setter
|
|
6539
|
-
def cn(self, arg1:
|
|
6568
|
+
def cn(self, arg1: typing.Any) -> None:
|
|
6540
6569
|
...
|
|
6541
6570
|
@property
|
|
6542
6571
|
def ev(self) -> EnvironmentBase:
|
|
@@ -6544,7 +6573,7 @@ class System:
|
|
|
6544
6573
|
市场环境判断策略
|
|
6545
6574
|
"""
|
|
6546
6575
|
@ev.setter
|
|
6547
|
-
def ev(self, arg1:
|
|
6576
|
+
def ev(self, arg1: typing.Any) -> None:
|
|
6548
6577
|
...
|
|
6549
6578
|
@property
|
|
6550
6579
|
def mm(self) -> MoneyManagerBase:
|
|
@@ -6552,7 +6581,7 @@ class System:
|
|
|
6552
6581
|
资金管理策略
|
|
6553
6582
|
"""
|
|
6554
6583
|
@mm.setter
|
|
6555
|
-
def mm(self, arg1:
|
|
6584
|
+
def mm(self, arg1: typing.Any) -> None:
|
|
6556
6585
|
...
|
|
6557
6586
|
@property
|
|
6558
6587
|
def name(self) -> str:
|
|
@@ -6568,7 +6597,7 @@ class System:
|
|
|
6568
6597
|
盈利目标策略
|
|
6569
6598
|
"""
|
|
6570
6599
|
@pg.setter
|
|
6571
|
-
def pg(self, arg1:
|
|
6600
|
+
def pg(self, arg1: typing.Any) -> None:
|
|
6572
6601
|
...
|
|
6573
6602
|
@property
|
|
6574
6603
|
def query(self) -> Query:
|
|
@@ -6581,7 +6610,7 @@ class System:
|
|
|
6581
6610
|
信号指示器
|
|
6582
6611
|
"""
|
|
6583
6612
|
@sg.setter
|
|
6584
|
-
def sg(self, arg1:
|
|
6613
|
+
def sg(self, arg1: typing.Any) -> None:
|
|
6585
6614
|
...
|
|
6586
6615
|
@property
|
|
6587
6616
|
def sp(self) -> SlippageBase:
|
|
@@ -6589,7 +6618,7 @@ class System:
|
|
|
6589
6618
|
移滑价差算法
|
|
6590
6619
|
"""
|
|
6591
6620
|
@sp.setter
|
|
6592
|
-
def sp(self, arg1:
|
|
6621
|
+
def sp(self, arg1: typing.Any) -> None:
|
|
6593
6622
|
...
|
|
6594
6623
|
@property
|
|
6595
6624
|
def st(self) -> StoplossBase:
|
|
@@ -6597,7 +6626,7 @@ class System:
|
|
|
6597
6626
|
止损策略
|
|
6598
6627
|
"""
|
|
6599
6628
|
@st.setter
|
|
6600
|
-
def st(self, arg1:
|
|
6629
|
+
def st(self, arg1: typing.Any) -> None:
|
|
6601
6630
|
...
|
|
6602
6631
|
@property
|
|
6603
6632
|
def tm(self) -> TradeManager:
|
|
@@ -6605,7 +6634,7 @@ class System:
|
|
|
6605
6634
|
关联的交易管理实例
|
|
6606
6635
|
"""
|
|
6607
6636
|
@tm.setter
|
|
6608
|
-
def tm(self, arg1:
|
|
6637
|
+
def tm(self, arg1: typing.Any) -> None:
|
|
6609
6638
|
...
|
|
6610
6639
|
@property
|
|
6611
6640
|
def to(self) -> KData:
|
|
@@ -6621,7 +6650,7 @@ class System:
|
|
|
6621
6650
|
止盈策略
|
|
6622
6651
|
"""
|
|
6623
6652
|
@tp.setter
|
|
6624
|
-
def tp(self, arg1:
|
|
6653
|
+
def tp(self, arg1: typing.Any) -> None:
|
|
6625
6654
|
...
|
|
6626
6655
|
class SystemPart:
|
|
6627
6656
|
"""
|
|
@@ -8402,7 +8431,7 @@ def AGG_FUNC(ind: Indicator, agg_func: typing.Any, ktype: str = 'MIN', fill_null
|
|
|
8402
8431
|
"""
|
|
8403
8432
|
AGG_FUNC(ind, agg_func[, ktype=Query.MIN, fill_null=False, unit=1]
|
|
8404
8433
|
|
|
8405
|
-
使用自定函数聚合其他K
|
|
8434
|
+
使用自定函数聚合其他K线周期的指标。
|
|
8406
8435
|
|
|
8407
8436
|
示例, 计算日线时聚合分钟线收盘价的和:
|
|
8408
8437
|
|
|
@@ -8496,6 +8525,19 @@ def AGG_VAR(ind: Indicator, ktype: str = 'MIN', fill_null: bool = False, unit: t
|
|
|
8496
8525
|
:return: 指标数据
|
|
8497
8526
|
:rtype: Indicator
|
|
8498
8527
|
"""
|
|
8528
|
+
def AGG_VWAP(ktype: str = 'MIN', fill_null: bool = False, unit: typing.SupportsInt = 1) -> Indicator:
|
|
8529
|
+
"""
|
|
8530
|
+
AGG_VWAP([ktype=Query.MIN, fill_null=False, unit=1])
|
|
8531
|
+
|
|
8532
|
+
聚合其他K线成交量加权平均价格(Volume Weighted Average Price)
|
|
8533
|
+
VWAP 是成交量加权的平均价格,计算方式是将每一分钟(或单位时间)的成交量乘以该分钟的成交价格,然后对所有乘积求和,最后除以总成交量。
|
|
8534
|
+
|
|
8535
|
+
:param KQuery.KType ktype: 聚合的K线周期
|
|
8536
|
+
:param bool fill_null: 是否填充缺失值
|
|
8537
|
+
:param int unit: 聚合周期单位 (上下文K线分组单位, 使用日线计算分钟线聚合时, unit=2代表聚合2天的分钟线)
|
|
8538
|
+
:return: 指标数据
|
|
8539
|
+
:rtype: Indicator
|
|
8540
|
+
"""
|
|
8499
8541
|
@typing.overload
|
|
8500
8542
|
def ALIGN(ref: DatetimeList, fill_null: bool = True) -> Indicator:
|
|
8501
8543
|
...
|
|
@@ -8774,10 +8816,10 @@ def BLOCKSETNUM(block: Block, query: Query) -> Indicator:
|
|
|
8774
8816
|
:param Query query: 统计范围
|
|
8775
8817
|
"""
|
|
8776
8818
|
@typing.overload
|
|
8777
|
-
def BLOCKSETNUM(stks:
|
|
8819
|
+
def BLOCKSETNUM(stks: typing.Any) -> Indicator:
|
|
8778
8820
|
...
|
|
8779
8821
|
@typing.overload
|
|
8780
|
-
def BLOCKSETNUM(stks:
|
|
8822
|
+
def BLOCKSETNUM(stks: typing.Any, query: Query) -> Indicator:
|
|
8781
8823
|
"""
|
|
8782
8824
|
BLOCKSETNUM(block, query)
|
|
8783
8825
|
|
|
@@ -8844,12 +8886,26 @@ def CONTEXT(ind: Indicator, fill_null: bool = False, use_self_ktype: bool = Fals
|
|
|
8844
8886
|
:param bool use_self_recover_type: 公式计算时使用自身独立上下文中的RECOVER_TYPE
|
|
8845
8887
|
:rtype: Indicator
|
|
8846
8888
|
"""
|
|
8889
|
+
@typing.overload
|
|
8890
|
+
def CONTEXT(ind: Indicator, stock: Stock, fill_null: bool = False) -> Indicator:
|
|
8891
|
+
"""
|
|
8892
|
+
CONTEXT(ind, stock[, fill_null=False])
|
|
8893
|
+
|
|
8894
|
+
通过指定股票,设置指标独立上下文指标, 忽略传入ind自身上下文, 直接使用stock的作为上下文
|
|
8895
|
+
|
|
8896
|
+
:param Indicator ind: 指标对象
|
|
8897
|
+
:param Stock stock: 股票对象
|
|
8898
|
+
:param bool fill_null: 日期对齐时,缺失日期对应填充空值,否则使用前值填充。
|
|
8899
|
+
:rtype: Indicator
|
|
8900
|
+
"""
|
|
8847
8901
|
def CONTEXT_K(arg0: Indicator) -> KData:
|
|
8848
8902
|
"""
|
|
8849
8903
|
CONTEXT_K(ind)
|
|
8850
8904
|
|
|
8851
8905
|
获取指标上下文。Indicator::getContext()方法获取的是当前的上下文,但对于 CONTEXT 独立上下文指标无法获取其指定的独立上下文,需用此方法获取
|
|
8852
8906
|
|
|
8907
|
+
该指标一旦作为公式,参与计算,其上下文可能发生变化,但其stock保持不变,仅query范围发生改变
|
|
8908
|
+
|
|
8853
8909
|
:param Indicator ind: 指标对象
|
|
8854
8910
|
:rtype: KData
|
|
8855
8911
|
"""
|
|
@@ -9401,7 +9457,7 @@ def GROUP_FUNC(ind: Indicator, group_func: typing.Any, ktype: str = 'DAY', unit:
|
|
|
9401
9457
|
"""
|
|
9402
9458
|
GROUP_FUNC(ind, group_func[, ktype=Query.DAY, unit=1])
|
|
9403
9459
|
|
|
9404
|
-
|
|
9460
|
+
自定义分组累积计算指标。
|
|
9405
9461
|
|
|
9406
9462
|
示例, 计算日线时聚合分钟线收盘价的和:
|
|
9407
9463
|
|
|
@@ -9520,9 +9576,9 @@ def Hours(arg0: typing.SupportsInt) -> TimeDelta:
|
|
|
9520
9576
|
:param int hours: 小时数
|
|
9521
9577
|
:rtype: TimeDelta
|
|
9522
9578
|
"""
|
|
9523
|
-
def IC(ind: Indicator, stks: typing.Any,
|
|
9579
|
+
def IC(ind: Indicator, stks: typing.Any, n: typing.SupportsInt = 1, spearman: bool = True, strict: bool = False) -> Indicator:
|
|
9524
9580
|
"""
|
|
9525
|
-
IC(ind, stks
|
|
9581
|
+
IC(ind, stks[, n=1, spearman=True, strict=False]) -> Indicator
|
|
9526
9582
|
|
|
9527
9583
|
计算指定的因子相对于参考证券的 IC (实际为 RankIC)
|
|
9528
9584
|
|
|
@@ -9533,22 +9589,18 @@ def IC(ind: Indicator, stks: typing.Any, query: Query, ref_stk: Stock, n: typing
|
|
|
9533
9589
|
|
|
9534
9590
|
:param Indicator ind: 输入因子
|
|
9535
9591
|
:param sequence(stock)|Block stks 证券组合
|
|
9536
|
-
:param Query query: 查询条件
|
|
9537
|
-
:param Stock ref_stk: 参照证券,通常使用 sh000300 沪深300
|
|
9538
9592
|
:param int n: 时间窗口
|
|
9539
9593
|
:param bool spearman: 使用 spearman 相关系数,否则为 pearson
|
|
9540
9594
|
:param bool strict: 严格模式
|
|
9541
9595
|
"""
|
|
9542
|
-
def ICIR(ind: Indicator, stks: typing.Any,
|
|
9596
|
+
def ICIR(ind: Indicator, stks: typing.Any, n: typing.SupportsInt = 1, rolling_n: typing.SupportsInt = 120, spearman: bool = True, strict: bool = False) -> Indicator:
|
|
9543
9597
|
"""
|
|
9544
|
-
ICIR(ind, stks
|
|
9598
|
+
ICIR(ind, stks[, n=1, rolling_n=120, spearman=True, strict=False])
|
|
9545
9599
|
|
|
9546
9600
|
计算 IC 因子 IR = IC的多周期均值/IC的标准方差
|
|
9547
9601
|
|
|
9548
9602
|
:param Indicator ind: 输入因子
|
|
9549
9603
|
:param sequence(stock)|Block stks 证券组合
|
|
9550
|
-
:param Query query: 查询条件
|
|
9551
|
-
:param Stock ref_stk: 参照证券,通常使用 sh000300 沪深300
|
|
9552
9604
|
:param int n: 计算IC时对应的 n 日收益率
|
|
9553
9605
|
:param int rolling_n: 滚动周期
|
|
9554
9606
|
:param bool spearman: 使用 spearman 相关系数,否则为 pearson
|
|
@@ -10125,7 +10177,7 @@ def MDD(arg0: Indicator) -> Indicator:
|
|
|
10125
10177
|
def MF_EqualWeight() -> MultiFactorBase:
|
|
10126
10178
|
...
|
|
10127
10179
|
@typing.overload
|
|
10128
|
-
def MF_EqualWeight(inds: collections.abc.Sequence, stks:
|
|
10180
|
+
def MF_EqualWeight(inds: collections.abc.Sequence, stks: typing.Any, query: Query, ref_stk: typing.Any = None, ic_n: typing.SupportsInt = 5, spearman: bool = True, mode: typing.SupportsInt = 0, save_all_factors: bool = False) -> MultiFactorBase:
|
|
10129
10181
|
"""
|
|
10130
10182
|
MF_EqualWeight(inds, stks, query, ref_stk[, ic_n=5])
|
|
10131
10183
|
|
|
@@ -10134,7 +10186,7 @@ def MF_EqualWeight(inds: collections.abc.Sequence, stks: collections.abc.Sequenc
|
|
|
10134
10186
|
:param sequense(Indicator) inds: 原始因子列表
|
|
10135
10187
|
:param sequense(stock) stks: 计算证券列表
|
|
10136
10188
|
:param Query query: 日期范围
|
|
10137
|
-
:param Stock ref_stk:
|
|
10189
|
+
:param Stock ref_stk: 参考证券用于日期对齐 (未指定时,默认为 sh000001)
|
|
10138
10190
|
:param int ic_n: 默认 IC 对应的 N 日收益率
|
|
10139
10191
|
:param bool spearman: 默认使用 spearman 计算相关系数,否则为 pearson
|
|
10140
10192
|
:param int mode: 获取截面数据时排序模式: 0-降序, 1-升序, 2-不排序
|
|
@@ -10145,16 +10197,16 @@ def MF_EqualWeight(inds: collections.abc.Sequence, stks: collections.abc.Sequenc
|
|
|
10145
10197
|
def MF_ICIRWeight() -> MultiFactorBase:
|
|
10146
10198
|
...
|
|
10147
10199
|
@typing.overload
|
|
10148
|
-
def MF_ICIRWeight(inds: collections.abc.Sequence, stks:
|
|
10200
|
+
def MF_ICIRWeight(inds: collections.abc.Sequence, stks: typing.Any, query: Query, ref_stk: typing.Any = None, ic_n: typing.SupportsInt = 5, ic_rolling_n: typing.SupportsInt = 120, spearman: bool = True, mode: typing.SupportsInt = 0, save_all_factors: bool = False) -> MultiFactorBase:
|
|
10149
10201
|
"""
|
|
10150
|
-
|
|
10202
|
+
MF_ICIRWeight(inds, stks, query, ref_stk[, ic_n=5, ic_rolling_n=120])
|
|
10151
10203
|
|
|
10152
10204
|
滚动ICIR权重合成因子
|
|
10153
10205
|
|
|
10154
10206
|
:param sequense(Indicator) inds: 原始因子列表
|
|
10155
10207
|
:param sequense(stock) stks: 计算证券列表
|
|
10156
10208
|
:param Query query: 日期范围
|
|
10157
|
-
:param Stock ref_stk:
|
|
10209
|
+
:param Stock ref_stk: 用于日期对齐的参考证券 (未指定时,默认为 sh000001)
|
|
10158
10210
|
:param int ic_n: 默认 IC 对应的 N 日收益率
|
|
10159
10211
|
:param int ic_rolling_n: IC 滚动周期
|
|
10160
10212
|
:param bool spearman: 默认使用 spearman 计算相关系数,否则为 pearson
|
|
@@ -10166,16 +10218,16 @@ def MF_ICIRWeight(inds: collections.abc.Sequence, stks: collections.abc.Sequence
|
|
|
10166
10218
|
def MF_ICWeight() -> MultiFactorBase:
|
|
10167
10219
|
...
|
|
10168
10220
|
@typing.overload
|
|
10169
|
-
def MF_ICWeight(inds: collections.abc.Sequence, stks:
|
|
10221
|
+
def MF_ICWeight(inds: collections.abc.Sequence, stks: typing.Any, query: Query, ref_stk: typing.Any = None, ic_n: typing.SupportsInt = 5, ic_rolling_n: typing.SupportsInt = 120, spearman: bool = True, mode: typing.SupportsInt = 0, save_all_factors: bool = False) -> MultiFactorBase:
|
|
10170
10222
|
"""
|
|
10171
|
-
|
|
10223
|
+
MF_ICWeight(inds, stks, query, ref_stk[, ic_n=5, ic_rolling_n=120])
|
|
10172
10224
|
|
|
10173
10225
|
滚动IC权重合成因子
|
|
10174
10226
|
|
|
10175
10227
|
:param sequense(Indicator) inds: 原始因子列表
|
|
10176
10228
|
:param sequense(stock) stks: 计算证券列表
|
|
10177
10229
|
:param Query query: 日期范围
|
|
10178
|
-
:param Stock ref_stk:
|
|
10230
|
+
:param Stock ref_stk: 用于日期对齐的参考证券 (未指定时,默认为 sh000001)
|
|
10179
10231
|
:param int ic_n: 默认 IC 对应的 N 日收益率
|
|
10180
10232
|
:param int ic_rolling_n: IC 滚动周期
|
|
10181
10233
|
:param bool spearman: 默认使用 spearman 计算相关系数,否则为 pearson
|
|
@@ -10187,7 +10239,7 @@ def MF_ICWeight(inds: collections.abc.Sequence, stks: collections.abc.Sequence,
|
|
|
10187
10239
|
def MF_Weight() -> MultiFactorBase:
|
|
10188
10240
|
...
|
|
10189
10241
|
@typing.overload
|
|
10190
|
-
def MF_Weight(inds: collections.abc.Sequence, stks:
|
|
10242
|
+
def MF_Weight(inds: collections.abc.Sequence, stks: typing.Any, weights: collections.abc.Sequence, query: Query, ref_stk: typing.Any = None, ic_n: typing.SupportsInt = 5, spearman: bool = True, mode: typing.SupportsInt = 0, save_all_factors: bool = False) -> MultiFactorBase:
|
|
10191
10243
|
"""
|
|
10192
10244
|
MF_Weight(inds, stks, weights, query, ref_stk[, ic_n=5, spearman=True, mode=0, save_all_factors=False])
|
|
10193
10245
|
|
|
@@ -10197,7 +10249,7 @@ def MF_Weight(inds: collections.abc.Sequence, stks: collections.abc.Sequence, we
|
|
|
10197
10249
|
:param sequense(stock) stks: 计算证券列表
|
|
10198
10250
|
:param sequense(float) weights: 权重列表(需和 inds 等长)
|
|
10199
10251
|
:param Query query: 日期范围
|
|
10200
|
-
:param Stock ref_stk:
|
|
10252
|
+
:param Stock ref_stk: 参考证券用于日期对齐 (未指定时,默认为 sh000001)
|
|
10201
10253
|
:param int ic_n: 默认 IC 对应的 N 日收益率
|
|
10202
10254
|
:param bool spearman: 默认使用 spearman 计算相关系数,否则为 pearson
|
|
10203
10255
|
:param int mode: 获取截面数据时排序模式: 0-降序, 1-升序, 2-不排序
|
|
@@ -10449,7 +10501,7 @@ def NOT(arg0: Indicator) -> Indicator:
|
|
|
10449
10501
|
:param Indicator data: 输入数据
|
|
10450
10502
|
:rtype: Indicator
|
|
10451
10503
|
"""
|
|
10452
|
-
def PF_Simple(tm:
|
|
10504
|
+
def PF_Simple(tm: typing.Any = None, se: typing.Any = ..., af: typing.Any = ..., adjust_cycle: typing.SupportsInt = 1, adjust_mode: str = 'query', delay_to_trading_day: bool = True) -> Portfolio:
|
|
10453
10505
|
"""
|
|
10454
10506
|
PF_Simple([tm, se, af, adjust_cycle=1, adjust_mode="query", delay_to_trading_day=True])
|
|
10455
10507
|
|
|
@@ -10472,7 +10524,7 @@ def PF_Simple(tm: TradeManager = None, se: SelectorBase = ..., af: AllocateFunds
|
|
|
10472
10524
|
:param str adjust_mode: 调仓模式
|
|
10473
10525
|
:param bool delay_to_trading_day: 如果当日不是交易日将会被顺延至当前周期内的第一个交易日
|
|
10474
10526
|
"""
|
|
10475
|
-
def PF_WithoutAF(tm:
|
|
10527
|
+
def PF_WithoutAF(tm: typing.Any = None, se: typing.Any = ..., adjust_cycle: typing.SupportsInt = 1, adjust_mode: str = 'query', delay_to_trading_day: bool = True, trade_on_close: bool = True, sys_use_self_tm: bool = False, sell_at_not_selected: bool = False) -> Portfolio:
|
|
10476
10528
|
"""
|
|
10477
10529
|
PF_WithoutAF([tm, se, adjust_cycle=1, adjust_mode="query", delay_to_trading_day=True, trade_on_close=True, sys_use_self_tm=False,sell_at_not_selected=False])
|
|
10478
10530
|
|
|
@@ -10590,7 +10642,7 @@ def QUANTILE_TRUNC(data: Indicator, n: typing.SupportsInt = 60, quantial_min: ty
|
|
|
10590
10642
|
:rtype: Indicator
|
|
10591
10643
|
"""
|
|
10592
10644
|
@typing.overload
|
|
10593
|
-
def RANK(stks:
|
|
10645
|
+
def RANK(stks: typing.Any, mode: typing.SupportsInt = 0, fill_null: bool = True, market: str = 'SH') -> Indicator:
|
|
10594
10646
|
...
|
|
10595
10647
|
@typing.overload
|
|
10596
10648
|
def RANK(stks: collections.abc.Sequence, ref_ind: Indicator, mode: typing.SupportsInt = 0, fill_null: bool = True, market: str = 'SH') -> Indicator:
|
|
@@ -11012,7 +11064,7 @@ def SE_EvaluateOptimal(arg0: typing.Any) -> SelectorBase:
|
|
|
11012
11064
|
def SE_Fixed(weight: typing.SupportsFloat = 1.0) -> SelectorBase:
|
|
11013
11065
|
...
|
|
11014
11066
|
@typing.overload
|
|
11015
|
-
def SE_Fixed(stk_list:
|
|
11067
|
+
def SE_Fixed(stk_list: typing.Any, sys: ..., weight: typing.SupportsFloat = 1.0) -> SelectorBase:
|
|
11016
11068
|
"""
|
|
11017
11069
|
SE_Fixed([stk_list, sys])
|
|
11018
11070
|
|
|
@@ -11046,7 +11098,7 @@ def SE_MultiFactor(inds: collections.abc.Sequence, topn: typing.SupportsInt = 10
|
|
|
11046
11098
|
:param int topn: 只选取时间截面中前 topn 个系统,小于等于0时代表不限制
|
|
11047
11099
|
:param int ic_n: 默认 IC 对应的 N 日收益率
|
|
11048
11100
|
:param int ic_rolling_n: IC 滚动周期
|
|
11049
|
-
:param Stock ref_stk:
|
|
11101
|
+
:param Stock ref_stk: 参考证券,用于日期对齐,未指定时为 sh000001
|
|
11050
11102
|
:param bool spearman: 默认使用 spearman 计算相关系数,否则为 pearson
|
|
11051
11103
|
:param str mode: "MF_ICIRWeight" | "MF_ICWeight" | "MF_EqualWeight" 因子合成算法名称
|
|
11052
11104
|
"""
|
|
@@ -11067,7 +11119,7 @@ def SE_MultiFactor2(inds: collections.abc.Sequence, ic_n: typing.SupportsInt = 5
|
|
|
11067
11119
|
:param sequense(Indicator) inds: 原始因子列表
|
|
11068
11120
|
:param int ic_n: 默认 IC 对应的 N 日收益率
|
|
11069
11121
|
:param int ic_rolling_n: IC 滚动周期
|
|
11070
|
-
:param Stock ref_stk:
|
|
11122
|
+
:param Stock ref_stk: 参考证券,用于日期对齐,未指定时为 sh000001
|
|
11071
11123
|
:param bool spearman: 默认使用 spearman 计算相关系数,否则为 pearson
|
|
11072
11124
|
:param str mode: "MF_ICIRWeight" | "MF_ICWeight" | "MF_EqualWeight" 因子合成算法名称
|
|
11073
11125
|
"""
|
|
@@ -14277,7 +14329,7 @@ def bind_email(arg0: str, arg1: str) -> None:
|
|
|
14277
14329
|
"""
|
|
14278
14330
|
def can_upgrade() -> bool:
|
|
14279
14331
|
...
|
|
14280
|
-
def check_data(stock_list:
|
|
14332
|
+
def check_data(stock_list: typing.Any, start_date: Datetime, end_date: Datetime, ktype: str) -> tuple:
|
|
14281
14333
|
"""
|
|
14282
14334
|
检查数据
|
|
14283
14335
|
"""
|
|
@@ -14349,6 +14401,15 @@ def df_to_krecords(df: typing.Any, columns: collections.abc.Sequence[str] = ['da
|
|
|
14349
14401
|
:param dict columns: 指定DataFrame的列名,对应KRecord的成员变量名称
|
|
14350
14402
|
:return: 转换后的KRecordList
|
|
14351
14403
|
"""
|
|
14404
|
+
def enable_kdata_cache(enable: bool) -> None:
|
|
14405
|
+
"""
|
|
14406
|
+
enable_kdata_cache(enable)
|
|
14407
|
+
|
|
14408
|
+
启用或禁用K线数据缓存
|
|
14409
|
+
|
|
14410
|
+
:param bool enable: 是否启用K线数据缓存
|
|
14411
|
+
:return: None
|
|
14412
|
+
"""
|
|
14352
14413
|
def fetch_trial_license(arg0: str) -> str:
|
|
14353
14414
|
"""
|
|
14354
14415
|
fetch_trial_license(email: str)
|
hikyuu/cpp/hikyuu.dll
CHANGED
|
Binary file
|
hikyuu/cpp/hikyuu.lib
CHANGED
|
Binary file
|
hikyuu/cpp/i18n/zh_CN/hikyuu.mo
CHANGED
|
Binary file
|
|
Binary file
|
hikyuu/cpp/mimalloc.dll
ADDED
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
ALTER TABLE `hku_base`.`stocktypeinfo`
|
|
2
|
+
UPDATE `minTradeNumber` = CASE
|
|
3
|
+
WHEN `type` = 9 AND `description` = '科创板' THEN 200
|
|
4
|
+
WHEN `type` = 11 AND `description` = '北交所' THEN 100
|
|
5
|
+
ELSE `minTradeNumber`
|
|
6
|
+
END
|
|
7
|
+
WHERE (`type` = 9 AND `description` = '科创板')
|
|
8
|
+
OR (`type` = 11 AND `description` = '北交所');
|
|
9
|
+
ALTER TABLE `hku_base`.`version` UPDATE `version`=2 WHERE `id`=0;
|
hikyuu/data/common_mysql.py
CHANGED
|
@@ -502,7 +502,7 @@ def update_extern_data(connect, market, code, data_type):
|
|
|
502
502
|
if insert_buffer:
|
|
503
503
|
cur = connect.cursor()
|
|
504
504
|
cur.executemany(
|
|
505
|
-
"
|
|
505
|
+
"replace into {} (date, open, high, low, close, amount, count) \
|
|
506
506
|
values (%s, %s, %s, %s, %s, %s, %s)".format(index_table), insert_buffer
|
|
507
507
|
)
|
|
508
508
|
connect.commit()
|