hikyuu 2.5.2__py3-none-win_amd64.whl → 2.5.3__py3-none-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. hikyuu/__init__.py +5 -1
  2. hikyuu/__init__.pyi +520 -510
  3. hikyuu/analysis/__init__.pyi +489 -485
  4. hikyuu/analysis/analysis.pyi +490 -486
  5. hikyuu/core.pyi +491 -487
  6. hikyuu/cpp/__init__.pyi +2 -2
  7. hikyuu/cpp/core310.pyd +0 -0
  8. hikyuu/cpp/core310.pyi +231 -26
  9. hikyuu/cpp/core311.pyd +0 -0
  10. hikyuu/cpp/core311.pyi +231 -26
  11. hikyuu/cpp/core312.pyd +0 -0
  12. hikyuu/cpp/core312.pyi +231 -26
  13. hikyuu/cpp/core313.pyd +0 -0
  14. hikyuu/cpp/core313.pyi +225 -26
  15. hikyuu/cpp/core38.pyd +0 -0
  16. hikyuu/cpp/core38.pyi +231 -26
  17. hikyuu/cpp/core39.pyd +0 -0
  18. hikyuu/cpp/core39.pyi +231 -26
  19. hikyuu/cpp/hikyuu.dll +0 -0
  20. hikyuu/cpp/hikyuu.lib +0 -0
  21. hikyuu/data/mysql_upgrade/0027.sql +6 -0
  22. hikyuu/data/pytdx_to_h5.py +7 -4
  23. hikyuu/data/pytdx_to_mysql.py +7 -4
  24. hikyuu/data/sqlite_upgrade/0027.sql +8 -0
  25. hikyuu/draw/__init__.pyi +1 -1
  26. hikyuu/draw/drawplot/__init__.py +8 -1
  27. hikyuu/draw/drawplot/__init__.pyi +12 -8
  28. hikyuu/draw/drawplot/bokeh_draw.pyi +508 -500
  29. hikyuu/draw/drawplot/common.pyi +1 -1
  30. hikyuu/draw/drawplot/echarts_draw.pyi +510 -502
  31. hikyuu/draw/drawplot/matplotlib_draw.py +129 -8
  32. hikyuu/draw/drawplot/matplotlib_draw.pyi +570 -515
  33. hikyuu/draw/elder.pyi +11 -11
  34. hikyuu/draw/kaufman.pyi +18 -18
  35. hikyuu/draw/volume.pyi +10 -10
  36. hikyuu/extend.pyi +500 -495
  37. hikyuu/hub.py +112 -6
  38. hikyuu/hub.pyi +39 -13
  39. hikyuu/include/hikyuu/DataType.h +1 -2
  40. hikyuu/include/hikyuu/StockManager.h +2 -1
  41. hikyuu/include/hikyuu/StrategyContext.h +12 -3
  42. hikyuu/include/hikyuu/indicator/Indicator.h +24 -0
  43. hikyuu/include/hikyuu/indicator/Indicator2InImp.h +1 -0
  44. hikyuu/include/hikyuu/indicator/build_in.h +2 -0
  45. hikyuu/include/hikyuu/indicator/crt/ATR.h +2 -13
  46. hikyuu/include/hikyuu/indicator/crt/KALMAN.h +30 -0
  47. hikyuu/include/hikyuu/indicator/crt/TR.h +32 -0
  48. hikyuu/include/hikyuu/indicator/imp/IAtr.h +3 -1
  49. hikyuu/include/hikyuu/indicator/imp/IKalman.h +27 -0
  50. hikyuu/include/hikyuu/indicator/imp/ITr.h +35 -0
  51. hikyuu/include/hikyuu/python/convert_any.h +299 -0
  52. hikyuu/include/hikyuu/trade_manage/PositionRecord.h +5 -4
  53. hikyuu/include/hikyuu/trade_sys/allocatefunds/crt/AF_MultiFactor.h +1 -1
  54. hikyuu/include/hikyuu/trade_sys/allocatefunds/imp/MultiFactorAllocaterFunds.h +3 -0
  55. hikyuu/include/hikyuu/trade_sys/condition/ConditionBase.h +4 -1
  56. hikyuu/include/hikyuu/trade_sys/condition/imp/{SubCondition.h → logic/SubCondition.h} +1 -1
  57. hikyuu/include/hikyuu/trade_sys/environment/EnvironmentBase.h +20 -6
  58. hikyuu/include/hikyuu/trade_sys/environment/build_in.h +1 -0
  59. hikyuu/include/hikyuu/trade_sys/environment/crt/EV_Logic.h +35 -0
  60. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/AddEnvironment.h +42 -0
  61. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/AndEnvironment.h +42 -0
  62. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/DivEnvironment.h +42 -0
  63. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/MultiEnvironment.h +42 -0
  64. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/OrEnvironment.h +42 -0
  65. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/SubEnvironment.h +42 -0
  66. hikyuu/include/hikyuu/trade_sys/environment/imp/logic/__init__.py +1 -0
  67. hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +0 -4
  68. hikyuu/include/hikyuu/trade_sys/signal/crt/SG_Logic.h +68 -7
  69. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/AndSignal.h +19 -0
  70. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorSignal.h +1 -0
  71. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OperatorValueSignal.h +1 -0
  72. hikyuu/include/hikyuu/trade_sys/signal/imp/logic/OrSignal.h +19 -0
  73. hikyuu/include/hikyuu/version.h +4 -4
  74. hikyuu/indicator/indicator.py +1 -0
  75. hikyuu/trade_manage/__init__.pyi +505 -499
  76. hikyuu/trade_manage/broker.pyi +3 -3
  77. hikyuu/trade_manage/broker_easytrader.pyi +1 -1
  78. hikyuu/trade_manage/trade.pyi +505 -499
  79. hikyuu/trade_sys/trade_sys.py +4 -3
  80. hikyuu/util/__init__.pyi +2 -2
  81. hikyuu/util/singleton.pyi +1 -1
  82. {hikyuu-2.5.2.dist-info → hikyuu-2.5.3.dist-info}/METADATA +3 -2
  83. {hikyuu-2.5.2.dist-info → hikyuu-2.5.3.dist-info}/RECORD +87 -70
  84. {hikyuu-2.5.2.dist-info → hikyuu-2.5.3.dist-info}/top_level.txt +1 -0
  85. {hikyuu-2.5.2.dist-info → hikyuu-2.5.3.dist-info}/LICENSE +0 -0
  86. {hikyuu-2.5.2.dist-info → hikyuu-2.5.3.dist-info}/WHEEL +0 -0
  87. {hikyuu-2.5.2.dist-info → hikyuu-2.5.3.dist-info}/entry_points.txt +0 -0
hikyuu/cpp/core312.pyi CHANGED
@@ -1,11 +1,36 @@
1
1
  from __future__ import annotations
2
2
  import numpy
3
3
  import typing
4
- __all__ = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', 'AF_FixedWeight', 'AF_FixedWeightList', 'AF_MultiFactor', 'ALIGN', 'AMA', 'ASIN', 'ATAN', 'ATR', 'AVEDEV', 'AllocateFundsBase', 'BACKSET', 'BARSCOUNT', 'BARSLAST', 'BARSSINCE', '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', 'DIRECT', 'DISCARD', 'DMA', 'DOWNNDAY', 'DROPNA', 'DataDriverFactory', 'Datetime', 'DatetimeList', 'Days', 'EMA', 'ERROR', 'EVERY', 'EV_Bool', 'EV_TwoLine', 'EXIST', 'EXP', 'EnvironmentBase', 'FATAL', 'FILTER', 'FINANCE', 'FLOOR', 'FundsRecord', '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', 'KDATA_PART', 'KData', 'KDataDriver', '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', 'NOT', 'OFF', 'OrderBrokerBase', 'PF_Simple', 'PF_WithoutAF', 'PG_FixedHoldDays', 'PG_FixedPercent', 'PG_NoGoal', 'POS', 'POW', 'PRICELIST', 'Parameter', 'Performance', 'Portfolio', 'PositionRecord', 'PositionRecordList', 'ProfitGoalBase', 'Query', 'RECOVER_BACKWARD', 'RECOVER_EQUAL_BACKWARD', 'RECOVER_EQUAL_FORWARD', 'RECOVER_FORWARD', 'REF', 'REPLACE', 'RESULT', 'REVERSE', 'ROC', 'ROCP', 'ROCR', 'ROCR100', 'ROUND', 'ROUNDDOWN', 'ROUNDUP', 'RSI', 'SAFTYLOSS', 'SE_Fixed', 'SE_MaxFundsOptimal', 'SE_MultiFactor', 'SE_PerformanceOptimal', 'SE_Signal', 'SGN', 'SG_Add', 'SG_AllwaysBuy', 'SG_Band', 'SG_Bool', 'SG_Buy', 'SG_Cross', 'SG_CrossGold', 'SG_Cycle', 'SG_Div', 'SG_Flex', 'SG_Mul', 'SG_OneSide', 'SG_Sell', 'SG_Single', 'SG_Single2', 'SG_Sub', 'SIN', 'SLICE', 'SLOPE', 'SMA', 'SPEARMAN', 'SP_FixedPercent', 'SP_FixedValue', 'SQRT', 'STDEV', 'STDP', 'ST_FixedPercent', 'ST_Indicator', 'ST_Saftyloss', 'SUM', 'SUMBARS', 'SYS_Simple', 'SYS_WalkForward', 'ScoreRecord', 'ScoreRecordList', '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', 'TRACE', 'TURNOVER', 'TimeDelta', 'TimeLineList', 'TimeLineRecord', 'TradeCostBase', 'TradeManager', 'TradeRecord', 'TradeRecordList', 'TradeRequest', 'TransList', 'TransRecord', 'UPNDAY', 'VAR', 'VARP', 'VIGOR', 'WARN', 'WEAVE', 'WEEK', 'WINNER', 'WMA', 'YEAR', 'ZHBOND10', 'ZONGGUBEN', 'ZSCORE', 'batch_calculate_inds', 'can_upgrade', 'close_ostream_to_python', 'close_spend_time', 'combinate_ind', 'combinate_index', 'constant', 'crtBrokerTM', 'crtSEOptimal', 'crtTM', 'crt_pf_strategy', 'crt_sys_strategy', 'find_optimal_system', 'find_optimal_system_multi', 'get_block', 'get_business_name', 'get_data_from_buffer_server', 'get_date_range', 'get_kdata', 'get_last_version', 'get_log_level', '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', 'isinf', 'isnan', 'open_ostream_to_python', 'open_spend_time', 'roundDown', 'roundEx', 'roundUp', 'run_in_strategy', 'set_log_level', 'set_python_in_interactive', 'set_python_in_jupyter', 'start_spot_agent', 'stop_spot_agent', 'toPriceList']
4
+ __all__ = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', 'AF_FixedWeight', 'AF_FixedWeightList', 'AF_MultiFactor', 'ALIGN', 'AMA', 'ASIN', 'ATAN', 'ATR', 'AVEDEV', 'AllocateFundsBase', 'BACKSET', 'BARSCOUNT', 'BARSLAST', 'BARSSINCE', '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', 'DIRECT', 'DISCARD', 'DMA', 'DOWNNDAY', 'DROPNA', 'DataDriverFactory', 'Datetime', 'DatetimeList', 'Days', 'EMA', 'ERROR', 'EVERY', 'EV_Bool', 'EV_TwoLine', 'EXIST', 'EXP', 'EnvironmentBase', 'FATAL', 'FILTER', 'FINANCE', 'FLOOR', 'FundsRecord', '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', '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', 'NOT', 'OFF', 'OrderBrokerBase', 'PF_Simple', 'PF_WithoutAF', 'PG_FixedHoldDays', 'PG_FixedPercent', 'PG_NoGoal', 'POS', 'POW', 'PRICELIST', 'Parameter', 'Performance', 'Portfolio', 'PositionRecord', 'PositionRecordList', 'ProfitGoalBase', 'Query', 'RECOVER_BACKWARD', 'RECOVER_EQUAL_BACKWARD', 'RECOVER_EQUAL_FORWARD', 'RECOVER_FORWARD', 'REF', 'REPLACE', 'RESULT', 'REVERSE', 'ROC', 'ROCP', 'ROCR', 'ROCR100', 'ROUND', 'ROUNDDOWN', 'ROUNDUP', 'RSI', 'SAFTYLOSS', 'SE_Fixed', 'SE_MaxFundsOptimal', 'SE_MultiFactor', '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', 'SQRT', 'STDEV', 'STDP', 'ST_FixedPercent', 'ST_Indicator', 'ST_Saftyloss', 'SUM', 'SUMBARS', 'SYS_Simple', 'SYS_WalkForward', 'ScoreRecord', 'ScoreRecordList', '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', 'VAR', 'VARP', 'VIGOR', 'WARN', 'WEAVE', 'WEEK', 'WINNER', 'WMA', 'YEAR', 'ZHBOND10', 'ZONGGUBEN', 'ZSCORE', 'batch_calculate_inds', 'can_upgrade', 'close_ostream_to_python', 'close_spend_time', 'combinate_ind', 'combinate_index', 'constant', 'crtBrokerTM', 'crtSEOptimal', 'crtTM', 'crt_pf_strategy', 'crt_sys_strategy', 'find_optimal_system', 'find_optimal_system_multi', 'get_block', 'get_business_name', 'get_data_from_buffer_server', 'get_date_range', 'get_kdata', 'get_last_version', 'get_log_level', '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', 'isinf', 'isnan', 'open_ostream_to_python', 'open_spend_time', 'roundDown', 'roundEx', 'roundUp', 'run_in_strategy', 'set_log_level', 'set_python_in_interactive', 'set_python_in_jupyter', 'start_spot_agent', 'stop_spot_agent', 'toPriceList']
5
5
  class AllocateFundsBase:
6
6
  """
7
7
  资产分配算法基类, 子类接口:
8
8
 
9
+ 公共参数:
10
+
11
+ - adjust_running_sys (bool|True): 是否调整之前已经持仓策略的持仓。不调整时,仅使用总账户当前剩余资金进行分配,否则将使用总市值进行分配
12
+ 注意: 无论是否调整已持仓策略,权重比例都是相对于总资产,不是针对剩余现金余额
13
+ 仅针对剩余现金比例调整没有意义,即使分配由于交易成本原因可能也无法完成实际交易
14
+ adjust_running_sys: True - 主动根据资产分配对已持仓策略进行增减仓
15
+ adjust_running_sys: False - 不会根据当前分配权重对已持仓策略进行强制加减仓
16
+
17
+ - auto_adjust_weight (bool|True): 自动调整权重,此时认为传入的权重为各证券的相互比例(详见ignore_zero_weight说明)。否则,以传入的权重为指定权重不做调整(此时传入的各个权重需要小于1)。
18
+
19
+ - ignore_zero_weight (bool|False): 该参数在 auto_adjust_weight 时生效。是否过滤子类返回的比例权重列表中的 0 值(包含小于0)和 nan 值。
20
+
21
+ 如:子类返回权重比例列表 [6, 2, 0, 0, 0], 则
22
+ - 过滤 0 值,则实际调整后的权重为 Xi / sum(Xi):[6/8, 2/8]
23
+ - 不过滤,m 设为非零元素个数,n为总元素个数,(Xi / Sum(Xi)) * (m / n):
24
+ [(6/8)*(2/5), (2/8)*(2/5), 0, 0, 0]
25
+ 即,保留分为5份后,仅在2份中保持相对比例
26
+
27
+ - ignore_se_score_is_null (bool|False): 忽略选中系统列表中的系统得分为 null 的系统. 注意:某些SE(如SE_MultiFactor)本身可能也存在类似控制
28
+ - ignore_se_score_lt_zero (bool|False): 忽略选中系统列表中的系统得分小于等于 0 的系统
29
+ - reserve_percent (float|0.0): 保留不参与重分配的资产比例
30
+ - trace (bool|False): 打印跟踪信息
31
+
32
+ 子类接口:
33
+
9
34
  - _allocateWeight : 【必须】子类资产分配调整实现
10
35
  - _clone : 【必须】克隆接口
11
36
  - _reset : 【可选】重载私有变量
@@ -457,7 +482,7 @@ class ConditionBase:
457
482
  def _pybind11_conduit_v1_(*args, **kwargs):
458
483
  ...
459
484
  @staticmethod
460
- def plot(cn, new = True, axes = None, kdata = None):
485
+ def plot(cn, new = True, axes = None, kdata = None, upcolor = 'red', downcolor = 'blue', alpha = 0.2):
461
486
  """
462
487
  绘制系统有效条件
463
488
 
@@ -466,6 +491,9 @@ class ConditionBase:
466
491
  :param axes: 指定在那个轴对象中进行绘制
467
492
  :param KData kdata: 指定的KData,如该值为None,则认为该系统有效条件已经
468
493
  指定了交易对象,否则,使用该参数作为交易对象
494
+ :param upcolor: 有效数时的颜色
495
+ :param downcolor: 无效时的颜色
496
+ :param alpha: 透明度
469
497
 
470
498
  """
471
499
  def __add__(self, arg0: ConditionBase) -> ConditionBase:
@@ -1303,7 +1331,7 @@ class EnvironmentBase:
1303
1331
  def _pybind11_conduit_v1_(*args, **kwargs):
1304
1332
  ...
1305
1333
  @staticmethod
1306
- def plot(ev, ref_kdata, new = True, axes = None):
1334
+ def plot(ev, ref_kdata, new = True, axes = None, upcolor = 'red', downcolor = 'blue', alpha = 0.2):
1307
1335
  """
1308
1336
  绘制市场有效判断
1309
1337
 
@@ -1311,8 +1339,15 @@ class EnvironmentBase:
1311
1339
  :param KData ref_kdata: 用于日期参考
1312
1340
  :param new: 仅在未指定axes的情况下生效,当为True时,创建新的窗口对象并在其中进行绘制
1313
1341
  :param axes: 指定在那个轴对象中进行绘制
1342
+ :param upcolor: 有效时的颜色
1343
+ :param downcolor: 无效时的颜色
1344
+ :param alpha: 透明度
1314
1345
 
1315
1346
  """
1347
+ def __add__(self, arg0: EnvironmentBase) -> EnvironmentBase:
1348
+ ...
1349
+ def __and__(self, arg0: EnvironmentBase) -> EnvironmentBase:
1350
+ ...
1316
1351
  def __getstate__(self) -> tuple:
1317
1352
  ...
1318
1353
  @typing.overload
@@ -1324,13 +1359,21 @@ class EnvironmentBase:
1324
1359
  @typing.overload
1325
1360
  def __init__(self, arg0: str) -> None:
1326
1361
  ...
1362
+ def __mul__(self, arg0: EnvironmentBase) -> EnvironmentBase:
1363
+ ...
1364
+ def __or__(self, arg0: EnvironmentBase) -> EnvironmentBase:
1365
+ ...
1327
1366
  def __repr__(self) -> str:
1328
1367
  ...
1329
1368
  def __setstate__(self, arg0: tuple) -> None:
1330
1369
  ...
1331
1370
  def __str__(self) -> str:
1332
1371
  ...
1333
- def _add_valid(self, arg0: Datetime) -> None:
1372
+ def __sub__(self, arg0: EnvironmentBase) -> EnvironmentBase:
1373
+ ...
1374
+ def __truediv__(self, arg0: EnvironmentBase) -> EnvironmentBase:
1375
+ ...
1376
+ def _add_valid(self, arg0: Datetime, arg1: float) -> None:
1334
1377
  """
1335
1378
  _add_valid(self, datetime)
1336
1379
 
@@ -1535,7 +1578,6 @@ class Indicator:
1535
1578
  """
1536
1579
  技术指标
1537
1580
  """
1538
- __hash__: typing.ClassVar[None] = None
1539
1581
  @staticmethod
1540
1582
  def __getitem__(data, i):
1541
1583
  """
@@ -1581,6 +1623,21 @@ class Indicator:
1581
1623
  :rtype: bool
1582
1624
  """
1583
1625
  @staticmethod
1626
+ def heatmap(ind, axes = None):
1627
+ """
1628
+
1629
+ 绘制指标收益年-月收益热力图
1630
+
1631
+ 指标收益率 = (当前月末值 - 上月末值) / 上月末值 * 100
1632
+
1633
+ 指标应已计算(即有值),且为时间序列
1634
+
1635
+ :param ind: 指定指标
1636
+ :param axes: 绘制的轴对象,默认为None,表示创建新的轴对象
1637
+ :return: None
1638
+
1639
+ """
1640
+ @staticmethod
1584
1641
  def plot(indicator, new = True, axes = None, kref = None, legend_on = False, text_on = False, text_color = 'k', zero_on = False, label = None, linestyle = '-', *args, **kwargs):
1585
1642
  """
1586
1643
  绘制indicator曲线
@@ -1655,6 +1712,8 @@ class Indicator:
1655
1712
  @typing.overload
1656
1713
  def __gt__(self, arg0: float) -> Indicator:
1657
1714
  ...
1715
+ def __hash__(self) -> int:
1716
+ ...
1658
1717
  @typing.overload
1659
1718
  def __init__(self) -> None:
1660
1719
  ...
@@ -3250,8 +3309,23 @@ class Portfolio:
3250
3309
  def _pybind11_conduit_v1_(*args, **kwargs):
3251
3310
  ...
3252
3311
  @staticmethod
3312
+ def heatmap(sys, axes = None):
3313
+ """
3314
+
3315
+ 绘制系统收益年-月收益热力图
3316
+
3317
+ """
3318
+ @staticmethod
3253
3319
  def performance(sys, ref_stk = None):
3254
- ...
3320
+ """
3321
+
3322
+ 绘制系统绩效,即账户累积收益率曲线
3323
+
3324
+ :param SystemBase | PortfolioBase sys: SYS或PF实例
3325
+ :param Stock ref_stk: 参考股票, 默认为沪深300: sh000300, 绘制参考标的的收益曲线
3326
+ :return: None
3327
+
3328
+ """
3255
3329
  def __getstate__(self) -> tuple:
3256
3330
  ...
3257
3331
  @typing.overload
@@ -3470,7 +3544,10 @@ class PositionRecord:
3470
3544
  @property
3471
3545
  def total_profit(self) -> float:
3472
3546
  """
3473
- 累计盈利 = 累计卖出资金 - 累计买入资金 - 累计交易成本
3547
+ total_profit(self):
3548
+
3549
+ 累计盈利 = 累计卖出资金 - 累计买入资金 - 累计交易成本
3550
+ 注意: 只对已清仓的记录有效, 未清仓的记录返回0
3474
3551
  """
3475
3552
  @property
3476
3553
  def total_risk(self) -> float:
@@ -5617,6 +5694,14 @@ class StrategyContext:
5617
5694
  def ktype_list(self, arg1: list[str]) -> None:
5618
5695
  ...
5619
5696
  @property
5697
+ def preload_num(self) -> dict[str, int]:
5698
+ """
5699
+ 预加载数量
5700
+ """
5701
+ @preload_num.setter
5702
+ def preload_num(self, arg1: dict[str, int]) -> None:
5703
+ ...
5704
+ @property
5620
5705
  def start_datetime(self) -> Datetime:
5621
5706
  """
5622
5707
  起始日期
@@ -5660,8 +5745,23 @@ class System:
5660
5745
  def _pybind11_conduit_v1_(*args, **kwargs):
5661
5746
  ...
5662
5747
  @staticmethod
5748
+ def heatmap(sys, axes = None):
5749
+ """
5750
+
5751
+ 绘制系统收益年-月收益热力图
5752
+
5753
+ """
5754
+ @staticmethod
5663
5755
  def performance(sys, ref_stk = None):
5664
- ...
5756
+ """
5757
+
5758
+ 绘制系统绩效,即账户累积收益率曲线
5759
+
5760
+ :param SystemBase | PortfolioBase sys: SYS或PF实例
5761
+ :param Stock ref_stk: 参考股票, 默认为沪深300: sh000300, 绘制参考标的的收益曲线
5762
+ :return: None
5763
+
5764
+ """
5665
5765
  @staticmethod
5666
5766
  def plot(sys, new = True, axes = None, style = 1, only_draw_close = False):
5667
5767
  """
@@ -6593,6 +6693,19 @@ class TradeManager:
6593
6693
  @staticmethod
6594
6694
  def _pybind11_conduit_v1_(*args, **kwargs):
6595
6695
  ...
6696
+ @staticmethod
6697
+ def heatmap(tm, start_date, end_date = None, axes = None):
6698
+ """
6699
+
6700
+ 绘制账户收益年-月收益热力图
6701
+
6702
+ :param tm: 交易账户
6703
+ :param start_date: 开始日期
6704
+ :param end_date: 结束日期,默认为今天
6705
+ :param axes: 绘制的轴对象,默认为None,表示创建新的轴对象
6706
+ :return: None
6707
+
6708
+ """
6596
6709
  def __getstate__(self) -> tuple:
6597
6710
  ...
6598
6711
  @typing.overload
@@ -7528,7 +7641,7 @@ def AF_FixedWeightList(weights: list[float]) -> AllocateFundsBase:
7528
7641
  """
7529
7642
  AF_FixedWeightList(weights)
7530
7643
 
7531
- 固定比例资产分配列表
7644
+ 固定比例资产分配列表.
7532
7645
 
7533
7646
  :param float weights: 指定的资产比例列表
7534
7647
  """
@@ -7536,7 +7649,7 @@ def AF_MultiFactor() -> AllocateFundsBase:
7536
7649
  """
7537
7650
  AF_MultiFactor()
7538
7651
 
7539
- 创建 MultiFactor 评分权重的资产分配算法实例
7652
+ 创建 MultiFactor 评分权重的资产分配算法实例, 即直接以SE返回的评分作为权重。
7540
7653
  """
7541
7654
  @typing.overload
7542
7655
  def ALIGN(ref: DatetimeList, fill_null: bool = True) -> Indicator:
@@ -7623,23 +7736,14 @@ def ATAN(arg0: float) -> Indicator:
7623
7736
  def ATR(n: int = 14) -> Indicator:
7624
7737
  ...
7625
7738
  @typing.overload
7626
- def ATR(n: IndParam) -> Indicator:
7627
- ...
7628
- @typing.overload
7629
- def ATR(data: Indicator, n: IndParam) -> Indicator:
7630
- ...
7631
- @typing.overload
7632
- def ATR(data: Indicator, n: Indicator) -> Indicator:
7633
- ...
7634
- @typing.overload
7635
- def ATR(data: Indicator, n: int = 14) -> Indicator:
7739
+ def ATR(kdata: KData, n: int = 14) -> Indicator:
7636
7740
  """
7637
- ATR([data, n=14])
7741
+ ATR([kdata, n=14])
7638
7742
 
7639
- 平均真实波幅(Average True Range)
7743
+ 平均真实波幅(Average True Range), 真实波动幅度 TR 的简单移动均值
7640
7744
 
7641
- :param Indicator data 待计算的源数据
7642
- :param int|Indicator|IndParam n: 计算均值的周期窗口,必须为大于1的整数
7745
+ :param KData kdata 待计算的源数据
7746
+ :param int n: 计算均值的周期窗口,必须为大于1的整数
7643
7747
  :rtype: Indicator
7644
7748
  """
7645
7749
  @typing.overload
@@ -8794,6 +8898,21 @@ def JUMPUP(arg0: Indicator) -> Indicator:
8794
8898
  :rtype: Indicator
8795
8899
  """
8796
8900
  @typing.overload
8901
+ def KALMAN(q: float = 0.01, r: float = 0.1) -> Indicator:
8902
+ ...
8903
+ @typing.overload
8904
+ def KALMAN(ind: Indicator, q: float = 0.01, r: float = 0.1) -> Indicator:
8905
+ """
8906
+ KALMAN(ind, [q=0.01], [r=0.1])
8907
+
8908
+ Kalman滤波器, 用于平滑指标, 可设置平滑系数q和r, 默认q=0.01, r=0.1
8909
+
8910
+ :param Indicator ind: 指标
8911
+ :param float q: 平滑系数
8912
+ :param float r: 噪声系数
8913
+ :rtype: Indicator
8914
+ """
8915
+ @typing.overload
8797
8916
  def KDATA_PART(data: KData, kpart: str) -> Indicator:
8798
8917
  ...
8799
8918
  @typing.overload
@@ -9884,6 +10003,10 @@ def SGN(arg0: Indicator) -> Indicator:
9884
10003
  :param Indicator data: 输入数据
9885
10004
  :rtype: Indicator
9886
10005
  """
10006
+ @typing.overload
10007
+ def SG_Add(sg_list: typing.Sequence, alternate: bool) -> SignalBase:
10008
+ ...
10009
+ @typing.overload
9887
10010
  def SG_Add(sg1: SignalBase, sg2: SignalBase, alternate: bool) -> SignalBase:
9888
10011
  """
9889
10012
  SG_Add(sg1, sg2, alternate)
@@ -9905,6 +10028,23 @@ def SG_AllwaysBuy() -> SignalBase:
9905
10028
  一个特殊的SG,持续每天发出买入信号,通常配合 PF 使用
9906
10029
  """
9907
10030
  @typing.overload
10031
+ def SG_And(sg_list: typing.Sequence, alternate: bool) -> SignalBase:
10032
+ ...
10033
+ @typing.overload
10034
+ def SG_And(sg1: SignalBase, sg2: SignalBase, alternate: bool) -> SignalBase:
10035
+ """
10036
+ SG_And(sg1, sg2, alternate)
10037
+
10038
+ 生成两个指标与的信号
10039
+
10040
+ 由于 SG 的 alternate 默认为 True, 在使用如 "sg1 + sg2 + sg3" 的形式时,容易忽略 sg1 + sg2 的 alternate 属性
10041
+ 建议使用: SG_Add(sg1, sg2, False) + sg3 来避免 alternate 的问题
10042
+
10043
+ :param SignalBase sg1: 输入信号1
10044
+ :param SignalBase sg2: 输入信号2
10045
+ :param bool alternate: 是否交替买入卖出,默认为True
10046
+ """
10047
+ @typing.overload
9908
10048
  def SG_Band(ind: Indicator, lower: Indicator, upper: Indicator) -> SignalBase:
9909
10049
  ...
9910
10050
  @typing.overload
@@ -9969,6 +10109,10 @@ def SG_Cycle() -> SignalBase:
9969
10109
 
9970
10110
  一个特殊的SG,配合PF使用,以 PF 调仓周期为买入信号
9971
10111
  """
10112
+ @typing.overload
10113
+ def SG_Div(sg_list: typing.Sequence, alternate: bool) -> SignalBase:
10114
+ ...
10115
+ @typing.overload
9972
10116
  def SG_Div(sg1: SignalBase, sg2: SignalBase, alternate: bool) -> SignalBase:
9973
10117
  """
9974
10118
  SG_Div(sg1, sg2, alternate)
@@ -9992,6 +10136,10 @@ def SG_Flex(op: Indicator, slow_n: int) -> SignalBase:
9992
10136
  :param int slow_n: 慢线EMA周期
9993
10137
  :return: 信号指示器
9994
10138
  """
10139
+ @typing.overload
10140
+ def SG_Mul(sg_list: typing.Sequence, alternate: bool) -> SignalBase:
10141
+ ...
10142
+ @typing.overload
9995
10143
  def SG_Mul(sg1: SignalBase, sg2: SignalBase, alternate: bool) -> SignalBase:
9996
10144
  """
9997
10145
  SG_Mul(sg1, sg2, alternate)
@@ -10015,6 +10163,23 @@ def SG_OneSide(ind: Indicator, is_buy: bool) -> SignalBase:
10015
10163
  :param bool is_buy: 构建的是买入信号,否则为卖出信号
10016
10164
  :return: 信号指示器
10017
10165
  """
10166
+ @typing.overload
10167
+ def SG_Or(sg_list: typing.Sequence, alternate: bool) -> SignalBase:
10168
+ ...
10169
+ @typing.overload
10170
+ def SG_Or(sg1: SignalBase, sg2: SignalBase, alternate: bool) -> SignalBase:
10171
+ """
10172
+ SG_Or(sg1, sg2, alternate)
10173
+
10174
+ 生成两个指标与的信号
10175
+
10176
+ 由于 SG 的 alternate 默认为 True, 在使用如 "sg1 + sg2 + sg3" 的形式时,容易忽略 sg1 + sg2 的 alternate 属性
10177
+ 建议使用: SG_Add(sg1, sg2, False) + sg3 来避免 alternate 的问题
10178
+
10179
+ :param SignalBase sg1: 输入信号1
10180
+ :param SignalBase sg2: 输入信号2
10181
+ :param bool alternate: 是否交替买入卖出,默认为True
10182
+ """
10018
10183
  def SG_Sell(ind: Indicator) -> SignalBase:
10019
10184
  """
10020
10185
  SG_Sell(ind)
@@ -10057,6 +10222,10 @@ def SG_Single2(ind: Indicator, filter_n: int = 10, filter_p: float = 0.1) -> Sig
10057
10222
  :param float filter_p: 过滤器百分比
10058
10223
  :return: 信号指示器
10059
10224
  """
10225
+ @typing.overload
10226
+ def SG_Sub(sg_list: typing.Sequence, alternate: bool) -> SignalBase:
10227
+ ...
10228
+ @typing.overload
10060
10229
  def SG_Sub(sg1: SignalBase, sg2: SignalBase, alternate: bool) -> SignalBase:
10061
10230
  """
10062
10231
  SG_Sub(sg1, sg2, alternate)
@@ -12435,6 +12604,22 @@ def TIMELINEVOL(arg0: KData) -> Indicator:
12435
12604
  :rtype: Indicator
12436
12605
  """
12437
12606
  @typing.overload
12607
+ def TR() -> Indicator:
12608
+ ...
12609
+ @typing.overload
12610
+ def TR(kdata: KData) -> Indicator:
12611
+ """
12612
+ TR([kdata])
12613
+
12614
+ 真实波动幅度(TR)是以下三个值中的最大值:
12615
+ 1. 当前周期最高价与最低价之差
12616
+ 2. 当前周期最高价与前一周期收盘价之差的绝对值
12617
+ 3. 当前周期最低价与前一周期收盘价之差的绝对值
12618
+
12619
+ :param KData kdata: K线数据
12620
+ :rtype: Indicator
12621
+ """
12622
+ @typing.overload
12438
12623
  def TURNOVER(n: int = 1) -> Indicator:
12439
12624
  ...
12440
12625
  @typing.overload
@@ -12524,14 +12709,34 @@ def VIGOR(n: int = 2) -> Indicator:
12524
12709
  :param int n: EMA平滑窗口
12525
12710
  :rtype: Indicator
12526
12711
  """
12712
+ @typing.overload
12713
+ def WEAVE(arg0: typing.Sequence) -> Indicator:
12714
+ ...
12715
+ @typing.overload
12527
12716
  def WEAVE(arg0: Indicator, arg1: Indicator) -> Indicator:
12717
+ ...
12718
+ @typing.overload
12719
+ def WEAVE(arg0: Indicator, arg1: Indicator, arg2: Indicator) -> Indicator:
12720
+ ...
12721
+ @typing.overload
12722
+ def WEAVE(arg0: Indicator, arg1: Indicator, arg2: Indicator, arg3: Indicator) -> Indicator:
12723
+ ...
12724
+ @typing.overload
12725
+ def WEAVE(arg0: Indicator, arg1: Indicator, arg2: Indicator, arg3: Indicator, arg4: Indicator) -> Indicator:
12726
+ ...
12727
+ @typing.overload
12728
+ def WEAVE(arg0: Indicator, arg1: Indicator, arg2: Indicator, arg3: Indicator, arg4: Indicator, arg5: Indicator) -> Indicator:
12528
12729
  """
12529
- WEAVE(ind1, ind2)
12730
+ WEAVE(ind1, ind2[, ind3, ind4, ind5, ind6])
12530
12731
 
12531
- 将ind1和ind2的结果组合在一起放在一个Indicator中。如ind = WEAVE(ind1, ind2), 则此时ind包含多个结果,按ind1、ind2的顺序存放。
12732
+ 将最多6个Indicator的结果组合在一起放在一个Indicator中。如ind = WEAVE(ind1, ind2), 则此时ind包含多个结果,按ind1、ind2的顺序存放。
12532
12733
 
12533
12734
  :param Indicator ind1: 指标1
12534
12735
  :param Indicator ind2: 指标2
12736
+ :param Indicator ind3: 指标3, 可省略
12737
+ :param Indicator ind4: 指标4, 可省略
12738
+ :param Indicator ind5: 指标5, 可省略
12739
+ :param Indicator ind6: 指标6, 可省略
12535
12740
  :rtype: Indicator
12536
12741
  """
12537
12742
  @typing.overload
hikyuu/cpp/core313.pyd CHANGED
Binary file