hikyuu 2.6.7__py3-none-win_amd64.whl → 2.6.8.2__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 (131) hide show
  1. hikyuu/__init__.py +6 -2
  2. hikyuu/__init__.pyi +37 -10
  3. hikyuu/analysis/__init__.pyi +24 -0
  4. hikyuu/analysis/analysis.pyi +25 -1
  5. hikyuu/core.pyi +26 -2
  6. hikyuu/cpp/concrt140.dll +0 -0
  7. hikyuu/cpp/core310.pyd +0 -0
  8. hikyuu/cpp/core310.pyi +419 -31
  9. hikyuu/cpp/core311.pyd +0 -0
  10. hikyuu/cpp/core311.pyi +419 -31
  11. hikyuu/cpp/core312.pyd +0 -0
  12. hikyuu/cpp/core312.pyi +419 -31
  13. hikyuu/cpp/core313.pyd +0 -0
  14. hikyuu/cpp/core313.pyi +419 -31
  15. hikyuu/cpp/core39.pyd +0 -0
  16. hikyuu/cpp/core39.pyi +419 -31
  17. hikyuu/cpp/hikyuu.dll +0 -0
  18. hikyuu/cpp/hikyuu.lib +0 -0
  19. hikyuu/cpp/hku_hdf5.dll +0 -0
  20. hikyuu/cpp/hku_hdf5_cpp.dll +0 -0
  21. hikyuu/cpp/hku_hdf5_hl.dll +0 -0
  22. hikyuu/cpp/hku_hdf5_hl_cpp.dll +0 -0
  23. hikyuu/cpp/i18n/zh_CN/hikyuu.mo +0 -0
  24. hikyuu/cpp/msvcp140.dll +0 -0
  25. hikyuu/cpp/msvcp140_1.dll +0 -0
  26. hikyuu/cpp/msvcp140_2.dll +0 -0
  27. hikyuu/cpp/msvcp140_atomic_wait.dll +0 -0
  28. hikyuu/cpp/msvcp140_codecvt_ids.dll +0 -0
  29. hikyuu/cpp/sqlite3.dll +0 -0
  30. hikyuu/cpp/vcruntime140.dll +0 -0
  31. hikyuu/cpp/vcruntime140_1.dll +0 -0
  32. hikyuu/draw/__init__.pyi +1 -1
  33. hikyuu/draw/drawplot/bokeh_draw.pyi +33 -8
  34. hikyuu/draw/drawplot/echarts_draw.pyi +33 -8
  35. hikyuu/draw/drawplot/matplotlib_draw.pyi +33 -8
  36. hikyuu/extend.py +19 -0
  37. hikyuu/extend.pyi +27 -3
  38. hikyuu/hub.pyi +6 -6
  39. hikyuu/include/hikyuu/DataType.h +2 -2
  40. hikyuu/include/hikyuu/KData.h +91 -25
  41. hikyuu/include/hikyuu/KDataImp.h +31 -46
  42. hikyuu/include/hikyuu/KDataPrivatedBufferImp.h +73 -0
  43. hikyuu/include/hikyuu/KDataSharedBufferImp.h +69 -0
  44. hikyuu/include/hikyuu/KQuery.h +16 -4
  45. hikyuu/include/hikyuu/KRecord.h +4 -1
  46. hikyuu/include/hikyuu/Stock.h +10 -4
  47. hikyuu/include/hikyuu/StockManager.h +11 -3
  48. hikyuu/include/hikyuu/TransRecord.h +2 -2
  49. hikyuu/include/hikyuu/data_driver/KDataDriver.h +5 -0
  50. hikyuu/include/hikyuu/doc.h +2 -2
  51. hikyuu/include/hikyuu/global/GlobalSpotAgent.h +8 -0
  52. hikyuu/include/hikyuu/global/agent/SpotAgent.h +12 -7
  53. hikyuu/include/hikyuu/indicator/Indicator.h +11 -0
  54. hikyuu/include/hikyuu/indicator/Indicator2InImp.h +9 -0
  55. hikyuu/include/hikyuu/indicator/IndicatorImp.h +83 -15
  56. hikyuu/include/hikyuu/indicator/build_in.h +1 -0
  57. hikyuu/include/hikyuu/indicator/crt/AMA.h +2 -1
  58. hikyuu/include/hikyuu/indicator/crt/ATR.h +1 -1
  59. hikyuu/include/hikyuu/indicator/crt/CONTEXT.h +2 -0
  60. hikyuu/include/hikyuu/indicator/crt/CYCLE.h +3 -0
  61. hikyuu/include/hikyuu/indicator/crt/DMA.h +1 -1
  62. hikyuu/include/hikyuu/indicator/crt/IC.h +14 -6
  63. hikyuu/include/hikyuu/indicator/crt/ICIR.h +8 -4
  64. hikyuu/include/hikyuu/indicator/crt/INSUM.h +2 -0
  65. hikyuu/include/hikyuu/indicator/crt/PRICELIST.h +2 -0
  66. hikyuu/include/hikyuu/indicator/crt/REFX.h +25 -0
  67. hikyuu/include/hikyuu/indicator/crt/SLICE.h +4 -4
  68. hikyuu/include/hikyuu/indicator/crt/SPEARMAN.h +3 -2
  69. hikyuu/include/hikyuu/indicator/imp/IContext.h +5 -0
  70. hikyuu/include/hikyuu/indicator/imp/ICval.h +6 -0
  71. hikyuu/include/hikyuu/indicator/imp/IDropna.h +9 -0
  72. hikyuu/include/hikyuu/indicator/imp/IIc.h +2 -1
  73. hikyuu/include/hikyuu/indicator/imp/IPriceList.h +1 -0
  74. hikyuu/include/hikyuu/indicator/imp/IRefX.h +23 -0
  75. hikyuu/include/hikyuu/plugin/backtest.h +2 -0
  76. hikyuu/include/hikyuu/plugin/extind.h +45 -0
  77. hikyuu/include/hikyuu/plugin/hkuextra.h +21 -0
  78. hikyuu/include/hikyuu/plugin/interface/HkuExtraPluginInterface.h +16 -0
  79. hikyuu/include/hikyuu/plugin/interface/TMReportPluginInterface.h +1 -0
  80. hikyuu/include/hikyuu/python/pybind_utils.h +27 -11
  81. hikyuu/include/hikyuu/trade_manage/Performance.h +0 -1
  82. hikyuu/include/hikyuu/trade_manage/TradeCostBase.h +5 -0
  83. hikyuu/include/hikyuu/trade_manage/TradeManager.h +4 -0
  84. hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +10 -1
  85. hikyuu/include/hikyuu/trade_sys/allocatefunds/AllocateFundsBase.h +5 -0
  86. hikyuu/include/hikyuu/trade_sys/condition/ConditionBase.h +5 -0
  87. hikyuu/include/hikyuu/trade_sys/environment/EnvironmentBase.h +5 -0
  88. hikyuu/include/hikyuu/trade_sys/moneymanager/MoneyManagerBase.h +5 -0
  89. hikyuu/include/hikyuu/trade_sys/multifactor/MultiFactorBase.h +6 -3
  90. hikyuu/include/hikyuu/trade_sys/portfolio/Portfolio.h +4 -0
  91. hikyuu/include/hikyuu/trade_sys/profitgoal/ProfitGoalBase.h +5 -0
  92. hikyuu/include/hikyuu/trade_sys/selector/SelectorBase.h +5 -2
  93. hikyuu/include/hikyuu/trade_sys/signal/SignalBase.h +5 -0
  94. hikyuu/include/hikyuu/trade_sys/slippage/SlippageBase.h +5 -0
  95. hikyuu/include/hikyuu/trade_sys/stoploss/StoplossBase.h +6 -1
  96. hikyuu/include/hikyuu/trade_sys/system/System.h +5 -0
  97. hikyuu/include/hikyuu/utilities/datetime/Datetime.h +2 -2
  98. hikyuu/include/hikyuu/utilities/os.h +4 -0
  99. hikyuu/include/hikyuu/utilities/thread/GlobalMQStealThreadPool.h +1 -1
  100. hikyuu/include/hikyuu/utilities/thread/GlobalMQThreadPool.h +1 -1
  101. hikyuu/include/hikyuu/utilities/thread/GlobalThreadPool.h +1 -1
  102. hikyuu/include/hikyuu/utilities/thread/MQThreadPool.h +1 -1
  103. hikyuu/include/hikyuu/version.h +4 -4
  104. hikyuu/include/hikyuu/views/arrow_common.h +38 -0
  105. hikyuu/include/hikyuu/views/arrow_views.h +117 -0
  106. hikyuu/indicator/indicator.py +4 -5
  107. hikyuu/plugin/backtest.dll +0 -0
  108. hikyuu/plugin/clickhousedriver.dll +0 -0
  109. hikyuu/plugin/dataserver.dll +0 -0
  110. hikyuu/plugin/device.dll +0 -0
  111. hikyuu/plugin/extind.dll +0 -0
  112. hikyuu/plugin/hkuextra.dll +0 -0
  113. hikyuu/plugin/import2hdf5.dll +0 -0
  114. hikyuu/plugin/tmreport.dll +0 -0
  115. hikyuu/strategy/strategy_demo1.py +1 -1
  116. hikyuu/test/test_init.py +19 -19
  117. hikyuu/trade_manage/__init__.pyi +32 -7
  118. hikyuu/trade_manage/trade.py +6 -0
  119. hikyuu/trade_manage/trade.pyi +32 -7
  120. hikyuu/trade_sys/__init__.py +4 -0
  121. hikyuu/util/__init__.pyi +1 -1
  122. hikyuu/util/singleton.pyi +1 -1
  123. {hikyuu-2.6.7.dist-info → hikyuu-2.6.8.2.dist-info}/METADATA +15 -3
  124. {hikyuu-2.6.7.dist-info → hikyuu-2.6.8.2.dist-info}/RECORD +128 -125
  125. {hikyuu-2.6.7.dist-info → hikyuu-2.6.8.2.dist-info}/WHEEL +1 -1
  126. {hikyuu-2.6.7.dist-info → hikyuu-2.6.8.2.dist-info}/top_level.txt +1 -1
  127. hikyuu/include/hikyuu/view/MarketView.h +0 -59
  128. hikyuu/setup.py +0 -104
  129. hikyuu-2.6.7.dist-info/LICENSE +0 -201
  130. /hikyuu/include/hikyuu/{view → views}/__init__.py +0 -0
  131. {hikyuu-2.6.7.dist-info → hikyuu-2.6.8.2.dist-info}/entry_points.txt +0 -0
hikyuu/cpp/core313.pyi CHANGED
@@ -1,8 +1,9 @@
1
1
  from __future__ import annotations
2
2
  import collections.abc
3
3
  import numpy
4
+ import numpy.typing
4
5
  import typing
5
- __all__ = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', 'AF_FixedWeight', 'AF_FixedWeightList', 'AF_MultiFactor', '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', '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', 'NOT', 'OFF', 'OrderBrokerBase', 'PF_Simple', 'PF_WithoutAF', 'PG_FixedHoldDays', 'PG_FixedPercent', 'PG_NoGoal', 'POS', 'POW', 'PRICELIST', 'Parameter', 'Performance', 'Portfolio', 'PositionRecord', 'PositionRecordList', 'ProfitGoalBase', 'Query', 'RANK', 'RECOVER_BACKWARD', 'RECOVER_EQUAL_BACKWARD', 'RECOVER_EQUAL_FORWARD', 'RECOVER_FORWARD', 'REF', 'REPLACE', 'RESULT', 'REVERSE', 'ROC', 'ROCP', 'ROCR', 'ROCR100', 'ROUND', 'ROUNDDOWN', 'ROUNDUP', 'RSI', 'SAFTYLOSS', 'SE_EvaluateOptimal', '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', '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', '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_kdata', 'get_last_version', 'get_log_level', 'get_market_view', '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', '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', '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_FixedWeight', 'AF_FixedWeightList', 'AF_MultiFactor', 'AGG_COUNT', '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', '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', 'NOT', 'OFF', 'OrderBrokerBase', 'PF_Simple', 'PF_WithoutAF', 'PG_FixedHoldDays', 'PG_FixedPercent', 'PG_NoGoal', 'POS', 'POW', 'PRICELIST', 'Parameter', 'Performance', 'Portfolio', 'PositionRecord', 'PositionRecordList', 'ProfitGoalBase', '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', 'SE_EvaluateOptimal', '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', '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', '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', 'dates_to_pa', '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_inds_view', 'get_inds_view_pyarrow', 'get_kdata', 'get_last_version', 'get_log_level', 'get_market_view', 'get_market_view_pyarrow', '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', 'krecords_to_pa', 'open_ostream_to_python', 'open_spend_time', 'positions_to_df', 'positions_to_np', 'positions_to_pa', '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', 'timeline_to_pa', 'toPriceList', 'trades_to_df', 'trades_to_np', 'trades_to_pa', 'translist_to_df', 'translist_to_np', 'translist_to_pa', 'view_license', 'weights_to_df', 'weights_to_np', 'weights_to_pa']
6
7
  class AllocateFundsBase:
7
8
  """
8
9
  资产分配算法基类, 子类接口:
@@ -1200,6 +1201,15 @@ class DatetimeList:
1200
1201
  @staticmethod
1201
1202
  def to_np(data: DatetimeList):
1202
1203
  ...
1204
+ @staticmethod
1205
+ def to_numpy(data: DatetimeList):
1206
+ ...
1207
+ @staticmethod
1208
+ def to_pandas(data: DatetimeList):
1209
+ ...
1210
+ @staticmethod
1211
+ def to_pyarrow(data):
1212
+ ...
1203
1213
  def __bool__(self) -> bool:
1204
1214
  """
1205
1215
  Check whether the list is nonempty
@@ -1625,9 +1635,32 @@ class Indicator:
1625
1635
  markeredgecolor(标记的边缘颜色)
1626
1636
  """
1627
1637
  @staticmethod
1628
- def to_df(indicator):
1638
+ def to_numpy(*args, **kwargs):
1629
1639
  """
1630
- 转化为pandas.DataFrame
1640
+ to_np(self: hikyuu.cpp.core313.Indicator) -> numpy.ndarray
1641
+
1642
+ 转化为np.array, 如果为时间序列, 则包含 datetime 日期列
1643
+ """
1644
+ @staticmethod
1645
+ def to_pandas(*args, **kwargs):
1646
+ """
1647
+ to_df(self: hikyuu.cpp.core313.Indicator) -> object
1648
+
1649
+ 转换为 DataFrame
1650
+ """
1651
+ @staticmethod
1652
+ def value_to_numpy(*args, **kwargs):
1653
+ """
1654
+ value_to_np(self: hikyuu.cpp.core313.Indicator) -> numpy.ndarray
1655
+
1656
+ 仅转化值为np.array, 不包含日期列
1657
+ """
1658
+ @staticmethod
1659
+ def value_to_pandas(*args, **kwargs):
1660
+ """
1661
+ value_to_df(self: hikyuu.cpp.core313.Indicator) -> object
1662
+
1663
+ 转换为 DataFrame, 仅包含值
1631
1664
  """
1632
1665
  @typing.overload
1633
1666
  def __add__(self, arg0: Indicator) -> Indicator:
@@ -1964,14 +1997,30 @@ class Indicator:
1964
1997
  """
1965
1998
  是否支持动态指标参数
1966
1999
  """
2000
+ def to_array(self, result_index: typing.SupportsInt = 0) -> numpy.typing.NDArray[numpy.float64]:
2001
+ """
2002
+ 将指定结果集转化为numpy.array
2003
+ """
2004
+ def to_df(self) -> typing.Any:
2005
+ """
2006
+ 转换为 DataFrame
2007
+ """
1967
2008
  def to_np(self) -> numpy.ndarray:
1968
2009
  """
1969
2010
  转化为np.array, 如果为时间序列, 则包含 datetime 日期列
1970
2011
  """
2012
+ def to_pyarrow(self) -> typing.Any:
2013
+ ...
2014
+ def value_to_df(self) -> typing.Any:
2015
+ """
2016
+ 转换为 DataFrame, 仅包含值
2017
+ """
1971
2018
  def value_to_np(self) -> numpy.ndarray:
1972
2019
  """
1973
2020
  仅转化值为np.array, 不包含日期列
1974
2021
  """
2022
+ def value_to_pyarrow(self) -> typing.Any:
2023
+ ...
1975
2024
  @property
1976
2025
  def discard(self) -> int:
1977
2026
  """
@@ -2063,6 +2112,12 @@ class IndicatorImp:
2063
2112
  ...
2064
2113
  def is_serial(self) -> bool:
2065
2114
  ...
2115
+ def print_all_sub_trees(self, show_long_name: bool = False) -> None:
2116
+ ...
2117
+ def print_leaves(self, show_long_name: bool = False) -> None:
2118
+ ...
2119
+ def print_tree(self, show_long_name: bool = False) -> None:
2120
+ ...
2066
2121
  def set_discard(self, arg0: typing.SupportsInt) -> None:
2067
2122
  ...
2068
2123
  @typing.overload
@@ -2130,6 +2185,25 @@ class KData:
2130
2185
  :param colorup: the color of the rectangle where close >= open
2131
2186
  :param colordown: the color of the rectangle where close < open
2132
2187
  """
2188
+ @staticmethod
2189
+ def to_numpy(*args, **kwargs):
2190
+ """
2191
+ to_np(self: hikyuu.cpp.core313.KData) -> numpy.ndarray
2192
+
2193
+ 将 KData 转换为 NumPy 数组
2194
+ """
2195
+ @staticmethod
2196
+ def to_pandas(*args, **kwargs):
2197
+ """
2198
+ to_df(self: hikyuu.cpp.core313.KData, with_stock: bool = False) -> object
2199
+
2200
+ to_df(self, with_stock=False) -> pandas.DataFrame
2201
+
2202
+ 转化为pandas的DataFrame
2203
+
2204
+ :param bool with_stock: 包含Stock的代码与名称
2205
+ :rtype: pandas.DataFrame
2206
+ """
2133
2207
  def __eq__(self, arg0: KData) -> bool:
2134
2208
  ...
2135
2209
  def __getitem__(self, arg0: typing.Any) -> typing.Any:
@@ -2184,6 +2258,16 @@ class KData:
2184
2258
 
2185
2259
  :rtype: DatetimeList
2186
2260
  """
2261
+ @typing.overload
2262
+ def get_kdata(self, ktype: str) -> KData:
2263
+ """
2264
+ get_kdata(self, ktype
2265
+
2266
+ 获取相同时间范围内的其他类型K线数据,如日线下对应的分钟线数据
2267
+
2268
+ :param KQuery::KType ktype: 指定需要的K线类型
2269
+ """
2270
+ @typing.overload
2187
2271
  def get_kdata(self, arg0: Datetime, arg1: Datetime) -> KData:
2188
2272
  """
2189
2273
  get_kdata(self, start_date, end_date)
@@ -2194,6 +2278,17 @@ class KData:
2194
2278
  :param Datetime end: 新的结束日期
2195
2279
  :rtype: KData
2196
2280
  """
2281
+ @typing.overload
2282
+ def get_kdata(self, start: typing.SupportsInt, end: typing.SupportsInt = 9223372036854775807) -> KData:
2283
+ """
2284
+ get_kdata(self, start, end)
2285
+
2286
+ 通过索引获取 KData 子集,相当于切片
2287
+
2288
+ :param int start: 索引起始位置
2289
+ :param int end: 索引结束位置
2290
+ :rtype: KData
2291
+ """
2197
2292
  def get_pos(self, arg0: Datetime) -> typing.Any:
2198
2293
  """
2199
2294
  get_pos(self, datetime)
@@ -2241,6 +2336,8 @@ class KData:
2241
2336
  """
2242
2337
  将 KData 转换为 NumPy 数组
2243
2338
  """
2339
+ def to_pyarrow(self) -> typing.Any:
2340
+ ...
2244
2341
  def tocsv(self, arg0: str) -> None:
2245
2342
  """
2246
2343
  tocsv(self, filename)
@@ -2494,6 +2591,15 @@ class KRecordList:
2494
2591
  @staticmethod
2495
2592
  def to_np(data):
2496
2593
  ...
2594
+ @staticmethod
2595
+ def to_numpy(data):
2596
+ ...
2597
+ @staticmethod
2598
+ def to_pandas(data):
2599
+ ...
2600
+ @staticmethod
2601
+ def to_pyarrow(data):
2602
+ ...
2497
2603
  def __bool__(self) -> bool:
2498
2604
  """
2499
2605
  Check whether the list is nonempty
@@ -3680,6 +3786,12 @@ class PositionRecordList:
3680
3786
  ...
3681
3787
  def to_np(self):
3682
3788
  ...
3789
+ def to_numpy(self):
3790
+ ...
3791
+ def to_pandas(self):
3792
+ ...
3793
+ def to_pyarrow(self):
3794
+ ...
3683
3795
  class ProfitGoalBase:
3684
3796
  """
3685
3797
  盈利目标策略基类
@@ -3932,6 +4044,8 @@ class Query:
3932
4044
  MONTH: typing.ClassVar[str] = 'MONTH'
3933
4045
  NO_RECOVER: typing.ClassVar[Query.RecoverType] # value = <RecoverType.NO_RECOVER: 0>
3934
4046
  QUARTER: typing.ClassVar[str] = 'QUARTER'
4047
+ TIMELINE: typing.ClassVar[str] = 'TIMELINE'
4048
+ TRANS: typing.ClassVar[str] = 'TRANS'
3935
4049
  WEEK: typing.ClassVar[str] = 'WEEK'
3936
4050
  YEAR: typing.ClassVar[str] = 'YEAR'
3937
4051
  @staticmethod
@@ -3947,6 +4061,31 @@ class Query:
3947
4061
  """
3948
4062
  获取所有扩展KType
3949
4063
  """
4064
+ @staticmethod
4065
+ def get_ktype_in_min(arg0: str) -> int:
4066
+ """
4067
+ 获取ktype对应的分钟数
4068
+ """
4069
+ @staticmethod
4070
+ def get_ktype_in_seconds(arg0: str) -> int:
4071
+ """
4072
+ 获取ktype对应的秒数
4073
+ """
4074
+ @staticmethod
4075
+ def is_base_ktype(arg0: str) -> bool:
4076
+ """
4077
+ 判断是否为基础KType
4078
+ """
4079
+ @staticmethod
4080
+ def is_extra_ktype(arg0: str) -> bool:
4081
+ """
4082
+ 判断是否为扩展KType
4083
+ """
4084
+ @staticmethod
4085
+ def is_valid_ktype(arg0: str) -> bool:
4086
+ """
4087
+ 判断KType是否有效
4088
+ """
3950
4089
  def __getstate__(self) -> tuple:
3951
4090
  ...
3952
4091
  def __init__(self, start = 0, end = None, ktype = 'DAY', recover_type = ...):
@@ -3967,21 +4106,9 @@ class Query:
3967
4106
  ...
3968
4107
  def __str__(self) -> str:
3969
4108
  ...
3970
- def get_ktype_in_min(self: str) -> int:
3971
- """
3972
- 获取ktype对应的分钟数
3973
- """
3974
- def is_base_ktype(self: str) -> bool:
4109
+ def is_right_opening(self) -> bool:
3975
4110
  """
3976
- 判断是否为基础KType
3977
- """
3978
- def is_extra_ktype(self: str) -> bool:
3979
- """
3980
- 判断是否为扩展KType
3981
- """
3982
- def is_valid_ktype(self: str) -> bool:
3983
- """
3984
- 判断KType是否有效
4111
+ 判断是否为右开区间,即未指定结束时间
3985
4112
  """
3986
4113
  @property
3987
4114
  def end(self) -> int:
@@ -4139,6 +4266,10 @@ class ScoreRecordList:
4139
4266
  ...
4140
4267
  def to_np(self):
4141
4268
  ...
4269
+ def to_numpy(self):
4270
+ ...
4271
+ def to_pandas(self):
4272
+ ...
4142
4273
  class SelectorBase:
4143
4274
  """
4144
4275
  选择器策略基类,实现标的、系统策略的评估和选取算法,自定义选择器策略子类接口:
@@ -4785,6 +4916,15 @@ class Stock:
4785
4916
  获取所有历史财务信息历史记录, 字段信息可参考 StockManager 中的相关方法: get_history_finance_all_fields/get_history_finance_field_index/get_history_finance_field_name 方法
4786
4917
  日常建议直接使用指标 FINANCE 获取财务数据
4787
4918
  """
4919
+ def get_index_range(self, arg0: Query) -> tuple:
4920
+ """
4921
+ get_index_range(self, query) -> (size_t, size_t)
4922
+
4923
+ 根据KQuery指定的条件, 获取对应的K线位置范围: [start_pos, end_pos)
4924
+
4925
+ :param query [in] 指定的查询条件
4926
+ :return (start_pos, end_pos
4927
+ """
4788
4928
  def get_kdata(self, arg0: Query) -> KData:
4789
4929
  """
4790
4930
  get_kdata(self, query)
@@ -5288,9 +5428,20 @@ class StockManager:
5288
5428
  """
5289
5429
  is_holiday(self, d)
5290
5430
 
5291
- 判断日期是否为节假日
5431
+ 判断指定时间对应的日期是否为节假日(仅使用A股市场)
5292
5432
 
5293
- :param Datetime d: 待判断的日期
5433
+ :param Datetime d: 待判断的时间
5434
+ """
5435
+ def is_trading_hours(self, d: Datetime, market: str = 'SH') -> bool:
5436
+ """
5437
+ is_trading_hours(self, d)
5438
+
5439
+ 判断指定时间对应的日期是否为交易时间
5440
+
5441
+ :param Datetime d: 待判断的时间
5442
+ :param str market: 市场简称
5443
+ :return: 是否为交易时间
5444
+ :rtype: bool
5294
5445
  """
5295
5446
  def reload(self) -> None:
5296
5447
  """
@@ -5496,6 +5647,15 @@ class StockWeightList:
5496
5647
  @staticmethod
5497
5648
  def to_np(data):
5498
5649
  ...
5650
+ @staticmethod
5651
+ def to_numpy(data):
5652
+ ...
5653
+ @staticmethod
5654
+ def to_pandas(data):
5655
+ ...
5656
+ @staticmethod
5657
+ def to_pyarrow(data):
5658
+ ...
5499
5659
  def __bool__(self) -> bool:
5500
5660
  """
5501
5661
  Check whether the list is nonempty
@@ -6456,6 +6616,10 @@ class SystemWeightList:
6456
6616
  ...
6457
6617
  def to_np(self):
6458
6618
  ...
6619
+ def to_numpy(self):
6620
+ ...
6621
+ def to_pandas(self):
6622
+ ...
6459
6623
  class TimeDelta:
6460
6624
  """
6461
6625
  时间时长,用于时间计算。可通过以下方式构建:
@@ -6693,6 +6857,15 @@ class TimeLineList:
6693
6857
  @staticmethod
6694
6858
  def to_np(data):
6695
6859
  ...
6860
+ @staticmethod
6861
+ def to_numpy(data):
6862
+ ...
6863
+ @staticmethod
6864
+ def to_pandas(data):
6865
+ ...
6866
+ @staticmethod
6867
+ def to_pyarrow(data):
6868
+ ...
6696
6869
  def __bool__(self) -> bool:
6697
6870
  """
6698
6871
  Check whether the list is nonempty
@@ -7649,6 +7822,12 @@ class TradeRecordList:
7649
7822
  ...
7650
7823
  def to_np(self):
7651
7824
  ...
7825
+ def to_numpy(self):
7826
+ ...
7827
+ def to_pandas(self):
7828
+ ...
7829
+ def to_pyarrow(self):
7830
+ ...
7652
7831
  class TradeRequest:
7653
7832
  """
7654
7833
  交易请求记录。系统内部在实现延迟操作时登记的交易请求信息。暴露该结构的主要目的是用于
@@ -7729,6 +7908,15 @@ class TransList:
7729
7908
  @staticmethod
7730
7909
  def to_np(data):
7731
7910
  ...
7911
+ @staticmethod
7912
+ def to_numpy(data):
7913
+ ...
7914
+ @staticmethod
7915
+ def to_pandas(data):
7916
+ ...
7917
+ @staticmethod
7918
+ def to_pyarrow(data):
7919
+ ...
7732
7920
  def __bool__(self) -> bool:
7733
7921
  """
7734
7922
  Check whether the list is nonempty
@@ -7965,6 +8153,88 @@ def AF_MultiFactor() -> AllocateFundsBase:
7965
8153
 
7966
8154
  创建 MultiFactor 评分权重的资产分配算法实例, 即直接以SE返回的评分作为权重。
7967
8155
  """
8156
+ def AGG_COUNT(ind: Indicator, ktype: str = 'MIN', fill_null: bool = False, unit: typing.SupportsInt = 1) -> Indicator:
8157
+ """
8158
+ 聚合函数: 非空值计数, 可参考 AGG_STD 帮助
8159
+ """
8160
+ def AGG_MAD(ind: Indicator, ktype: str = 'MIN', fill_null: bool = False, unit: typing.SupportsInt = 1) -> Indicator:
8161
+ """
8162
+ 聚合函数: 平均绝对偏差, 可参考 AGG_STD 帮助
8163
+ """
8164
+ def AGG_MAX(ind: Indicator, ktype: str = 'MIN', fill_null: bool = False, unit: typing.SupportsInt = 1) -> Indicator:
8165
+ """
8166
+ 聚合函数: 最大值, 可参考 AGG_STD 帮助
8167
+ """
8168
+ def AGG_MEAN(ind: Indicator, ktype: str = 'MIN', fill_null: bool = False, unit: typing.SupportsInt = 1) -> Indicator:
8169
+ """
8170
+ 聚合函数: 平均值, 可参考 AGG_STD 帮助
8171
+ """
8172
+ def AGG_MEDIAN(ind: Indicator, ktype: str = 'MIN', fill_null: bool = False, unit: typing.SupportsInt = 1) -> Indicator:
8173
+ """
8174
+ 聚合函数: 中位数, 可参考 AGG_STD 帮助
8175
+ """
8176
+ def AGG_MIN(ind: Indicator, ktype: str = 'MIN', fill_null: bool = False, unit: typing.SupportsInt = 1) -> Indicator:
8177
+ """
8178
+ 聚合函数: 最小值, 可参考 AGG_STD 帮助
8179
+ """
8180
+ def AGG_PROD(ind: Indicator, ktype: str = 'MIN', fill_null: bool = False, unit: typing.SupportsInt = 1) -> Indicator:
8181
+ """
8182
+ 聚合函数: 乘积, 可参考 AGG_STD 帮助
8183
+ """
8184
+ def AGG_QUANTILE(ind: Indicator, ktype: str = 'MIN', fill_null: bool = False, unit: typing.SupportsInt = 1, quantile: typing.SupportsFloat = 0.75) -> Indicator:
8185
+ """
8186
+ AGG_QUANTILE(ind[, ktype=Query.MIN, fill_null=False, unit=1, quantile=0.75])
8187
+
8188
+ 聚合其他K线周期分位数, 可参考 AGG_STD 帮助
8189
+
8190
+ :param Indicator ind: 待计算指标
8191
+ :param KQuery.KType ktype: 聚合的K线周期
8192
+ :param bool fill_null: 是否填充缺失值
8193
+ :param int unit: 聚合周期单位 (上下文K线分组单位, 使用日线计算分钟线聚合时, unit=2代表聚合2天的分钟线)
8194
+ :param float quantile: 分位数 (0, 1) 之间
8195
+ :return: 指标数据
8196
+ :rtype: Indicator
8197
+ """
8198
+ def AGG_STD(ind: Indicator, ktype: str = 'MIN', fill_null: bool = False, unit: typing.SupportsInt = 1, ddof: typing.SupportsInt = 1) -> Indicator:
8199
+ """
8200
+ AGG_STD(ind[, ktype=Query.MIN, fill_null=False, unit=1, ddof=1])
8201
+
8202
+ 聚合其他K线周期的标准差, 如计算日线时聚合分钟线收盘价的标准差
8203
+
8204
+ >>> kdata = get_kdata('sh600000', Query(Datetime(20250101), ktype=Query.DAY))
8205
+ >>> ind = AGG_STD(CLOSE(), ktype=Query.MIN, fill_null=False, unit=1, ddof=1)
8206
+ >>> ind(k)
8207
+
8208
+ :param Indicator ind: 指标数据
8209
+ :param KQuery.KType ktype: 聚合的K线周期
8210
+ :param bool fill_null: 是否填充缺失值
8211
+ :param int unit: 聚合周期单位 (滚动聚合分组单位, 如使用日线计算分钟线聚合时, unit=2代表聚合2天的分钟线)
8212
+ :param int ddof: 自由度(1: 样本标准差, 0: 总体标准差)
8213
+ :return: 指标数据
8214
+ :rtype: Indicator
8215
+ """
8216
+ def AGG_SUM(ind: Indicator, ktype: str = 'MIN', fill_null: bool = False, unit: typing.SupportsInt = 1) -> Indicator:
8217
+ """
8218
+ 聚合函数: 总和, 可参考 AGG_STD 帮助
8219
+ """
8220
+ def AGG_VAR(ind: Indicator, ktype: str = 'MIN', fill_null: bool = False, unit: typing.SupportsInt = 1, ddof: typing.SupportsInt = 1) -> Indicator:
8221
+ """
8222
+ AGG_VAR(ind[, ktype=Query.MIN, fill_null=False, unit=1, ddof=1])
8223
+
8224
+ 聚合其他K线周期的方差, 如计算日线时聚合分钟线收盘价的方差
8225
+
8226
+ >>> kdata = get_kdata('sh600000', Query(Datetime(20250101), ktype=Query.DAY))
8227
+ >>> ind = AGG_VAR(CLOSE(), ktype=Query.MIN, fill_null=False, unit=1, ddof=1)
8228
+ >>> ind(k)
8229
+
8230
+ :param Indicator ind: 待计算指标
8231
+ :param KQuery.KType ktype: 聚合的K线周期
8232
+ :param bool fill_null: 是否填充缺失值
8233
+ :param int unit: 聚合周期单位 (上下文K线分组单位, 使用日线计算分钟线聚合时, unit=2代表聚合2天的分钟线)
8234
+ :param int ddof: 自由度(1: 样本标准差, 0: 总体标准差)
8235
+ :return: 指标数据
8236
+ :rtype: Indicator
8237
+ """
7968
8238
  @typing.overload
7969
8239
  def ALIGN(ref: DatetimeList, fill_null: bool = True) -> Indicator:
7970
8240
  ...
@@ -8947,11 +9217,16 @@ def Hours(arg0: typing.SupportsInt) -> TimeDelta:
8947
9217
  :param int hours: 小时数
8948
9218
  :rtype: TimeDelta
8949
9219
  """
8950
- def IC(ind: Indicator, stks: typing.Any, query: Query, ref_stk: Stock, n: typing.SupportsInt = 1, spearman: bool = True) -> Indicator:
9220
+ def IC(ind: Indicator, stks: typing.Any, query: Query, ref_stk: Stock, n: typing.SupportsInt = 1, spearman: bool = True, strict: bool = False) -> Indicator:
8951
9221
  """
8952
- IC(ind, stks, query, ref_stk[, n=1])
9222
+ IC(ind, stks, query, ref_stk[, n=1, spearman=True, strict=False]) -> Indicator
8953
9223
 
8954
- 计算指定的因子相对于参考证券的 IC (实际为 RankIC
9224
+ 计算指定的因子相对于参考证券的 IC (实际为 RankIC)
9225
+
9226
+ IC 原本需要 “t 时刻因子值→t+1 时刻收益”,此处改为计算 “t 时刻因子值→t 时刻之前 N 天的收益”(比如过去 5 天的收益)。
9227
+ (否则当前值都会是缺失NA), 相当于原始预测 IC 右移 n 位。
9228
+
9229
+ 如需严格“t 时刻因子值→t+1 时刻收益“计算,请设置 strict=True (注意此模式下, 后n位为 NA)
8955
9230
 
8956
9231
  :param Indicator ind: 输入因子
8957
9232
  :param sequence(stock)|Block stks 证券组合
@@ -8959,10 +9234,11 @@ def IC(ind: Indicator, stks: typing.Any, query: Query, ref_stk: Stock, n: typing
8959
9234
  :param Stock ref_stk: 参照证券,通常使用 sh000300 沪深300
8960
9235
  :param int n: 时间窗口
8961
9236
  :param bool spearman: 使用 spearman 相关系数,否则为 pearson
9237
+ :param bool strict: 严格模式
8962
9238
  """
8963
- def ICIR(ind: Indicator, stks: typing.Any, query: Query, ref_stk: Stock, n: typing.SupportsInt = 1, rolling_n: typing.SupportsInt = 120, spearman: bool = True) -> Indicator:
9239
+ def ICIR(ind: Indicator, stks: typing.Any, query: Query, ref_stk: Stock, n: typing.SupportsInt = 1, rolling_n: typing.SupportsInt = 120, spearman: bool = True, strict: bool = False) -> Indicator:
8964
9240
  """
8965
- ICIR(ind, stks, query, ref_stk[, n=1, rolling_n=120])
9241
+ ICIR(ind, stks, query, ref_stk[, n=1, rolling_n=120, spearman=True, strict=False])
8966
9242
 
8967
9243
  计算 IC 因子 IR = IC的多周期均值/IC的标准方差
8968
9244
 
@@ -8973,6 +9249,7 @@ def ICIR(ind: Indicator, stks: typing.Any, query: Query, ref_stk: Stock, n: typi
8973
9249
  :param int n: 计算IC时对应的 n 日收益率
8974
9250
  :param int rolling_n: 滚动周期
8975
9251
  :param bool spearman: 使用 spearman 相关系数,否则为 pearson
9252
+ :param bool strict: 是否严格IC模式
8976
9253
  """
8977
9254
  @typing.overload
8978
9255
  def IF(arg0: Indicator, arg1: Indicator, arg2: Indicator) -> Indicator:
@@ -9095,12 +9372,18 @@ def INDEXV(kdata: KData, fill_null: bool = True) -> Indicator:
9095
9372
  返回对应的大盘成交量,分别是上证指数,深证成指,科创50,创业板指
9096
9373
  """
9097
9374
  @typing.overload
9375
+ def INSUM(block: Block, mode: typing.SupportsInt, fill_null: bool = True) -> Indicator:
9376
+ ...
9377
+ @typing.overload
9098
9378
  def INSUM(block: Block, ind: Indicator, mode: typing.SupportsInt, fill_null: bool = True) -> Indicator:
9099
9379
  ...
9100
9380
  @typing.overload
9101
9381
  def INSUM(block: Block, query: Query, ind: Indicator, mode: typing.SupportsInt, fill_null: bool = True) -> Indicator:
9102
9382
  ...
9103
9383
  @typing.overload
9384
+ def INSUM(stks: collections.abc.Sequence, mode: typing.SupportsInt, fill_null: bool = True) -> Indicator:
9385
+ ...
9386
+ @typing.overload
9104
9387
  def INSUM(stks: collections.abc.Sequence, ind: Indicator, mode: typing.SupportsInt, fill_null: bool = True) -> Indicator:
9105
9388
  ...
9106
9389
  @typing.overload
@@ -9939,6 +10222,13 @@ def POW(data: typing.SupportsFloat, n: typing.SupportsInt) -> Indicator:
9939
10222
  :param int|Indicator|IndParam n: 幂
9940
10223
  :rtype: Indicator
9941
10224
  """
10225
+ @typing.overload
10226
+ def PRICELIST(dates: DatetimeList, value: typing.SupportsFloat, discard: typing.SupportsInt = 0) -> Indicator:
10227
+ ...
10228
+ @typing.overload
10229
+ def PRICELIST(size: typing.SupportsInt, value: typing.SupportsFloat, discard: typing.SupportsInt = 0) -> Indicator:
10230
+ ...
10231
+ @typing.overload
9942
10232
  def PRICELIST(data: typing.Any = None, discard: typing.SupportsInt = 0, align_dates: typing.Any = None) -> Indicator:
9943
10233
  """
9944
10234
  PRICELIST([data=None, discard=0, align_dates=None])
@@ -9951,7 +10241,7 @@ def PRICELIST(data: typing.Any = None, discard: typing.SupportsInt = 0, align_da
9951
10241
  :rtype: Indicator
9952
10242
  """
9953
10243
  @typing.overload
9954
- def RANK(block: Block, ref_ind: Indicator, mode: typing.SupportsInt = 0, fill_null: bool = True, market: str = 'SH') -> Indicator:
10244
+ def RANK(stks: collections.abc.Sequence, mode: typing.SupportsInt = 0, fill_null: bool = True, market: str = 'SH') -> Indicator:
9955
10245
  ...
9956
10246
  @typing.overload
9957
10247
  def RANK(stks: collections.abc.Sequence, ref_ind: Indicator, mode: typing.SupportsInt = 0, fill_null: bool = True, market: str = 'SH') -> Indicator:
@@ -10058,6 +10348,19 @@ def REF(data: Indicator, n: typing.SupportsInt) -> Indicator:
10058
10348
  :rtype: Indicator
10059
10349
  """
10060
10350
  @typing.overload
10351
+ def REFX(n: typing.SupportsInt) -> Indicator:
10352
+ ...
10353
+ @typing.overload
10354
+ def REFX(ind: Indicator, n: typing.SupportsInt) -> Indicator:
10355
+ """
10356
+ REFX(ind, n)
10357
+
10358
+ REF增强(非安全引用, 勿用于回测)。用于获取指标中第n个周期的值, n为正数时从当前周期向前数, 为负数时从当前周期向后数。
10359
+
10360
+ :param Indicator ind: 指标
10361
+ :param int n: 周期数
10362
+ """
10363
+ @typing.overload
10061
10364
  def REPLACE(old_value: typing.SupportsFloat = ..., new_value: typing.SupportsFloat = 0.0, ignore_discard: bool = False) -> Indicator:
10062
10365
  ...
10063
10366
  @typing.overload
@@ -10641,19 +10944,19 @@ def SIN(arg0: typing.SupportsFloat) -> Indicator:
10641
10944
  def SLICE(data: collections.abc.Sequence[typing.SupportsFloat], start: typing.SupportsInt, end: typing.SupportsInt) -> Indicator:
10642
10945
  ...
10643
10946
  @typing.overload
10644
- def SLICE(start: typing.SupportsInt, end: typing.SupportsInt, result_index: typing.SupportsInt = 0) -> Indicator:
10947
+ def SLICE(start: typing.SupportsInt, end: typing.SupportsInt, result_index: typing.SupportsInt = -1) -> Indicator:
10645
10948
  ...
10646
10949
  @typing.overload
10647
10950
  def SLICE(data: Indicator, start: typing.SupportsInt, end: typing.SupportsInt, result_index: typing.SupportsInt = 0) -> Indicator:
10648
10951
  """
10649
- SLICE(data, start, end, result_index=0)
10952
+ SLICE(data, start, end, result_index=-1)
10650
10953
 
10651
10954
  获取某指标中指定范围 [start, end) 的数据,生成新的指标
10652
10955
 
10653
10956
  :param Indicator|PriceList data: 输入数据
10654
10957
  :param int start: 起始位置
10655
10958
  :param int end: 终止位置(不包含本身)
10656
- :param int result_index: 原输入数据中的结果集
10959
+ :param int result_index: 原输入数据中的结果集, 小于0时表示全部结果集
10657
10960
  """
10658
10961
  @typing.overload
10659
10962
  def SLOPE(n: typing.SupportsInt = 22) -> Indicator:
@@ -13558,6 +13861,10 @@ def dates_to_np(arg0: DatetimeList) -> numpy.ndarray:
13558
13861
  """
13559
13862
  将 DatetimeList 转换为 NumPy 元组
13560
13863
  """
13864
+ def dates_to_pa(arg0: DatetimeList) -> typing.Any:
13865
+ """
13866
+ 将日期列表转换为 pyarrow.Table 对象
13867
+ """
13561
13868
  def df_to_krecords(df: typing.Any, columns: collections.abc.Sequence[str] = ['datetime', 'open', 'high', 'low', 'close', 'amount', 'volume']) -> KRecordList:
13562
13869
  """
13563
13870
  df_to_krecords(df: pd.DataFrame[, columns: dict]) -> KRecordList
@@ -13620,6 +13927,37 @@ def get_date_range(start: Datetime, end: Datetime) -> DatetimeList:
13620
13927
  :rtype: DatetimeList
13621
13928
  """
13622
13929
  @typing.overload
13930
+ def get_inds_view(stks: collections.abc.Sequence, inds: collections.abc.Sequence[Indicator], query: Query, market: str = 'SH') -> typing.Any:
13931
+ ...
13932
+ @typing.overload
13933
+ def get_inds_view(stks: collections.abc.Sequence, inds: collections.abc.Sequence[Indicator], date: Datetime, cal_len: typing.SupportsInt = 100, ktype: str = 'DAY', market: str = 'SH') -> typing.Any:
13934
+ """
13935
+ get_inds_view(stks, inds, date[, cal_len=100, ktype=Query.DAY, market='SH']) -> pandas.DataFrame)
13936
+
13937
+ 方式1: 获取指定日期的各证券的各指标结果
13938
+
13939
+ :param stks: 证券列表
13940
+ :param list[Indicator] inds: 指标列表
13941
+ :param Datetime date: 指定日期
13942
+ :param int cal_len: 计算需要的数据长度
13943
+ :param str ktype: k线类型
13944
+ :param str market: 指定行情市场(用于日期对齐)
13945
+
13946
+ 方式2: 获取按指定Query查询计算的各证券的各指标结果, 结果中将包含指定 Query 包含的所有指定市场交易日日期
13947
+ get_inds_view(stks, inds, query, market='SH'])
13948
+
13949
+ :param stks: 指定证券列表
13950
+ :param list[Indicator] inds: 指定指标列表
13951
+ :param Query query: 查询条件
13952
+ :param str market: 指定行情市场(用于日期对齐)
13953
+ """
13954
+ @typing.overload
13955
+ def get_inds_view_pyarrow(stks: collections.abc.Sequence, inds: collections.abc.Sequence[Indicator], query: Query, market: str = 'SH') -> typing.Any:
13956
+ ...
13957
+ @typing.overload
13958
+ def get_inds_view_pyarrow(stks: collections.abc.Sequence, inds: collections.abc.Sequence[Indicator], date: Datetime, cal_len: typing.SupportsInt = 100, ktype: str = 'DAY', market: str = 'SH') -> typing.Any:
13959
+ ...
13960
+ @typing.overload
13623
13961
  def get_kdata(arg0: str, arg1: Query) -> KData:
13624
13962
  ...
13625
13963
  @typing.overload
@@ -13665,6 +14003,8 @@ def get_market_view(stks: collections.abc.Sequence, date: Datetime = ..., market
13665
14003
  :return: 指定股票列表最后行情数据
13666
14004
  :rtype: pandas.DataFrame
13667
14005
  """
14006
+ def get_market_view_pyarrow(stks: collections.abc.Sequence, date: Datetime = ..., market: str = 'SH') -> typing.Any:
14007
+ ...
13668
14008
  def get_spot_from_buffer_server(arg0: str, arg1: str, arg2: str, arg3: Datetime) -> list[SpotRecord]:
13669
14009
  """
13670
14010
  get_spot_from_buffer_server(addr: str, market: str, code: str, datetime: str)
@@ -13751,6 +14091,10 @@ def krecords_to_df(arg0: KRecordList) -> typing.Any:
13751
14091
  ...
13752
14092
  def krecords_to_np(arg0: KRecordList) -> numpy.ndarray:
13753
14093
  ...
14094
+ def krecords_to_pa(arg0: KRecordList) -> typing.Any:
14095
+ """
14096
+ 将KRecordList转换为parraw.Table
14097
+ """
13754
14098
  def open_ostream_to_python() -> None:
13755
14099
  ...
13756
14100
  def open_spend_time() -> None:
@@ -13763,12 +14107,22 @@ def positions_to_df(arg0: PositionRecordList) -> typing.Any:
13763
14107
 
13764
14108
  将持仓记录列表转换为 pandas DataFrame
13765
14109
 
14110
+ 注意: 其中的当前市值、利润、盈亏等计算值均以日线计算, 如使用日线一下级别回测时, 对未清仓的持仓记录需要自行重新计算!
14111
+
13766
14112
  :param PositionRecordList positions: 持仓记录列表
13767
14113
  :return: 包含持仓记录的 pandas DataFrame
13768
14114
  :rtype: pandas.DataFrame
13769
14115
  """
13770
14116
  def positions_to_np(arg0: PositionRecordList) -> numpy.ndarray:
13771
- ...
14117
+ """
14118
+ 将持仓列表转换为Numpy
14119
+
14120
+ 注意: 其中的当前市值、利润、盈亏等计算值均以日线计算, 如使用日线一下级别回测时, 对未清仓的持仓记录需要自行重新计算!
14121
+ """
14122
+ def positions_to_pa(arg0: PositionRecordList) -> typing.Any:
14123
+ """
14124
+ 将交易记录列表转换为 pyarrow.Table 对象
14125
+ """
13772
14126
  @typing.overload
13773
14127
  def register_extra_ktype(ktype: str, basetype: str, minutes: typing.SupportsInt, get_phase_end: collections.abc.Callable[[Datetime], Datetime]) -> None:
13774
14128
  ...
@@ -13898,6 +14252,14 @@ def set_python_in_interactive(arg0: bool) -> None:
13898
14252
  ...
13899
14253
  def set_python_in_jupyter(arg0: bool) -> None:
13900
14254
  ...
14255
+ def spot_agent_is_connected() -> bool:
14256
+ """
14257
+ 判断行情数据接收代理是否已连接
14258
+ """
14259
+ def spot_agent_is_running() -> bool:
14260
+ """
14261
+ 判断行情数据接收代理是否在运行
14262
+ """
13901
14263
  def start_data_server(addr: str = 'tcp://0.0.0.0:9201', work_num: typing.SupportsInt = 2, save_tick: bool = False, buf_tick: bool = False) -> None:
13902
14264
  """
13903
14265
  start_data_server(addr: str[, work_num: int=2])
@@ -13911,7 +14273,15 @@ def start_data_server(addr: str = 'tcp://0.0.0.0:9201', work_num: typing.Support
13911
14273
  :return: None
13912
14274
  """
13913
14275
  def start_spot_agent(print: bool = False, worker_num: typing.SupportsInt = 1, addr: str = '') -> None:
13914
- ...
14276
+ """
14277
+ start_spot_agent([print=False, worker_num=1, addr=""])
14278
+
14279
+ 启动行情数据接收代理
14280
+
14281
+ :param print: 是否打印日志
14282
+ :param worker_num: 工作线程数
14283
+ :param addr: 行情采集服务地址
14284
+ """
13915
14285
  def stop_data_server() -> None:
13916
14286
  """
13917
14287
  stop_data_server()
@@ -13919,7 +14289,9 @@ def stop_data_server() -> None:
13919
14289
  停止数据缓存服务
13920
14290
  """
13921
14291
  def stop_spot_agent() -> None:
13922
- ...
14292
+ """
14293
+ 终止行情数据接收代理
14294
+ """
13923
14295
  def systemweights_to_df(arg0: SystemWeightList) -> typing.Any:
13924
14296
  ...
13925
14297
  def systemweights_to_np(arg0: SystemWeightList) -> numpy.ndarray:
@@ -13932,6 +14304,10 @@ def timeline_to_np(arg0: TimeLineList) -> numpy.ndarray:
13932
14304
  """
13933
14305
  将分时线记录转换为NumPy元组
13934
14306
  """
14307
+ def timeline_to_pa(arg0: TimeLineList) -> typing.Any:
14308
+ """
14309
+ 将分时线记录转换为 pyarrow.Table 对象
14310
+ """
13935
14311
  def toPriceList(arg0: collections.abc.Sequence) -> list[float]:
13936
14312
  """
13937
14313
  将 python list/tuple/np.arry 对象转化为 PriceList 对象
@@ -13948,6 +14324,10 @@ def trades_to_df(arg0: TradeRecordList) -> typing.Any:
13948
14324
  """
13949
14325
  def trades_to_np(arg0: TradeRecordList) -> numpy.ndarray:
13950
14326
  ...
14327
+ def trades_to_pa(arg0: TradeRecordList) -> typing.Any:
14328
+ """
14329
+ 将交易记录列表转换为 pyarrow.Table 对象
14330
+ """
13951
14331
  def translist_to_df(arg0: TransList) -> typing.Any:
13952
14332
  """
13953
14333
  将分笔记录转换为 DataFrame
@@ -13956,6 +14336,10 @@ def translist_to_np(arg0: TransList) -> numpy.ndarray:
13956
14336
  """
13957
14337
  将分笔记录转换为NumPy元组
13958
14338
  """
14339
+ def translist_to_pa(arg0: TransList) -> typing.Any:
14340
+ """
14341
+ 将分笔记录转换为 pyarrow.Table 对象
14342
+ """
13959
14343
  def view_license() -> str:
13960
14344
  """
13961
14345
  view_license()
@@ -13966,6 +14350,10 @@ def weights_to_df(arg0: StockWeightList) -> typing.Any:
13966
14350
  ...
13967
14351
  def weights_to_np(arg0: StockWeightList) -> numpy.ndarray:
13968
14352
  ...
14353
+ def weights_to_pa(arg0: StockWeightList) -> typing.Any:
14354
+ """
14355
+ 将权息记录列表转换为 pyarrow.Table 对象
14356
+ """
13969
14357
  DEBUG: LOG_LEVEL # value = <LOG_LEVEL.DEBUG: 1>
13970
14358
  ERROR: LOG_LEVEL # value = <LOG_LEVEL.ERROR: 4>
13971
14359
  FATAL: LOG_LEVEL # value = <LOG_LEVEL.FATAL: 5>