hikyuu 2.7.0__py3-none-manylinux2014_aarch64.whl → 2.7.3__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.
Files changed (149) hide show
  1. hikyuu/__init__.py +25 -7
  2. hikyuu/__init__.pyi +23 -12
  3. hikyuu/analysis/__init__.pyi +6 -1
  4. hikyuu/analysis/analysis.pyi +7 -2
  5. hikyuu/core.pyi +8 -3
  6. hikyuu/cpp/core310.pyi +94 -24
  7. hikyuu/cpp/core310.so +0 -0
  8. hikyuu/cpp/core311.pyi +94 -24
  9. hikyuu/cpp/core311.so +0 -0
  10. hikyuu/cpp/core312.pyi +94 -24
  11. hikyuu/cpp/core312.so +0 -0
  12. hikyuu/cpp/core313.pyi +94 -24
  13. hikyuu/cpp/core313.so +0 -0
  14. hikyuu/cpp/i18n/zh_CN/hikyuu.mo +0 -0
  15. hikyuu/cpp/i18n/zh_CN/hikyuu_plugin.mo +0 -0
  16. hikyuu/cpp/libboost_atomic.so +0 -0
  17. hikyuu/cpp/libboost_atomic.so.1.90.0 +0 -0
  18. hikyuu/cpp/{libboost_charconv-mt.so → libboost_charconv.so} +0 -0
  19. hikyuu/cpp/{libboost_charconv-mt.so.1.88.0 → libboost_charconv.so.1.90.0} +0 -0
  20. hikyuu/cpp/libboost_chrono.so +0 -0
  21. hikyuu/cpp/libboost_chrono.so.1.90.0 +0 -0
  22. hikyuu/cpp/libboost_container.so +0 -0
  23. hikyuu/cpp/libboost_container.so.1.90.0 +0 -0
  24. hikyuu/cpp/libboost_date_time.so +0 -0
  25. hikyuu/cpp/libboost_date_time.so.1.90.0 +0 -0
  26. hikyuu/cpp/libboost_locale.so +0 -0
  27. hikyuu/cpp/libboost_locale.so.1.90.0 +0 -0
  28. hikyuu/cpp/libboost_random.so +0 -0
  29. hikyuu/cpp/libboost_random.so.1.90.0 +0 -0
  30. hikyuu/cpp/libboost_serialization.so +0 -0
  31. hikyuu/cpp/libboost_serialization.so.1.90.0 +0 -0
  32. hikyuu/cpp/libboost_thread.so +0 -0
  33. hikyuu/cpp/libboost_thread.so.1.90.0 +0 -0
  34. hikyuu/cpp/libboost_wserialization.so +0 -0
  35. hikyuu/cpp/libboost_wserialization.so.1.90.0 +0 -0
  36. hikyuu/cpp/libhikyuu.so +0 -0
  37. hikyuu/cpp/libsqlite3.so +0 -0
  38. hikyuu/data/clickhouse_upgrade/0001.sql +2 -0
  39. hikyuu/data/common_clickhouse.py +1 -3
  40. hikyuu/data/download_block.py +1 -1
  41. hikyuu/data/hku_config_template.py +30 -3
  42. hikyuu/data/mysql_upgrade/0029.sql +2 -0
  43. hikyuu/data/pytdx_to_clickhouse.py +86 -32
  44. hikyuu/data/pytdx_to_h5.py +73 -28
  45. hikyuu/data/pytdx_to_mysql.py +65 -21
  46. hikyuu/data/pytdx_weight_to_clickhouse.py +2 -0
  47. hikyuu/data/pytdx_weight_to_mysql.py +2 -0
  48. hikyuu/data/pytdx_weight_to_sqlite.py +2 -0
  49. hikyuu/data/sqlite_upgrade/0029.sql +4 -0
  50. hikyuu/data/tdx_to_clickhouse.py +2 -2
  51. hikyuu/data/tdx_to_h5.py +11 -11
  52. hikyuu/data/tdx_to_mysql.py +2 -2
  53. hikyuu/draw/drawplot/bokeh_draw.pyi +14 -7
  54. hikyuu/draw/drawplot/echarts_draw.pyi +14 -7
  55. hikyuu/draw/drawplot/matplotlib_draw.py +8 -2
  56. hikyuu/draw/drawplot/matplotlib_draw.pyi +14 -7
  57. hikyuu/extend.pyi +8 -3
  58. hikyuu/gui/HikyuuTDX.py +42 -3
  59. hikyuu/gui/data/MainWindow.py +189 -129
  60. hikyuu/hub.pyi +6 -6
  61. hikyuu/include/hikyuu/StockManager.h +17 -2
  62. hikyuu/include/hikyuu/StrategyContext.h +4 -4
  63. hikyuu/include/hikyuu/data_driver/BaseInfoDriver.h +2 -1
  64. hikyuu/include/hikyuu/data_driver/KDataDriver.h +2 -4
  65. hikyuu/include/hikyuu/data_driver/kdata/mysql/MySQLKDataDriver.h +5 -1
  66. hikyuu/include/hikyuu/data_driver/kdata/sqlite/SQLiteKDataDriver.h +1 -1
  67. hikyuu/include/hikyuu/global/sysinfo.h +24 -5
  68. hikyuu/include/hikyuu/indicator/IndicatorImp.h +1 -1
  69. hikyuu/include/hikyuu/plugin/KDataToClickHouseImporter.h +40 -0
  70. hikyuu/include/hikyuu/plugin/KDataToMySQLImporter.h +40 -0
  71. hikyuu/include/hikyuu/plugin/checkdata.h +20 -0
  72. hikyuu/include/hikyuu/plugin/extind.h +3 -0
  73. hikyuu/include/hikyuu/plugin/hkuextra.h +2 -0
  74. hikyuu/include/hikyuu/plugin/interface/CheckDataPluginInterface.h +25 -0
  75. hikyuu/include/hikyuu/plugin/interface/HkuExtraPluginInterface.h +2 -0
  76. hikyuu/include/hikyuu/plugin/interface/ImportKDataToClickHousePluginInterface.h +44 -0
  77. hikyuu/include/hikyuu/plugin/interface/ImportKDataToMySQLPluginInterface.h +42 -0
  78. hikyuu/include/hikyuu/plugin/interface/plugins.h +6 -0
  79. hikyuu/include/hikyuu/python/convert_any.h +9 -6
  80. hikyuu/include/hikyuu/python/pybind_utils.h +1 -1
  81. hikyuu/include/hikyuu/strategy/Strategy.h +1 -1
  82. hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +0 -1
  83. hikyuu/include/hikyuu/trade_manage/TradeRecord.h +2 -1
  84. hikyuu/include/hikyuu/trade_sys/allocatefunds/AllocateFundsBase.h +0 -1
  85. hikyuu/include/hikyuu/trade_sys/allocatefunds/build_in.h +1 -0
  86. hikyuu/include/hikyuu/trade_sys/allocatefunds/crt/AF_FixedAmount.h +26 -0
  87. hikyuu/include/hikyuu/trade_sys/allocatefunds/imp/FixAmountFunds.h +18 -0
  88. hikyuu/include/hikyuu/trade_sys/condition/ConditionBase.h +0 -1
  89. hikyuu/include/hikyuu/trade_sys/environment/EnvironmentBase.h +0 -1
  90. hikyuu/include/hikyuu/trade_sys/moneymanager/MoneyManagerBase.h +0 -1
  91. hikyuu/include/hikyuu/trade_sys/multifactor/MultiFactorBase.h +0 -1
  92. hikyuu/include/hikyuu/trade_sys/multifactor/NormalizeBase.h +0 -1
  93. hikyuu/include/hikyuu/trade_sys/multifactor/ScoresFilterBase.h +0 -1
  94. hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +13 -13
  95. hikyuu/include/hikyuu/trade_sys/profitgoal/ProfitGoalBase.h +9 -11
  96. hikyuu/include/hikyuu/trade_sys/selector/SelectorBase.h +0 -1
  97. hikyuu/include/hikyuu/trade_sys/signal/SignalBase.h +0 -1
  98. hikyuu/include/hikyuu/trade_sys/slippage/SlippageBase.h +0 -1
  99. hikyuu/include/hikyuu/trade_sys/stoploss/StoplossBase.h +0 -1
  100. hikyuu/include/hikyuu/trade_sys/system/System.h +1 -2
  101. hikyuu/include/hikyuu/utilities/Log.h +6 -7
  102. hikyuu/include/hikyuu/utilities/Parameter.h +17 -0
  103. hikyuu/include/hikyuu/utilities/config.h +28 -0
  104. hikyuu/include/hikyuu/utilities/plugin/PluginBase.h +17 -2
  105. hikyuu/include/hikyuu/utilities/plugin/PluginManager.h +41 -22
  106. hikyuu/include/hikyuu/utilities/thread/GlobalStealThreadPool.h +1 -2
  107. hikyuu/include/hikyuu/utilities/thread/GlobalThreadPool.h +1 -1
  108. hikyuu/include/hikyuu/utilities/thread/MQStealThreadPool.h +286 -0
  109. hikyuu/include/hikyuu/utilities/thread/MQThreadPool.h +1 -0
  110. hikyuu/include/hikyuu/utilities/thread/StealThreadPool.h +297 -0
  111. hikyuu/include/hikyuu/utilities/thread/ThreadPool.h +1 -0
  112. hikyuu/include/hikyuu/utilities/thread/WorkStealQueue.h +9 -8
  113. hikyuu/include/hikyuu/utilities/thread/algorithm.h +64 -14
  114. hikyuu/include/hikyuu/version.h +4 -4
  115. hikyuu/plugin/libbacktest.so +0 -0
  116. hikyuu/plugin/libcheckdata.so +0 -0
  117. hikyuu/plugin/libclickhousedriver.so +0 -0
  118. hikyuu/plugin/libdataserver.so +0 -0
  119. hikyuu/plugin/libdataserver_parquet.so +0 -0
  120. hikyuu/plugin/libdevice.so +0 -0
  121. hikyuu/plugin/libextind.so +0 -0
  122. hikyuu/plugin/libhkuextra.so +0 -0
  123. hikyuu/plugin/libimport2ch.so +0 -0
  124. hikyuu/plugin/libimport2hdf5.so +0 -0
  125. hikyuu/plugin/libimport2mysql.so +0 -0
  126. hikyuu/plugin/libtmreport.so +0 -0
  127. hikyuu/trade_manage/__init__.pyi +12 -7
  128. hikyuu/trade_manage/trade.pyi +12 -7
  129. hikyuu/trade_sys/trade_sys.py +54 -5
  130. hikyuu/util/__init__.pyi +1 -1
  131. hikyuu/util/singleton.pyi +1 -1
  132. {hikyuu-2.7.0.dist-info → hikyuu-2.7.3.dist-info}/METADATA +10 -4
  133. {hikyuu-2.7.0.dist-info → hikyuu-2.7.3.dist-info}/RECORD +136 -114
  134. hikyuu/cpp/libboost_chrono-mt.so +0 -0
  135. hikyuu/cpp/libboost_chrono-mt.so.1.88.0 +0 -0
  136. hikyuu/cpp/libboost_date_time-mt.so +0 -0
  137. hikyuu/cpp/libboost_date_time-mt.so.1.88.0 +0 -0
  138. hikyuu/cpp/libboost_serialization-mt.so +0 -0
  139. hikyuu/cpp/libboost_serialization-mt.so.1.88.0 +0 -0
  140. hikyuu/cpp/libboost_system-mt.so +0 -0
  141. hikyuu/cpp/libboost_system-mt.so.1.88.0 +0 -0
  142. hikyuu/cpp/libboost_thread-mt.so +0 -0
  143. hikyuu/cpp/libboost_thread-mt.so.1.88.0 +0 -0
  144. hikyuu/cpp/libboost_wserialization-mt.so +0 -0
  145. hikyuu/cpp/libboost_wserialization-mt.so.1.88.0 +0 -0
  146. hikyuu/data/pytdx_to_taos.py +0 -736
  147. {hikyuu-2.7.0.dist-info → hikyuu-2.7.3.dist-info}/WHEEL +0 -0
  148. {hikyuu-2.7.0.dist-info → hikyuu-2.7.3.dist-info}/entry_points.txt +0 -0
  149. {hikyuu-2.7.0.dist-info → hikyuu-2.7.3.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__: list[str] = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', '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', 'KDataToHdf5Importer', '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', '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_last_version', '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__: 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', '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']
7
7
  class AllocateFundsBase:
8
8
  """
9
9
  资产分配算法基类, 子类接口:
@@ -154,6 +154,8 @@ class BUSINESS:
154
154
 
155
155
  RETURN_STOCK
156
156
 
157
+ SUOGU
158
+
157
159
  INVALID
158
160
  """
159
161
  BONUS: typing.ClassVar[BUSINESS] # value = <BUSINESS.BONUS: 4>
@@ -167,12 +169,13 @@ class BUSINESS:
167
169
  CHECKOUT_STOCK: typing.ClassVar[BUSINESS] # value = <BUSINESS.CHECKOUT_STOCK: 8>
168
170
  GIFT: typing.ClassVar[BUSINESS] # value = <BUSINESS.GIFT: 3>
169
171
  INIT: typing.ClassVar[BUSINESS] # value = <BUSINESS.INIT: 0>
170
- INVALID: typing.ClassVar[BUSINESS] # value = <BUSINESS.INVALID: 15>
172
+ INVALID: typing.ClassVar[BUSINESS] # value = <BUSINESS.INVALID: 16>
171
173
  RETURN_CASH: typing.ClassVar[BUSINESS] # value = <BUSINESS.RETURN_CASH: 10>
172
174
  RETURN_STOCK: typing.ClassVar[BUSINESS] # value = <BUSINESS.RETURN_STOCK: 12>
173
175
  SELL: typing.ClassVar[BUSINESS] # value = <BUSINESS.SELL: 2>
174
176
  SELL_SHORT: typing.ClassVar[BUSINESS] # value = <BUSINESS.SELL_SHORT: 13>
175
- __members__: typing.ClassVar[dict[str, BUSINESS]] # value = {'INIT': <BUSINESS.INIT: 0>, 'BUY': <BUSINESS.BUY: 1>, 'SELL': <BUSINESS.SELL: 2>, 'BUY_SHORT': <BUSINESS.BUY_SHORT: 14>, 'SELL_SHORT': <BUSINESS.SELL_SHORT: 13>, 'GIFT': <BUSINESS.GIFT: 3>, 'BONUS': <BUSINESS.BONUS: 4>, 'CHECKIN': <BUSINESS.CHECKIN: 5>, 'CHECKOUT': <BUSINESS.CHECKOUT: 6>, 'CHECKIN_STOCK': <BUSINESS.CHECKIN_STOCK: 7>, 'CHECKOUT_STOCK': <BUSINESS.CHECKOUT_STOCK: 8>, 'BORROW_CASH': <BUSINESS.BORROW_CASH: 9>, 'RETURN_CASH': <BUSINESS.RETURN_CASH: 10>, 'BORROW_STOCK': <BUSINESS.BORROW_STOCK: 11>, 'RETURN_STOCK': <BUSINESS.RETURN_STOCK: 12>, 'INVALID': <BUSINESS.INVALID: 15>}
177
+ SUOGU: typing.ClassVar[BUSINESS] # value = <BUSINESS.SUOGU: 15>
178
+ __members__: typing.ClassVar[dict[str, BUSINESS]] # value = {'INIT': <BUSINESS.INIT: 0>, 'BUY': <BUSINESS.BUY: 1>, 'SELL': <BUSINESS.SELL: 2>, 'BUY_SHORT': <BUSINESS.BUY_SHORT: 14>, 'SELL_SHORT': <BUSINESS.SELL_SHORT: 13>, 'GIFT': <BUSINESS.GIFT: 3>, 'BONUS': <BUSINESS.BONUS: 4>, 'CHECKIN': <BUSINESS.CHECKIN: 5>, 'CHECKOUT': <BUSINESS.CHECKOUT: 6>, 'CHECKIN_STOCK': <BUSINESS.CHECKIN_STOCK: 7>, 'CHECKOUT_STOCK': <BUSINESS.CHECKOUT_STOCK: 8>, 'BORROW_CASH': <BUSINESS.BORROW_CASH: 9>, 'RETURN_CASH': <BUSINESS.RETURN_CASH: 10>, 'BORROW_STOCK': <BUSINESS.BORROW_STOCK: 11>, 'RETURN_STOCK': <BUSINESS.RETURN_STOCK: 12>, 'SUOGU': <BUSINESS.SUOGU: 15>, 'INVALID': <BUSINESS.INVALID: 16>}
176
179
  def __eq__(self, other: typing.Any) -> bool:
177
180
  ...
178
181
  def __getstate__(self) -> int:
@@ -2391,6 +2394,20 @@ class KDataDriver:
2391
2394
  """
2392
2395
  驱动名称
2393
2396
  """
2397
+ class KDataToClickHouseImporter:
2398
+ """
2399
+ K线数据导入器
2400
+ """
2401
+ def __init__(self) -> None:
2402
+ ...
2403
+ def remove(self, arg0: str, arg1: str, arg2: str, arg3: Datetime) -> None:
2404
+ """
2405
+ 删除指定时间及其之后的K线数据
2406
+ """
2407
+ def set_config(self, host: str, port: typing.SupportsInt = 9000, usr: str = 'default', pwd: str = '') -> bool:
2408
+ """
2409
+ 设置数据保存路径和数据源列表
2410
+ """
2394
2411
  class KDataToHdf5Importer:
2395
2412
  """
2396
2413
  K线数据导入器
@@ -2425,6 +2442,20 @@ class KDataToHdf5Importer:
2425
2442
  """
2426
2443
  更新索引
2427
2444
  """
2445
+ class KDataToMySQLImporter:
2446
+ """
2447
+ K线数据导入器
2448
+ """
2449
+ def __init__(self) -> None:
2450
+ ...
2451
+ def remove(self, arg0: str, arg1: str, arg2: str, arg3: Datetime) -> None:
2452
+ """
2453
+ 删除指定时间及其之后的K线数据
2454
+ """
2455
+ def set_config(self, host: str, port: typing.SupportsInt = 9000, usr: str = 'default', pwd: str = '') -> bool:
2456
+ """
2457
+ 设置数据保存路径和数据源列表
2458
+ """
2428
2459
  class KRecord:
2429
2460
  """
2430
2461
  K线记录,组成K线数据,属性可读写
@@ -3099,7 +3130,7 @@ class MultiFactorBase:
3099
3130
  """
3100
3131
  是否存在指定参数
3101
3132
  """
3102
- def set_normalize(self, norm: NormalizeBase) -> None:
3133
+ def set_normalize(self, norm: typing.Any) -> None:
3103
3134
  """
3104
3135
  set_normalize(self, norm)
3105
3136
 
@@ -3517,7 +3548,7 @@ class Portfolio:
3517
3548
  设置或获取资产分配算法
3518
3549
  """
3519
3550
  @af.setter
3520
- def af(self, arg1: AllocateFundsBase) -> None:
3551
+ def af(self, arg1: typing.Any) -> None:
3521
3552
  ...
3522
3553
  @property
3523
3554
  def name(self) -> str:
@@ -3546,7 +3577,7 @@ class Portfolio:
3546
3577
  设置或获取交易对象选择算法
3547
3578
  """
3548
3579
  @se.setter
3549
- def se(self, arg1: SelectorBase) -> None:
3580
+ def se(self, arg1: typing.Any) -> None:
3550
3581
  ...
3551
3582
  @property
3552
3583
  def tm(self) -> TradeManager:
@@ -3554,7 +3585,7 @@ class Portfolio:
3554
3585
  设置或获取交易管理对象
3555
3586
  """
3556
3587
  @tm.setter
3557
- def tm(self, arg1: TradeManager) -> None:
3588
+ def tm(self, arg1: typing.Any) -> None:
3558
3589
  ...
3559
3590
  class PositionRecord:
3560
3591
  """
@@ -3837,8 +3868,8 @@ class ProfitGoalBase:
3837
3868
 
3838
3869
  【重载接口】获取盈利目标价格,返回constant.null_price时,表示未限定目标;返回0意味着需要卖出
3839
3870
 
3840
- :param Datetime datetime: 买入时间
3841
- :param float price: 买入价格
3871
+ :param Datetime datetime: 当前时间
3872
+ :param float price: 当前价格
3842
3873
  :return: 目标价格
3843
3874
  :rtype: float
3844
3875
  """
@@ -5116,7 +5147,7 @@ class Stock:
5116
5147
 
5117
5148
  :param Query.KType ktype: K线类型
5118
5149
  """
5119
- def set_kdata_from_df(self, df: typing.Any, cols: collections.abc.Sequence[str], ktype: str = 'DAY') -> None:
5150
+ 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:
5120
5151
  """
5121
5152
  set_kdata_from_df(self, df, cols, [ktype=Query.DAY])
5122
5153
 
@@ -5310,6 +5341,10 @@ class StockManager:
5310
5341
  :return: 加入的Stock
5311
5342
  :rtype: Stock
5312
5343
  """
5344
+ def cancel_load(self) -> None:
5345
+ """
5346
+ 取消所有数据加载
5347
+ """
5313
5348
  def datadir(self) -> str:
5314
5349
  """
5315
5350
  datadir(self) -> str
@@ -5345,6 +5380,16 @@ class StockManager:
5345
5380
  :return: 板块列表
5346
5381
  :rtype: BlockList
5347
5382
  """
5383
+ def get_block_list_by_index_stock(self, index_stk: ...) -> list[...]:
5384
+ """
5385
+ get_block_list_by_index_stock(self, index_stk)
5386
+
5387
+ 获取指定指数的板块列表
5388
+
5389
+ :param Stock index_stk: 指数
5390
+ :return: 板块列表
5391
+ :rtype: BlockList
5392
+ """
5348
5393
  def get_block_parameter(self) -> ...:
5349
5394
  """
5350
5395
  获取当前板块信息驱动参数
@@ -6337,7 +6382,7 @@ class System:
6337
6382
  系统有效条件
6338
6383
  """
6339
6384
  @cn.setter
6340
- def cn(self, arg1: ConditionBase) -> None:
6385
+ def cn(self, arg1: typing.Any) -> None:
6341
6386
  ...
6342
6387
  @property
6343
6388
  def ev(self) -> EnvironmentBase:
@@ -6345,7 +6390,7 @@ class System:
6345
6390
  市场环境判断策略
6346
6391
  """
6347
6392
  @ev.setter
6348
- def ev(self, arg1: EnvironmentBase) -> None:
6393
+ def ev(self, arg1: typing.Any) -> None:
6349
6394
  ...
6350
6395
  @property
6351
6396
  def mm(self) -> MoneyManagerBase:
@@ -6353,7 +6398,7 @@ class System:
6353
6398
  资金管理策略
6354
6399
  """
6355
6400
  @mm.setter
6356
- def mm(self, arg1: MoneyManagerBase) -> None:
6401
+ def mm(self, arg1: typing.Any) -> None:
6357
6402
  ...
6358
6403
  @property
6359
6404
  def name(self) -> str:
@@ -6369,7 +6414,7 @@ class System:
6369
6414
  盈利目标策略
6370
6415
  """
6371
6416
  @pg.setter
6372
- def pg(self, arg1: ProfitGoalBase) -> None:
6417
+ def pg(self, arg1: typing.Any) -> None:
6373
6418
  ...
6374
6419
  @property
6375
6420
  def query(self) -> Query:
@@ -6382,7 +6427,7 @@ class System:
6382
6427
  信号指示器
6383
6428
  """
6384
6429
  @sg.setter
6385
- def sg(self, arg1: SignalBase) -> None:
6430
+ def sg(self, arg1: typing.Any) -> None:
6386
6431
  ...
6387
6432
  @property
6388
6433
  def sp(self) -> SlippageBase:
@@ -6390,7 +6435,7 @@ class System:
6390
6435
  移滑价差算法
6391
6436
  """
6392
6437
  @sp.setter
6393
- def sp(self, arg1: SlippageBase) -> None:
6438
+ def sp(self, arg1: typing.Any) -> None:
6394
6439
  ...
6395
6440
  @property
6396
6441
  def st(self) -> StoplossBase:
@@ -6398,7 +6443,7 @@ class System:
6398
6443
  止损策略
6399
6444
  """
6400
6445
  @st.setter
6401
- def st(self, arg1: StoplossBase) -> None:
6446
+ def st(self, arg1: typing.Any) -> None:
6402
6447
  ...
6403
6448
  @property
6404
6449
  def tm(self) -> TradeManager:
@@ -6406,7 +6451,7 @@ class System:
6406
6451
  关联的交易管理实例
6407
6452
  """
6408
6453
  @tm.setter
6409
- def tm(self, arg1: TradeManager) -> None:
6454
+ def tm(self, arg1: typing.Any) -> None:
6410
6455
  ...
6411
6456
  @property
6412
6457
  def to(self) -> KData:
@@ -6422,7 +6467,7 @@ class System:
6422
6467
  止盈策略
6423
6468
  """
6424
6469
  @tp.setter
6425
- def tp(self, arg1: StoplossBase) -> None:
6470
+ def tp(self, arg1: typing.Any) -> None:
6426
6471
  ...
6427
6472
  class SystemPart:
6428
6473
  """
@@ -8126,6 +8171,14 @@ def AF_EqualWeight() -> AllocateFundsBase:
8126
8171
 
8127
8172
  等权重资产分配,对选中的资产进行等比例分配
8128
8173
  """
8174
+ def AF_FixedAmount(amount: typing.SupportsFloat = 20000.0) -> AllocateFundsBase:
8175
+ """
8176
+ AF_FixedAmount(amount)
8177
+
8178
+ 等金额资产分配,对选中的资产进行等金额分配
8179
+
8180
+ :param float amount: 交易最大金额
8181
+ """
8129
8182
  def AF_FixedWeight(weight: typing.SupportsFloat = 0.1) -> AllocateFundsBase:
8130
8183
  """
8131
8184
  AF_FixedWeight(weight)
@@ -8250,6 +8303,19 @@ def AGG_VAR(ind: Indicator, ktype: str = 'MIN', fill_null: bool = False, unit: t
8250
8303
  :return: 指标数据
8251
8304
  :rtype: Indicator
8252
8305
  """
8306
+ def AGG_VWAP(ktype: str = 'MIN', fill_null: bool = False, unit: typing.SupportsInt = 1) -> Indicator:
8307
+ """
8308
+ AGG_VWAP([ktype=Query.MIN, fill_null=False, unit=1])
8309
+
8310
+ 聚合其他K线成交量加权平均价格(Volume Weighted Average Price)
8311
+ VWAP 是成交量加权的平均价格,计算方式是将每一分钟(或单位时间)的成交量乘以该分钟的成交价格,然后对所有乘积求和,最后除以总成交量。
8312
+
8313
+ :param KQuery.KType ktype: 聚合的K线周期
8314
+ :param bool fill_null: 是否填充缺失值
8315
+ :param int unit: 聚合周期单位 (上下文K线分组单位, 使用日线计算分钟线聚合时, unit=2代表聚合2天的分钟线)
8316
+ :return: 指标数据
8317
+ :rtype: Indicator
8318
+ """
8253
8319
  @typing.overload
8254
8320
  def ALIGN(ref: DatetimeList, fill_null: bool = True) -> Indicator:
8255
8321
  ...
@@ -9943,13 +10009,13 @@ def MF_Weight() -> MultiFactorBase:
9943
10009
  @typing.overload
9944
10010
  def MF_Weight(inds: collections.abc.Sequence, stks: collections.abc.Sequence, 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:
9945
10011
  """
9946
- MF_EqualWeight(inds, stks, query, ref_stk[, ic_n=5])
10012
+ MF_Weight(inds, stks, weights, query, ref_stk[, ic_n=5, spearman=True, mode=0, save_all_factors=False])
9947
10013
 
9948
10014
  按指定权重合成因子 = ind1 * weight1 + ind2 * weight2 + ... + indn * weightn
9949
10015
 
9950
10016
  :param sequense(Indicator) inds: 原始因子列表
9951
- :param sequense(float) weights: 权重列表(需和 inds 等长)
9952
10017
  :param sequense(stock) stks: 计算证券列表
10018
+ :param sequense(float) weights: 权重列表(需和 inds 等长)
9953
10019
  :param Query query: 日期范围
9954
10020
  :param Stock ref_stk: 参考证券 (未指定时,默认为 sh000300 沪深300)
9955
10021
  :param int ic_n: 默认 IC 对应的 N 日收益率
@@ -10203,7 +10269,7 @@ def NOT(arg0: Indicator) -> Indicator:
10203
10269
  :param Indicator data: 输入数据
10204
10270
  :rtype: Indicator
10205
10271
  """
10206
- def PF_Simple(tm: TradeManager = None, se: SelectorBase = ..., af: AllocateFundsBase = ..., adjust_cycle: typing.SupportsInt = 1, adjust_mode: str = 'query', delay_to_trading_day: bool = True) -> Portfolio:
10272
+ 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:
10207
10273
  """
10208
10274
  PF_Simple([tm, se, af, adjust_cycle=1, adjust_mode="query", delay_to_trading_day=True])
10209
10275
 
@@ -10226,7 +10292,7 @@ def PF_Simple(tm: TradeManager = None, se: SelectorBase = ..., af: AllocateFunds
10226
10292
  :param str adjust_mode: 调仓模式
10227
10293
  :param bool delay_to_trading_day: 如果当日不是交易日将会被顺延至当前周期内的第一个交易日
10228
10294
  """
10229
- def PF_WithoutAF(tm: TradeManager = None, se: SelectorBase = ..., 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:
10295
+ 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:
10230
10296
  """
10231
10297
  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])
10232
10298
 
@@ -14031,6 +14097,10 @@ def bind_email(arg0: str, arg1: str) -> None:
14031
14097
  """
14032
14098
  def can_upgrade() -> bool:
14033
14099
  ...
14100
+ def check_data(stock_list: collections.abc.Sequence, start_date: Datetime, end_date: Datetime, ktype: str) -> tuple:
14101
+ """
14102
+ 检查数据
14103
+ """
14034
14104
  def close_ostream_to_python() -> None:
14035
14105
  ...
14036
14106
  def close_spend_time() -> None:
@@ -14191,7 +14261,7 @@ def get_kdata(market_code: str, start: Datetime = ..., end: Datetime = ..., ktyp
14191
14261
  :param Query.KType ktype: K 线类型, 'DAY'|'WEEK'|'MONTH'|'QUARTER'|'HALFYEAR'|'YEAR'|'MIN'|'MIN5'|'MIN15'|'MIN30'|'MIN60'
14192
14262
  :param Query.RecoverType recover_type: 复权类型
14193
14263
  """
14194
- def get_last_version() -> str:
14264
+ def get_latest_version_info() -> dict:
14195
14265
  ...
14196
14266
  def get_log_level() -> LOG_LEVEL:
14197
14267
  """
hikyuu/cpp/core313.so CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
hikyuu/cpp/libhikyuu.so CHANGED
Binary file
hikyuu/cpp/libsqlite3.so CHANGED
Binary file
@@ -0,0 +1,2 @@
1
+ ALTER TABLE `hku_base`.`stocktypeinfo` UPDATE `minTradeNumber`=100 WHERE `type`=5 AND `description`='ETF';
2
+ ALTER TABLE `hku_base`.`version` UPDATE `version`=1 WHERE `id`=0;
@@ -69,11 +69,9 @@ def create_database(connect):
69
69
  and int(x.stem) > db_version and not x.is_dir()]
70
70
  files.sort()
71
71
  for file in files:
72
- print(file)
73
72
  sql = file.read_text(encoding='utf8')
74
73
  statements = sql.split(';')
75
74
  for stmt in statements:
76
- print(stmt)
77
75
  stmt = stmt.strip()
78
76
  if stmt: # 跳过空语句
79
77
  try:
@@ -163,7 +161,7 @@ def get_last_krecord(connect, tablename):
163
161
  # hku_info(f"{tablename} {a}")
164
162
  if not a:
165
163
  return None
166
- return (Datetime.from_timestamp_utc(a[0][0]*1000000).ymdhm, a[0][1]*0.001, a[0][2]*0.001, a[0][3]*0.001, a[0][4]*0.001, a[0][5]*0.001, a[0][6]*0.001)
164
+ return (Datetime.from_timestamp_utc(a[0][0]*1000000).ymdhm, a[0][1]*0.001, a[0][2]*0.001, a[0][3]*0.001, a[0][4]*0.001, float(a[0][5]), a[0][6]*0.001)
167
165
  except:
168
166
  return None
169
167
 
@@ -333,7 +333,7 @@ def download_all_zsbk_info():
333
333
 
334
334
 
335
335
  def download_block_info():
336
- down_em_all_hybk_info()
336
+ # down_em_all_hybk_info()
337
337
  # down_em_all_dybk_info()
338
338
  # down_em_all_gnbk_info()
339
339
  download_all_zsbk_info()
@@ -26,7 +26,9 @@ hdf5_template = """
26
26
  [hikyuu]
27
27
  tmpdir = {dir}/tmp
28
28
  datadir = {dir}
29
+ reload_time = {reload_time}
29
30
  quotation_server = {quotation_server}
31
+ lazy_preload = {lazy_preload}
30
32
 
31
33
  [block]
32
34
  type = sqlite3
@@ -52,6 +54,8 @@ min15 = {min15}
52
54
  min30 = {min30}
53
55
  min60 = {min60}
54
56
  hour2= {hour2}
57
+ timeline = {timeline}
58
+ trans = {trans}
55
59
  day_max = {day_max}
56
60
  week_max = {week_max}
57
61
  month_max = {month_max}
@@ -64,6 +68,8 @@ min15_max = {min15_max}
64
68
  min30_max = {min30_max}
65
69
  min60_max = {min60_max}
66
70
  hour2_max = {hour2_max}
71
+ timeline_max = {timeline_max}
72
+ trans_max = {trans_max}
67
73
 
68
74
  [baseinfo]
69
75
  type = sqlite3
@@ -94,7 +100,9 @@ mysql_template = """
94
100
  [hikyuu]
95
101
  tmpdir = {dir}
96
102
  datadir = {dir}
103
+ reload_time = {reload_time}
97
104
  quotation_server = {quotation_server}
105
+ lazy_preload = {lazy_preload}
98
106
 
99
107
  [block]
100
108
  type = mysql
@@ -116,6 +124,8 @@ min15 = {min15}
116
124
  min30 = {min30}
117
125
  min60 = {min60}
118
126
  hour2 = {hour2}
127
+ timeline = {timeline}
128
+ trans = {trans}
119
129
  day_max = {day_max}
120
130
  week_max = {week_max}
121
131
  month_max = {month_max}
@@ -128,6 +138,8 @@ min15_max = {min15_max}
128
138
  min30_max = {min30_max}
129
139
  min60_max = {min60_max}
130
140
  hour2_max = {hour2_max}
141
+ timeline_max = {timeline_max}
142
+ trans_max = {trans_max}
131
143
 
132
144
  [baseinfo]
133
145
  type = mysql
@@ -149,7 +161,9 @@ clickhouse_template = """
149
161
  [hikyuu]
150
162
  tmpdir = {dir}
151
163
  datadir = {dir}
164
+ reload_time = {reload_time}
152
165
  quotation_server = {quotation_server}
166
+ lazy_preload = {lazy_preload}
153
167
 
154
168
  [block]
155
169
  type = clickhouse
@@ -171,6 +185,8 @@ min15 = {min15}
171
185
  min30 = {min30}
172
186
  min60 = {min60}
173
187
  hour2 = {hour2}
188
+ timeline = {timeline}
189
+ trans = {trans}
174
190
  day_max = {day_max}
175
191
  week_max = {week_max}
176
192
  month_max = {month_max}
@@ -183,6 +199,8 @@ min15_max = {min15_max}
183
199
  min30_max = {min30_max}
184
200
  min60_max = {min60_max}
185
201
  hour2_max = {hour2_max}
202
+ timeline_max = {timeline_max}
203
+ trans_max = {trans_max}
186
204
 
187
205
  [baseinfo]
188
206
  type = clickhouse
@@ -269,6 +287,9 @@ phase1_end = 11:35:00
269
287
  phase2_start = 12:00:00
270
288
  phase2_end = 15:05:00
271
289
 
290
+ [lazy_preload]
291
+ enable = False
292
+
272
293
  [preload]
273
294
  day = True
274
295
  week = True
@@ -282,6 +303,8 @@ min15 = False
282
303
  min30 = False
283
304
  min60 = False
284
305
  hour2 = False
306
+ timeline = False
307
+ trans = False
285
308
  day_max = 100000
286
309
  week_max = 100000
287
310
  month_max = 100000
@@ -294,6 +317,8 @@ min15_max = 5120
294
317
  min30_max = 5120
295
318
  min60_max = 5120
296
319
  hour2_max = 5120
320
+ timeline_max = 5120
321
+ trans_max = 5120
297
322
  """
298
323
 
299
324
 
@@ -304,14 +329,16 @@ def generate_default_config():
304
329
  from hikyuu.data.hku_config_template import hdf5_template
305
330
  user_dir = os.path.expanduser('~')
306
331
  data_dir = "c:\\stock" if sys.platform == 'win32' else f"{user_dir}/stock"
307
- hdf5_config = hdf5_template.format(dir=data_dir, quotation_server='ipc:///tmp/hikyuu_real.ipc',
332
+ hdf5_config = hdf5_template.format(dir=data_dir, reload_time="00:00", quotation_server='ipc:///tmp/hikyuu_real.ipc',
308
333
  day=True, week=False,
309
334
  month=False, quarter=False, halfyear=False, year=False,
310
335
  min1=False, min5=False, min15=False, min30=False,
311
- min60=False, hour2=False, day_max=100000, week_max=100000,
336
+ min60=False, hour2=False, timeline=False, trans=False,
337
+ day_max=100000, week_max=100000,
312
338
  month_max=100000, quarter_max=100000, halfyear_max=100000,
313
339
  year_max=100000, min1_max=5120, min5_max=5120, min15_max=5120,
314
- min30_max=5120, min60_max=5120, hour2_max=5120)
340
+ min30_max=5120, min60_max=5120, hour2_max=5120,
341
+ timeline_max=5120, trans_max=5120)
315
342
  config_dir = f"{user_dir}/.hikyuu"
316
343
  if not os.path.lexists(config_dir):
317
344
  os.makedirs(config_dir)
@@ -0,0 +1,2 @@
1
+ update `hku_base`.`stocktypeinfo` set `minTradeNumber`=100 where `type`=5 and `description`='ETF';
2
+ UPDATE `hku_base`.`version` set `version` = 29;