hikyuu 2.6.9__py3-none-win_amd64.whl → 2.7.0__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 (80) hide show
  1. hikyuu/__init__.py +26 -5
  2. hikyuu/__init__.pyi +609 -614
  3. hikyuu/analysis/__init__.pyi +584 -589
  4. hikyuu/analysis/analysis.pyi +585 -590
  5. hikyuu/core.pyi +586 -591
  6. hikyuu/cpp/__init__.pyi +2 -2
  7. hikyuu/cpp/core310.pyd +0 -0
  8. hikyuu/cpp/core310.pyi +60 -100
  9. hikyuu/cpp/core311.pyd +0 -0
  10. hikyuu/cpp/core311.pyi +60 -100
  11. hikyuu/cpp/core312.pyd +0 -0
  12. hikyuu/cpp/core312.pyi +60 -100
  13. hikyuu/cpp/core313.pyd +0 -0
  14. hikyuu/cpp/core313.pyi +60 -100
  15. hikyuu/cpp/hikyuu.dll +0 -0
  16. hikyuu/cpp/hikyuu.lib +0 -0
  17. hikyuu/cpp/sqlite3.dll +0 -0
  18. hikyuu/data/download_block.py +61 -28
  19. hikyuu/draw/drawplot/__init__.pyi +8 -8
  20. hikyuu/draw/drawplot/bokeh_draw.pyi +600 -605
  21. hikyuu/draw/drawplot/common.pyi +1 -1
  22. hikyuu/draw/drawplot/echarts_draw.pyi +602 -607
  23. hikyuu/draw/drawplot/matplotlib_draw.pyi +612 -617
  24. hikyuu/draw/elder.pyi +11 -11
  25. hikyuu/draw/kaufman.pyi +18 -18
  26. hikyuu/draw/volume.pyi +10 -10
  27. hikyuu/extend.py +0 -7
  28. hikyuu/extend.pyi +594 -599
  29. hikyuu/fetcher/stock/zh_block_em.py +0 -60
  30. hikyuu/gui/HikyuuTDX.py +18 -1
  31. hikyuu/gui/data/MainWindow.py +36 -10
  32. hikyuu/gui/images/liandongxiaopu.png +0 -0
  33. hikyuu/hub.pyi +6 -6
  34. hikyuu/include/hikyuu/Stock.h +2 -2
  35. hikyuu/include/hikyuu/config.h +0 -3
  36. hikyuu/include/hikyuu/plugin/device.h +10 -0
  37. hikyuu/include/hikyuu/plugin/interface/DevicePluginInterface.h +2 -0
  38. hikyuu/include/hikyuu/plugin/interface/plugins.h +0 -5
  39. hikyuu/include/hikyuu/python/pybind_utils.h +0 -12
  40. hikyuu/include/hikyuu/trade_sys/slippage/build_in.h +5 -1
  41. hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_LogNormal.h +22 -0
  42. hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_Normal.h +22 -0
  43. hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_TruncNormal.h +25 -0
  44. hikyuu/include/hikyuu/trade_sys/slippage/crt/SP_Uniform.h +23 -0
  45. hikyuu/include/hikyuu/trade_sys/slippage/imp/LogNormalSlippage.h +28 -0
  46. hikyuu/include/hikyuu/trade_sys/slippage/imp/NormalSlippage.h +28 -0
  47. hikyuu/include/hikyuu/trade_sys/slippage/imp/TruncNormalSlippage.h +28 -0
  48. hikyuu/include/hikyuu/trade_sys/slippage/imp/UniformSlippage.h +24 -0
  49. hikyuu/include/hikyuu/version.h +5 -5
  50. hikyuu/plugin/backtest.dll +0 -0
  51. hikyuu/plugin/clickhousedriver.dll +0 -0
  52. hikyuu/plugin/dataserver.dll +0 -0
  53. hikyuu/plugin/dataserver_parquet.dll +0 -0
  54. hikyuu/plugin/device.dll +0 -0
  55. hikyuu/plugin/extind.dll +0 -0
  56. hikyuu/plugin/hkuextra.dll +0 -0
  57. hikyuu/plugin/import2hdf5.dll +0 -0
  58. hikyuu/plugin/tmreport.dll +0 -0
  59. hikyuu/trade_manage/__init__.pyi +600 -605
  60. hikyuu/trade_manage/broker.pyi +3 -3
  61. hikyuu/trade_manage/broker_easytrader.pyi +1 -1
  62. hikyuu/trade_manage/trade.py +0 -2
  63. hikyuu/trade_manage/trade.pyi +600 -605
  64. hikyuu/util/singleton.pyi +1 -1
  65. {hikyuu-2.6.9.dist-info → hikyuu-2.7.0.dist-info}/METADATA +24 -20
  66. {hikyuu-2.6.9.dist-info → hikyuu-2.7.0.dist-info}/RECORD +69 -70
  67. {hikyuu-2.6.9.dist-info → hikyuu-2.7.0.dist-info}/top_level.txt +0 -1
  68. hikyuu/cpp/arrow.dll +0 -0
  69. hikyuu/cpp/core39.pyd +0 -0
  70. hikyuu/cpp/core39.pyi +0 -14818
  71. hikyuu/cpp/msvcp140-a118642f3ae8774fb9dc223e15c4a52e.dll +0 -0
  72. hikyuu/cpp/parquet.dll +0 -0
  73. hikyuu/include/hikyuu/plugin/hkuviews.h +0 -36
  74. hikyuu/include/hikyuu/plugin/interface/HkuViewsPluginInterface.h +0 -34
  75. hikyuu/include/hikyuu/views/__init__.py +0 -1
  76. hikyuu/include/hikyuu/views/arrow_common.h +0 -38
  77. hikyuu/include/hikyuu/views/arrow_views.h +0 -117
  78. hikyuu/plugin/hkuviews.dll +0 -0
  79. {hikyuu-2.6.9.dist-info → hikyuu-2.7.0.dist-info}/WHEEL +0 -0
  80. {hikyuu-2.6.9.dist-info → hikyuu-2.7.0.dist-info}/entry_points.txt +0 -0
hikyuu/cpp/core313.pyi CHANGED
@@ -3,7 +3,7 @@ import collections.abc
3
3
  import numpy
4
4
  import numpy.typing
5
5
  import typing
6
- __all__ = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', 'AF_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', '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', '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_funds_list', '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', 'parallel_run_pf', 'parallel_run_sys', '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
+ __all__ = ['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']
7
7
  class AllocateFundsBase:
8
8
  """
9
9
  资产分配算法基类, 子类接口:
@@ -1210,9 +1210,6 @@ class DatetimeList:
1210
1210
  @staticmethod
1211
1211
  def to_pandas(data: DatetimeList):
1212
1212
  ...
1213
- @staticmethod
1214
- def to_pyarrow(data):
1215
- ...
1216
1213
  def __bool__(self) -> bool:
1217
1214
  """
1218
1215
  Check whether the list is nonempty
@@ -2335,8 +2332,6 @@ class KData:
2335
2332
  """
2336
2333
  将 KData 转换为 NumPy 数组
2337
2334
  """
2338
- def to_pyarrow(self) -> typing.Any:
2339
- ...
2340
2335
  def tocsv(self, arg0: str) -> None:
2341
2336
  """
2342
2337
  tocsv(self, filename)
@@ -2596,9 +2591,6 @@ class KRecordList:
2596
2591
  @staticmethod
2597
2592
  def to_pandas(data):
2598
2593
  ...
2599
- @staticmethod
2600
- def to_pyarrow(data):
2601
- ...
2602
2594
  def __bool__(self) -> bool:
2603
2595
  """
2604
2596
  Check whether the list is nonempty
@@ -3887,8 +3879,6 @@ class PositionRecordList:
3887
3879
  ...
3888
3880
  def to_pandas(self):
3889
3881
  ...
3890
- def to_pyarrow(self):
3891
- ...
3892
3882
  class ProfitGoalBase:
3893
3883
  """
3894
3884
  盈利目标策略基类
@@ -5866,9 +5856,6 @@ class StockWeightList:
5866
5856
  @staticmethod
5867
5857
  def to_pandas(data):
5868
5858
  ...
5869
- @staticmethod
5870
- def to_pyarrow(data):
5871
- ...
5872
5859
  def __bool__(self) -> bool:
5873
5860
  """
5874
5861
  Check whether the list is nonempty
@@ -7080,9 +7067,6 @@ class TimeLineList:
7080
7067
  @staticmethod
7081
7068
  def to_pandas(data):
7082
7069
  ...
7083
- @staticmethod
7084
- def to_pyarrow(data):
7085
- ...
7086
7070
  def __bool__(self) -> bool:
7087
7071
  """
7088
7072
  Check whether the list is nonempty
@@ -8043,8 +8027,6 @@ class TradeRecordList:
8043
8027
  ...
8044
8028
  def to_pandas(self):
8045
8029
  ...
8046
- def to_pyarrow(self):
8047
- ...
8048
8030
  class TradeRequest:
8049
8031
  """
8050
8032
  交易请求记录。系统内部在实现延迟操作时登记的交易请求信息。暴露该结构的主要目的是用于
@@ -8131,9 +8113,6 @@ class TransList:
8131
8113
  @staticmethod
8132
8114
  def to_pandas(data):
8133
8115
  ...
8134
- @staticmethod
8135
- def to_pyarrow(data):
8136
- ...
8137
8116
  def __bool__(self) -> bool:
8138
8117
  """
8139
8118
  Check whether the list is nonempty
@@ -11457,6 +11436,48 @@ def SP_FixedValue(value: typing.SupportsFloat = 0.01) -> SlippageBase:
11457
11436
  :param float p: 偏移价格
11458
11437
  :return: 移滑价差算法实例
11459
11438
  """
11439
+ def SP_LogNormal(mean: typing.SupportsFloat = 0.0, stddev: typing.SupportsFloat = 0.05) -> SlippageBase:
11440
+ """
11441
+ SP_LogNormal([mean=0.0, stddev=0.05])
11442
+
11443
+ 对数正态分布随机价格移滑价差算法, 买入和卖出操作是价格在对数正态分布[mean, stddev]范围内的随机偏移
11444
+
11445
+ :param float mean: 对数正态分布的均值
11446
+ :param float stddev: 对数正态分布的标准差
11447
+ :return: 移滑价差算法实例
11448
+ """
11449
+ def SP_Normal(mean: typing.SupportsFloat = 0.0, stddev: typing.SupportsFloat = 0.05) -> SlippageBase:
11450
+ """
11451
+ SP_Normal([mean=0.0, stddev=0.05])
11452
+
11453
+ 正态分布随机价格移滑价差算法, 买入和卖出操作是价格在正态分布[mean, stddev]范围内的随机偏移
11454
+
11455
+ :param float mean: 正态分布的均值
11456
+ :param float stddev: 正态分布的标准差
11457
+ :return: 移滑价差算法实例
11458
+ """
11459
+ def SP_TruncNormal(mean: typing.SupportsFloat = 0.0, stddev: typing.SupportsFloat = 0.05, min_value: typing.SupportsFloat = -0.11, max_value: typing.SupportsFloat = 0.1) -> SlippageBase:
11460
+ """
11461
+ SP_TruncNormal([mean=0.0, stddev=0.05, min_value=-0.1, max_value=0.1])
11462
+
11463
+ 截断正态分布随机价格移滑价差算法, 买入和卖出操作是价格在截断正态分布[mean, stddev, min_value, max_value]范围内的随机偏移
11464
+
11465
+ :param float mean: 截断正态分布的均值
11466
+ :param float stddev: 截断正态分布的标准差
11467
+ :param float min_value: 最小截断值
11468
+ :param float max_value: 最大截断值
11469
+ :return: 移滑价差算法实例
11470
+ """
11471
+ def SP_Uniform(min_value: typing.SupportsFloat = -0.05, max_value: typing.SupportsFloat = 0.05) -> SlippageBase:
11472
+ """
11473
+ SP_Uniform([min_value=-0.05, max_value=0.05])
11474
+
11475
+ 均匀分布随机价格移滑价差算法, 买入和卖出操作是价格在[min_value, max_value]范围内的均匀分布随机偏移
11476
+
11477
+ :param float min_value: 最小偏移价格
11478
+ :param float max_value: 最大偏移价格
11479
+ :return: 移滑价差算法实例
11480
+ """
11460
11481
  @typing.overload
11461
11482
  def SQRT() -> Indicator:
11462
11483
  ...
@@ -14200,6 +14221,15 @@ def batch_calculate_inds(arg0: collections.abc.Sequence, arg1: KData) -> list:
14200
14221
  :return: 指标计算结果列表
14201
14222
  :rtype: list
14202
14223
  """
14224
+ def bind_email(arg0: str, arg1: str) -> None:
14225
+ """
14226
+ bind_email(email: str, code: str)
14227
+
14228
+ 绑定邮箱和授权码
14229
+
14230
+ :param str email: 邮箱地址
14231
+ :param str code: 授权码
14232
+ """
14203
14233
  def can_upgrade() -> bool:
14204
14234
  ...
14205
14235
  def close_ostream_to_python() -> None:
@@ -14260,10 +14290,6 @@ def dates_to_np(arg0: DatetimeList) -> numpy.ndarray:
14260
14290
  """
14261
14291
  将 DatetimeList 转换为 NumPy 元组
14262
14292
  """
14263
- def dates_to_pa(arg0: DatetimeList) -> typing.Any:
14264
- """
14265
- 将日期列表转换为 pyarrow.Table 对象
14266
- """
14267
14293
  def df_to_krecords(df: typing.Any, columns: collections.abc.Sequence[str] = ['datetime', 'open', 'high', 'low', 'close', 'amount', 'volume']) -> KRecordList:
14268
14294
  """
14269
14295
  df_to_krecords(df: pd.DataFrame[, columns: dict]) -> KRecordList
@@ -14277,7 +14303,7 @@ def df_to_krecords(df: typing.Any, columns: collections.abc.Sequence[str] = ['da
14277
14303
  def fetch_trial_license(arg0: str) -> str:
14278
14304
  """
14279
14305
  fetch_trial_license(email: str)
14280
-
14306
+
14281
14307
  获取试用授权码
14282
14308
 
14283
14309
  :param str email: 邮箱地址
@@ -14325,6 +14351,12 @@ def get_date_range(start: Datetime, end: Datetime) -> DatetimeList:
14325
14351
  :param Datetime end: 结束日期
14326
14352
  :rtype: DatetimeList
14327
14353
  """
14354
+ def get_expire_date() -> Datetime:
14355
+ """
14356
+ get_expire_date() -> Datetime
14357
+
14358
+ 查看授权到期时间
14359
+ """
14328
14360
  def get_funds_list(arg0: collections.abc.Sequence[TradeManager], arg1: DatetimeList) -> list[list[FundsRecord]]:
14329
14361
  """
14330
14362
  get_funds_list(tm_list: list, ref_dates: DatetimeList) -> list[Funds])
@@ -14336,37 +14368,6 @@ def get_funds_list(arg0: collections.abc.Sequence[TradeManager], arg1: DatetimeL
14336
14368
  :return: 账户资金列表
14337
14369
  """
14338
14370
  @typing.overload
14339
- def get_inds_view(stks: collections.abc.Sequence, inds: collections.abc.Sequence[Indicator], query: Query, market: str = 'SH') -> typing.Any:
14340
- ...
14341
- @typing.overload
14342
- 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:
14343
- """
14344
- get_inds_view(stks, inds, date[, cal_len=100, ktype=Query.DAY, market='SH']) -> pandas.DataFrame)
14345
-
14346
- 方式1: 获取指定日期的各证券的各指标结果
14347
-
14348
- :param stks: 证券列表
14349
- :param list[Indicator] inds: 指标列表
14350
- :param Datetime date: 指定日期
14351
- :param int cal_len: 计算需要的数据长度
14352
- :param str ktype: k线类型
14353
- :param str market: 指定行情市场(用于日期对齐)
14354
-
14355
- 方式2: 获取按指定Query查询计算的各证券的各指标结果, 结果中将包含指定 Query 包含的所有指定市场交易日日期
14356
- get_inds_view(stks, inds, query, market='SH'])
14357
-
14358
- :param stks: 指定证券列表
14359
- :param list[Indicator] inds: 指定指标列表
14360
- :param Query query: 查询条件
14361
- :param str market: 指定行情市场(用于日期对齐)
14362
- """
14363
- @typing.overload
14364
- def get_inds_view_pyarrow(stks: collections.abc.Sequence, inds: collections.abc.Sequence[Indicator], query: Query, market: str = 'SH') -> typing.Any:
14365
- ...
14366
- @typing.overload
14367
- 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:
14368
- ...
14369
- @typing.overload
14370
14371
  def get_kdata(arg0: str, arg1: Query) -> KData:
14371
14372
  ...
14372
14373
  @typing.overload
@@ -14397,23 +14398,6 @@ def get_log_level() -> LOG_LEVEL:
14397
14398
  """
14398
14399
  获取当前日志级别
14399
14400
  """
14400
- def get_market_view(stks: collections.abc.Sequence, date: Datetime = ..., market: str = 'SH') -> typing.Any:
14401
- """
14402
- get_market_view(stks[, date=Datetime(), market='SH']) -> pandas.DataFrame
14403
-
14404
- 获取指定股票集合在指定交易日的行情数据,不包含当日停牌无数据的股票。如未指定日期,则返回最后交易日行情数据,
14405
- 如同时接收了行情数据,则为实时行情。
14406
-
14407
- 注: 此函数依赖于日线数据
14408
-
14409
- :param list[Stock] stks: 股票列表
14410
- :param Datetime date: 获取指定日期的行情数据
14411
- :param str market: 市场代码
14412
- :return: 指定股票列表最后行情数据
14413
- :rtype: pandas.DataFrame
14414
- """
14415
- def get_market_view_pyarrow(stks: collections.abc.Sequence, date: Datetime = ..., market: str = 'SH') -> typing.Any:
14416
- ...
14417
14401
  def get_spot_from_buffer_server(arg0: str, arg1: str, arg2: str, arg3: Datetime) -> list[SpotRecord]:
14418
14402
  """
14419
14403
  get_spot_from_buffer_server(addr: str, market: str, code: str, datetime: str)
@@ -14500,10 +14484,6 @@ def krecords_to_df(arg0: KRecordList) -> typing.Any:
14500
14484
  ...
14501
14485
  def krecords_to_np(arg0: KRecordList) -> numpy.ndarray:
14502
14486
  ...
14503
- def krecords_to_pa(arg0: KRecordList) -> typing.Any:
14504
- """
14505
- 将KRecordList转换为parraw.Table
14506
- """
14507
14487
  def open_ostream_to_python() -> None:
14508
14488
  ...
14509
14489
  def open_spend_time() -> None:
@@ -14549,10 +14529,6 @@ def positions_to_np(arg0: PositionRecordList) -> numpy.ndarray:
14549
14529
 
14550
14530
  注意: 其中的当前市值、利润、盈亏等计算值均以日线计算, 如使用日线一下级别回测时, 对未清仓的持仓记录需要自行重新计算!
14551
14531
  """
14552
- def positions_to_pa(arg0: PositionRecordList) -> typing.Any:
14553
- """
14554
- 将交易记录列表转换为 pyarrow.Table 对象
14555
- """
14556
14532
  @typing.overload
14557
14533
  def register_extra_ktype(ktype: str, basetype: str, minutes: typing.SupportsInt, get_phase_end: collections.abc.Callable[[Datetime], Datetime]) -> None:
14558
14534
  ...
@@ -14596,7 +14572,7 @@ def release_extra_ktype() -> None:
14596
14572
  def remove_license() -> None:
14597
14573
  """
14598
14574
  remove_license()
14599
-
14575
+
14600
14576
  移除当前授权
14601
14577
  """
14602
14578
  @typing.overload
@@ -14737,10 +14713,6 @@ def timeline_to_np(arg0: TimeLineList) -> numpy.ndarray:
14737
14713
  """
14738
14714
  将分时线记录转换为NumPy元组
14739
14715
  """
14740
- def timeline_to_pa(arg0: TimeLineList) -> typing.Any:
14741
- """
14742
- 将分时线记录转换为 pyarrow.Table 对象
14743
- """
14744
14716
  def toPriceList(arg0: collections.abc.Sequence) -> list[float]:
14745
14717
  """
14746
14718
  将 python list/tuple/np.arry 对象转化为 PriceList 对象
@@ -14757,10 +14729,6 @@ def trades_to_df(arg0: TradeRecordList) -> typing.Any:
14757
14729
  """
14758
14730
  def trades_to_np(arg0: TradeRecordList) -> numpy.ndarray:
14759
14731
  ...
14760
- def trades_to_pa(arg0: TradeRecordList) -> typing.Any:
14761
- """
14762
- 将交易记录列表转换为 pyarrow.Table 对象
14763
- """
14764
14732
  def translist_to_df(arg0: TransList) -> typing.Any:
14765
14733
  """
14766
14734
  将分笔记录转换为 DataFrame
@@ -14769,10 +14737,6 @@ def translist_to_np(arg0: TransList) -> numpy.ndarray:
14769
14737
  """
14770
14738
  将分笔记录转换为NumPy元组
14771
14739
  """
14772
- def translist_to_pa(arg0: TransList) -> typing.Any:
14773
- """
14774
- 将分笔记录转换为 pyarrow.Table 对象
14775
- """
14776
14740
  def view_license() -> str:
14777
14741
  """
14778
14742
  view_license()
@@ -14783,10 +14747,6 @@ def weights_to_df(arg0: StockWeightList) -> typing.Any:
14783
14747
  ...
14784
14748
  def weights_to_np(arg0: StockWeightList) -> numpy.ndarray:
14785
14749
  ...
14786
- def weights_to_pa(arg0: StockWeightList) -> typing.Any:
14787
- """
14788
- 将权息记录列表转换为 pyarrow.Table 对象
14789
- """
14790
14750
  DEBUG: LOG_LEVEL # value = <LOG_LEVEL.DEBUG: 1>
14791
14751
  ERROR: LOG_LEVEL # value = <LOG_LEVEL.ERROR: 4>
14792
14752
  FATAL: LOG_LEVEL # value = <LOG_LEVEL.FATAL: 5>
hikyuu/cpp/hikyuu.dll CHANGED
Binary file
hikyuu/cpp/hikyuu.lib CHANGED
Binary file
hikyuu/cpp/sqlite3.dll CHANGED
Binary file
@@ -123,7 +123,7 @@ def save_block(stkcodes: list, filename: str):
123
123
  # hku_info(f"已保存至 {filename}")
124
124
 
125
125
 
126
- @hku_catch(ret={}, trace=False)
126
+ @hku_catch(trace=False)
127
127
  def down_em_all_hybk_info():
128
128
  """下载东财所有行业板块列表"""
129
129
  save_path = f'{_BLOCK_SAVE_PATH}/行业板块'
@@ -135,15 +135,22 @@ def down_em_all_hybk_info():
135
135
  for i, blk in enumerate(blk_list):
136
136
  filename = f"{save_path}/{blk[0]}_{blk[1]}.txt"
137
137
  if is_file_can_download(filename, 5 * 24 * 60 * 60):
138
- stk_codes = get_hybk_cons_code(blk[0])
139
- hku_info(f"{i+1}|{total} 获取行业板块{blk[1]}成分: {len(stk_codes)}")
138
+ try:
139
+ stk_codes = get_hybk_cons_code(blk[0])
140
+ hku_info(f"{i+1}|{total} 获取行业板块{blk[1]}成分: {len(stk_codes)}")
141
+ except (ConnectionError, ConnectionAbortedError, ConnectionResetError, ConnectionRefusedError) as e:
142
+ hku_error(f"ip 封禁! 请至东财官网首页拖动划窗解锁后重试!")
143
+ raise e
144
+ except Exception as e:
145
+ hku_warn(f"Failed! {type(e).__name__}: {str(e)}")
146
+ continue
140
147
  stk_codes = [modifiy_code(code) for code in stk_codes]
141
148
  stk_codes = [code for code in stk_codes if code is not None]
142
149
  save_block(stk_codes, filename)
143
150
  time.sleep(random.uniform(1, 3))
144
151
 
145
152
 
146
- @hku_catch(ret={}, trace=False)
153
+ @hku_catch(trace=False)
147
154
  def down_em_all_gnbk_info():
148
155
  """获取所有概念版本列表"""
149
156
  save_path = f'{_BLOCK_SAVE_PATH}/概念板块'
@@ -157,7 +164,13 @@ def down_em_all_gnbk_info():
157
164
  continue
158
165
  filename = f"{save_path}/{sanitize_filename(blk_name)}.txt"
159
166
  if is_file_can_download(filename, 30 * 24 * 60 * 60):
160
- stk_codes = stock_board_concept_cons_em(blk_name)
167
+ try:
168
+ stk_codes = stock_board_concept_cons_em(blk_name)
169
+ except (ConnectionError, ConnectionAbortedError, ConnectionResetError, ConnectionRefusedError) as e:
170
+ raise e
171
+ except Exception as e:
172
+ hku_warn(f"Failed! {type(e).__name__}: {str(e)}")
173
+ continue
161
174
  stk_codes = stk_codes['代码'].to_list()
162
175
  stk_codes = [modifiy_code(code) for code in stk_codes]
163
176
  stk_codes = [code for code in stk_codes if code is not None]
@@ -166,7 +179,7 @@ def down_em_all_gnbk_info():
166
179
  time.sleep(random.uniform(1, 3))
167
180
 
168
181
 
169
- @hku_catch(ret={}, trace=False)
182
+ @hku_catch(trace=False)
170
183
  def down_em_all_dybk_info():
171
184
  """获取所有地域板块列表"""
172
185
  save_path = f'{_BLOCK_SAVE_PATH}/地域板块'
@@ -196,26 +209,32 @@ def down_em_all_dybk_info():
196
209
  if not is_file_can_download(filename, 10 * 24 * 60 * 60):
197
210
  continue
198
211
 
199
- params["fs"] = f"b:{blk_code} f:!50"
200
- params["pn"] = 1
201
- time.sleep(random.uniform(1, 3))
202
- r = requests.get(url, params=params, timeout=15)
203
- data = r.json()
204
- if data["data"] is None:
205
- continue
206
-
207
- stk_json = r.json()
208
- stk_json = stk_json["data"]["diff"]
209
- stk_codes = []
210
-
211
- total_page = math.ceil(data["data"]["total"] / em_num_per_page)
212
- for page in range(2, total_page + 1):
213
- params["pn"] = page
212
+ try:
213
+ params["fs"] = f"b:{blk_code} f:!50"
214
+ params["pn"] = 1
215
+ time.sleep(random.uniform(1, 3))
214
216
  r = requests.get(url, params=params, timeout=15)
217
+ data = r.json()
218
+ if data["data"] is None:
219
+ continue
220
+
215
221
  stk_json = r.json()
216
222
  stk_json = stk_json["data"]["diff"]
217
- stk_codes.extend([f"{v['f12']}" for v in stk_json])
218
- time.sleep(random.uniform(1, 3))
223
+ stk_codes = []
224
+
225
+ total_page = math.ceil(data["data"]["total"] / em_num_per_page)
226
+ for page in range(2, total_page + 1):
227
+ params["pn"] = page
228
+ r = requests.get(url, params=params, timeout=15)
229
+ stk_json = r.json()
230
+ stk_json = stk_json["data"]["diff"]
231
+ stk_codes.extend([f"{v['f12']}" for v in stk_json])
232
+ time.sleep(random.uniform(1, 3))
233
+ except (ConnectionError, ConnectionAbortedError, ConnectionResetError, ConnectionRefusedError):
234
+ raise e
235
+ except Exception as e:
236
+ hku_warn(f"Failed! {type(e).__name__}: {str(e)}")
237
+ continue
219
238
 
220
239
  stk_codes = [modifiy_code(code) for code in stk_codes]
221
240
  stk_codes = [code for code in stk_codes if code is not None]
@@ -223,7 +242,7 @@ def down_em_all_dybk_info():
223
242
  hku_info(f'{i+1}|{total} 获取地域板块{blk_name}成分: {len(stk_codes)}')
224
243
 
225
244
 
226
- @hku_catch(ret={}, trace=False)
245
+ @hku_catch(trace=False)
227
246
  def download_all_zsbk_info():
228
247
  """获取所有指数成分股列表"""
229
248
  save_path = f'{_BLOCK_SAVE_PATH}/指数板块'
@@ -258,6 +277,7 @@ def download_all_zsbk_info():
258
277
  "000974", "000996", "000997", "000999", "399415", "399416"])
259
278
 
260
279
  failed_sina = 0
280
+ failed_csindex = 0
261
281
  blk_set = {}
262
282
  blk_codes = blk_info["index_code"]
263
283
  blk_names = blk_info["display_name"]
@@ -276,13 +296,17 @@ def download_all_zsbk_info():
276
296
 
277
297
  try:
278
298
  if blk_code[:3] == "399":
279
- if failed_sina >= 5:
299
+ if failed_sina > 10:
280
300
  continue
281
301
  stk_codes = ak.index_stock_cons(symbol=blk_code)
282
302
  stk_codes = stk_codes['品种代码'].to_list()
303
+ failed_sina = 0
283
304
  else:
305
+ if failed_csindex > 10:
306
+ continue
284
307
  stk_codes = ak.index_stock_cons_csindex(symbol=blk_code)
285
308
  stk_codes = stk_codes['成分券代码'].to_list()
309
+ failed_csindex = 0
286
310
 
287
311
  stk_codes = [modifiy_code(code) for code in stk_codes]
288
312
  stk_codes = [code for code in stk_codes if code is not None]
@@ -291,10 +315,19 @@ def download_all_zsbk_info():
291
315
  blk_set[blk_name] = 1
292
316
  except KeyboardInterrupt:
293
317
  break
318
+ except (ConnectionError, ConnectionAbortedError, ConnectionResetError, ConnectionRefusedError):
319
+ if blk_code[:3] == "399":
320
+ hku_warn("ConnectionError! Sina closed!")
321
+ failed_sina = 100
322
+ else:
323
+ hku_warn("ConnectionError! CSIndex closed!")
324
+ failed_csindex = 100
294
325
  except Exception as e:
295
- print(f"Failed! {i}, {blk_code}, {blk_name} {str(e)}")
296
- if blk_code.startswith("399"):
326
+ print(f"Failed! {i}, {blk_code}, {blk_name}! {type(e).__name__}: {str(e)}")
327
+ if blk_code[:3] == "399":
297
328
  failed_sina += 1
329
+ else:
330
+ failed_csindex += 1
298
331
  # raise e
299
332
  time.sleep(random.uniform(1, 3))
300
333
 
@@ -304,7 +337,7 @@ def download_block_info():
304
337
  # down_em_all_dybk_info()
305
338
  # down_em_all_gnbk_info()
306
339
  download_all_zsbk_info()
307
-
340
+
308
341
 
309
342
  if __name__ == "__main__":
310
343
  # down_em_all_hybk_info()
@@ -1,12 +1,12 @@
1
1
  from __future__ import annotations
2
- from hikyuu.cpp.core39 import ConditionBase
3
- from hikyuu.cpp.core39 import EnvironmentBase
4
- from hikyuu.cpp.core39 import Indicator
5
- from hikyuu.cpp.core39 import KData
6
- from hikyuu.cpp.core39 import Portfolio
7
- from hikyuu.cpp.core39 import SignalBase
8
- from hikyuu.cpp.core39 import System
9
- from hikyuu.cpp.core39 import TradeManager
2
+ from hikyuu.cpp.core310 import ConditionBase
3
+ from hikyuu.cpp.core310 import EnvironmentBase
4
+ from hikyuu.cpp.core310 import Indicator
5
+ from hikyuu.cpp.core310 import KData
6
+ from hikyuu.cpp.core310 import Portfolio
7
+ from hikyuu.cpp.core310 import SignalBase
8
+ from hikyuu.cpp.core310 import System
9
+ from hikyuu.cpp.core310 import TradeManager
10
10
  from hikyuu.draw.drawplot.bokeh_draw import ax_draw_macd as bk_ax_draw_macd
11
11
  from hikyuu.draw.drawplot.bokeh_draw import ax_draw_macd2 as bk_ax_draw_macd2
12
12
  from hikyuu.draw.drawplot.bokeh_draw import create_figure as bk_create_figure