hikyuu 2.5.6__py3-none-win_amd64.whl → 2.6.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 (72) hide show
  1. hikyuu/__init__.py +15 -0
  2. hikyuu/__init__.pyi +16 -7
  3. hikyuu/analysis/__init__.pyi +7 -0
  4. hikyuu/analysis/analysis.pyi +8 -1
  5. hikyuu/core.pyi +9 -2
  6. hikyuu/cpp/core310.pyd +0 -0
  7. hikyuu/cpp/core310.pyi +150 -19
  8. hikyuu/cpp/core311.pyd +0 -0
  9. hikyuu/cpp/core311.pyi +150 -19
  10. hikyuu/cpp/core312.pyd +0 -0
  11. hikyuu/cpp/core312.pyi +150 -19
  12. hikyuu/cpp/core313.pyd +0 -0
  13. hikyuu/cpp/core313.pyi +149 -19
  14. hikyuu/cpp/core39.pyd +0 -0
  15. hikyuu/cpp/core39.pyi +150 -19
  16. hikyuu/cpp/hikyuu.dll +0 -0
  17. hikyuu/cpp/hikyuu.lib +0 -0
  18. hikyuu/draw/drawplot/__init__.py +2 -0
  19. hikyuu/draw/drawplot/__init__.pyi +1 -0
  20. hikyuu/draw/drawplot/bokeh_draw.pyi +12 -4
  21. hikyuu/draw/drawplot/echarts_draw.pyi +12 -4
  22. hikyuu/draw/drawplot/matplotlib_draw.py +80 -0
  23. hikyuu/draw/drawplot/matplotlib_draw.pyi +22 -4
  24. hikyuu/examples/notebook/002-HowToGetStock.ipynb +1 -1
  25. hikyuu/examples/notebook/004-IndicatorOverview.ipynb +117 -52
  26. hikyuu/extend.pyi +9 -2
  27. hikyuu/gui/HikyuuTDX.py +19 -3
  28. hikyuu/gui/data/MainWindow.py +87 -24
  29. hikyuu/gui/dataserver.py +25 -0
  30. hikyuu/gui/images/star.png +0 -0
  31. hikyuu/hub.pyi +6 -6
  32. hikyuu/include/hikyuu/StockManager.h +23 -0
  33. hikyuu/include/hikyuu/global/agent/spot_generated.h +3 -3
  34. hikyuu/include/hikyuu/plugin/__init__.py +1 -0
  35. hikyuu/include/hikyuu/plugin/backtest.h +37 -0
  36. hikyuu/include/hikyuu/plugin/dataserver.h +18 -0
  37. hikyuu/include/hikyuu/plugin/device.h +29 -0
  38. hikyuu/include/hikyuu/plugin/interface/BackTestPluginInterface.h +26 -0
  39. hikyuu/include/hikyuu/plugin/interface/DataServerPluginInterface.h +23 -0
  40. hikyuu/include/hikyuu/plugin/interface/DevicePluginInterface.h +25 -0
  41. hikyuu/include/hikyuu/plugin/interface/__init__.py +1 -0
  42. hikyuu/include/hikyuu/plugin/interface/plugins.h +20 -0
  43. hikyuu/include/hikyuu/python/pybind_utils.h +8 -0
  44. hikyuu/include/hikyuu/strategy/BrokerTradeManager.h +2 -1
  45. hikyuu/include/hikyuu/strategy/RunPortfolioInStrategy.h +1 -0
  46. hikyuu/include/hikyuu/strategy/Strategy.h +96 -16
  47. hikyuu/include/hikyuu/trade_manage/TradeManagerBase.h +4 -2
  48. hikyuu/include/hikyuu/trade_sys/system/imp/WalkForwardTradeManager.h +3 -2
  49. hikyuu/include/hikyuu/utilities/plugin/PluginClient.h +2 -2
  50. hikyuu/include/hikyuu/utilities/plugin/PluginLoader.h +66 -13
  51. hikyuu/include/hikyuu/utilities/plugin/PluginManager.h +72 -0
  52. hikyuu/include/hikyuu/version.h +5 -5
  53. hikyuu/plugin/__init__.py +1 -0
  54. hikyuu/plugin/backtest.dll +0 -0
  55. hikyuu/plugin/dataserver.dll +0 -0
  56. hikyuu/plugin/device.dll +0 -0
  57. hikyuu/strategy/strategy_demo1.py +7 -8
  58. hikyuu/strategy/strategy_demo2.py +1 -1
  59. hikyuu/trade_manage/__init__.pyi +11 -3
  60. hikyuu/trade_manage/trade.pyi +11 -3
  61. hikyuu/util/__init__.pyi +1 -1
  62. hikyuu/util/singleton.pyi +1 -1
  63. {hikyuu-2.5.6.dist-info → hikyuu-2.6.0.dist-info}/METADATA +6 -2
  64. {hikyuu-2.5.6.dist-info → hikyuu-2.6.0.dist-info}/RECORD +69 -56
  65. {hikyuu-2.5.6.dist-info → hikyuu-2.6.0.dist-info}/entry_points.txt +1 -0
  66. {hikyuu-2.5.6.dist-info → hikyuu-2.6.0.dist-info}/top_level.txt +4 -0
  67. hikyuu/cpp/core38.pyd +0 -0
  68. hikyuu/cpp/core38.pyi +0 -13173
  69. hikyuu/examples/notebook/011-PyechartsDrawplot.ipynb +0 -21821
  70. /hikyuu/gui/{hikyuu_small.png → images/hikyuu_small.png} +0 -0
  71. {hikyuu-2.5.6.dist-info → hikyuu-2.6.0.dist-info}/LICENSE +0 -0
  72. {hikyuu-2.5.6.dist-info → hikyuu-2.6.0.dist-info}/WHEEL +0 -0
@@ -125,10 +125,10 @@ from hikyuu.cpp.core312 import KDataDriver
125
125
  from hikyuu.cpp.core312 import KRecord
126
126
  from hikyuu.cpp.core312 import KRecordList
127
127
  from hikyuu.cpp.core312 import LAST
128
- from hikyuu.cpp.core312 import LASTVALUE as CONST
129
128
  from hikyuu.cpp.core312 import LASTVALUE
130
- from hikyuu.cpp.core312 import LIUTONGPAN as CAPITAL
129
+ from hikyuu.cpp.core312 import LASTVALUE as CONST
131
130
  from hikyuu.cpp.core312 import LIUTONGPAN
131
+ from hikyuu.cpp.core312 import LIUTONGPAN as CAPITAL
132
132
  from hikyuu.cpp.core312 import LLV
133
133
  from hikyuu.cpp.core312 import LLVBARS
134
134
  from hikyuu.cpp.core312 import LN
@@ -456,6 +456,8 @@ from hikyuu.cpp.core312 import ZHBOND10
456
456
  from hikyuu.cpp.core312 import ZONGGUBEN
457
457
  from hikyuu.cpp.core312 import ZSCORE
458
458
  from hikyuu.cpp.core312 import __init__ as old_Query_init
459
+ from hikyuu.cpp.core312 import active_device
460
+ from hikyuu.cpp.core312 import backtest
459
461
  from hikyuu.cpp.core312 import batch_calculate_inds
460
462
  from hikyuu.cpp.core312 import can_upgrade
461
463
  from hikyuu.cpp.core312 import close_ostream_to_python
@@ -467,6 +469,7 @@ from hikyuu.cpp.core312 import crtSEOptimal
467
469
  from hikyuu.cpp.core312 import crtTM
468
470
  from hikyuu.cpp.core312 import crt_pf_strategy
469
471
  from hikyuu.cpp.core312 import crt_sys_strategy
472
+ from hikyuu.cpp.core312 import fetch_trial_license
470
473
  from hikyuu.cpp.core312 import find_optimal_system
471
474
  from hikyuu.cpp.core312 import find_optimal_system_multi
472
475
  from hikyuu.cpp.core312 import get_block
@@ -490,6 +493,7 @@ from hikyuu.cpp.core312 import isinf
490
493
  from hikyuu.cpp.core312 import isnan
491
494
  from hikyuu.cpp.core312 import open_ostream_to_python
492
495
  from hikyuu.cpp.core312 import open_spend_time
496
+ from hikyuu.cpp.core312 import remove_license
493
497
  from hikyuu.cpp.core312 import roundDown
494
498
  from hikyuu.cpp.core312 import roundEx
495
499
  from hikyuu.cpp.core312 import roundUp
@@ -497,9 +501,12 @@ from hikyuu.cpp.core312 import run_in_strategy
497
501
  from hikyuu.cpp.core312 import set_log_level
498
502
  from hikyuu.cpp.core312 import set_python_in_interactive
499
503
  from hikyuu.cpp.core312 import set_python_in_jupyter
504
+ from hikyuu.cpp.core312 import start_data_server
500
505
  from hikyuu.cpp.core312 import start_spot_agent
506
+ from hikyuu.cpp.core312 import stop_data_server
501
507
  from hikyuu.cpp.core312 import stop_spot_agent
502
508
  from hikyuu.cpp.core312 import toPriceList
509
+ from hikyuu.cpp.core312 import view_license
503
510
  from hikyuu.draw.drawplot.common import get_draw_title
504
511
  from hikyuu import extend
505
512
  from hikyuu.extend import DatetimeList_to_df
@@ -532,8 +539,8 @@ from hikyuu.hub import get_part_info
532
539
  from hikyuu.hub import get_part_list
533
540
  from hikyuu.hub import get_part_module
534
541
  from hikyuu.hub import get_part_name_list
535
- from hikyuu.hub import print_part_info
536
542
  from hikyuu.hub import print_part_info as help_part
543
+ from hikyuu.hub import print_part_info
537
544
  from hikyuu.hub import remove_hub
538
545
  from hikyuu.hub import search_part
539
546
  from hikyuu.hub import update_hub
@@ -609,6 +616,7 @@ import logging
609
616
  import numpy as np
610
617
  import os as os
611
618
  import pandas as pd
619
+ from pathlib import Path
612
620
  import pickle as pickle
613
621
  import pyecharts.charts.base
614
622
  from pyecharts.charts.base import Base as ChartBase
@@ -623,7 +631,7 @@ from pyecharts import options as opts
623
631
  import pyecharts.options.global_options
624
632
  import sys as sys
625
633
  import traceback as traceback
626
- __all__ = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', 'AF_FixedWeight', 'AF_FixedWeightList', 'AF_MultiFactor', 'ALIGN', 'AMA', 'AMO', 'ASIN', 'ATAN', 'ATR', 'AVEDEV', 'AllocateFundsBase', 'BACKSET', 'BARSCOUNT', 'BARSLAST', 'BARSSINCE', 'BARSSINCEN', 'BETWEEN', 'BLOCKSETNUM', 'BUSINESS', 'Bar', 'Block', 'BlockInfoDriver', 'BorrowRecord', 'BrokerPositionRecord', 'CAPITAL', 'CEILING', 'CLOSE', 'CN_Bool', 'CN_OPLine', 'CONST', 'CONTEXT', 'CONTEXT_K', 'CORR', 'COS', 'COST', 'COUNT', 'CROSS', 'CVAL', 'CYCLE', 'C_AMO', 'C_CLOSE', 'C_HIGH', 'C_KDATA', 'C_LOW', 'C_OPEN', 'C_VOL', 'ChartBase', 'ConditionBase', 'Constant', 'CostRecord', 'DATE', 'DAY', 'DEBUG', 'DECLINE', 'DEVSQ', 'DIFF', 'DIRECT', 'DISCARD', 'DMA', 'DOWNNDAY', 'DROPNA', 'DataDriverFactory', 'Datetime', 'DatetimeList', 'DatetimeList_to_df', 'DatetimeList_to_np', 'Datetime_date', 'Datetime_datetime', 'Days', 'EMA', 'ERROR', 'EVERY', 'EV_Bool', 'EV_TwoLine', 'EXIST', 'EXP', 'EasyTraderOrderBroker', 'EnvironmentBase', 'FATAL', 'FILTER', 'FINANCE', 'FLOOR', 'FundsRecord', 'Grid', 'HHV', 'HHVBARS', 'HIGH', 'HKUCheckError', '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', 'JsCode', 'KALMAN', 'KDATA', 'KDATA_PART', 'KDJ', 'KData', 'KDataDriver', 'KData_getitem', 'KData_iter', 'KData_to_df', 'KData_to_np', 'KRecord', 'KRecordList', 'Kline', 'LAST', 'LASTVALUE', 'LIUTONGPAN', 'LLV', 'LLVBARS', 'LN', 'LOG', 'LOG_LEVEL', 'LONGCROSS', 'LOW', 'Line', 'LoanRecord', 'LoggingContext', 'MA', 'MACD', 'MAX', 'MAXYEAR', 'MDD', 'MF_EqualWeight', 'MF_ICIRWeight', 'MF_ICWeight', 'MF_Weight', 'MIN', 'MINUTE', 'MINYEAR', 'MM_FixedCapital', 'MM_FixedCapitalFunds', 'MM_FixedCount', 'MM_FixedCountTps', 'MM_FixedPercent', 'MM_FixedRisk', 'MM_FixedUnits', 'MM_Nothing', 'MM_WilliamsFixedRisk', 'MOD', 'MONTH', 'MRR', 'MailOrderBroker', 'MarketInfo', 'Microseconds', 'Milliseconds', 'Minutes', 'MoneyManagerBase', 'MultiFactorBase', 'MultiLineTextChart', 'NDAY', 'NOT', 'OFF', 'OPEN', 'OrderBrokerBase', 'OrderBrokerWrap', 'PF_Simple', 'PF_WithoutAF', 'PG_FixedHoldDays', 'PG_FixedPercent', 'PG_NoGoal', 'POS', 'POW', 'PRICELIST', 'Page', 'Parameter', 'Parameter_items', 'Parameter_iter', 'Parameter_keys', 'Parameter_to_dict', 'Performance', 'Performance_to_df', 'Portfolio', 'PositionList_to_df', 'PositionList_to_np', 'PositionRecord', 'PositionRecordList', 'ProfitGoalBase', 'Query', 'RECOVER_BACKWARD', 'RECOVER_EQUAL_BACKWARD', 'RECOVER_EQUAL_FORWARD', 'RECOVER_FORWARD', 'REF', 'REPLACE', 'RESULT', 'REVERSE', 'ROC', 'ROCP', 'ROCR', 'ROCR100', 'ROUND', 'ROUNDDOWN', 'ROUNDUP', 'RSI', 'SAFTYLOSS', 'SE_Fixed', 'SE_MaxFundsOptimal', 'SE_MultiFactor', 'SE_PerformanceOptimal', 'SE_Signal', 'SGN', 'SG_Add', 'SG_AllwaysBuy', 'SG_And', 'SG_Band', 'SG_Bool', 'SG_Buy', 'SG_Cross', 'SG_CrossGold', 'SG_Cycle', 'SG_Div', 'SG_Flex', 'SG_Mul', 'SG_OneSide', 'SG_Or', 'SG_Sell', 'SG_Single', 'SG_Single2', 'SG_Sub', 'SIN', 'SLICE', 'SLOPE', 'SMA', 'SPEARMAN', 'SP_FixedPercent', 'SP_FixedValue', 'SQRT', 'STD', 'STDEV', 'STDP', 'ST_FixedPercent', 'ST_Indicator', 'ST_Saftyloss', 'SUM', 'SUMBARS', 'SYS_Simple', 'SYS_WalkForward', 'Scatter', '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', 'TestOrderBroker', 'TimeDelta', 'TimeDelta_timedelta', 'TimeLineList', 'TimeLineRecord', 'TimeLine_to_df', 'TimeLine_to_np', 'TradeCostBase', 'TradeList_to_df', 'TradeList_to_np', 'TradeManager', 'TradeRecord', 'TradeRecordList', 'TradeRequest', 'TransList', 'TransList_to_df', 'TransList_to_np', 'TransRecord', 'UPNDAY', 'UTC', 'VALUE', 'VAR', 'VARP', 'VIGOR', 'VOL', 'WARN', 'WEAVE', 'WEEK', 'WINNER', 'WMA', 'YEAR', 'ZHBOND10', 'ZONGGUBEN', 'ZSCORE', 'add_class_logger_handler', 'add_local_hub', 'add_remote_hub', 'analysis', 'analysis_sys_list', 'analysis_sys_list_multi', 'batch_calculate_inds', 'broker', 'broker_easytrader', 'broker_mail', 'build_hub', 'can_upgrade', 'capture_multiprocess_all_logger', 'class_logger', 'close_ostream_to_python', 'close_spend_time', 'combinate_ind', 'combinate_ind_analysis', 'combinate_ind_analysis_multi', 'combinate_index', 'concat_to_df', 'constant', 'core', 'cpp', 'crtAF', 'crtBrokerTM', 'crtCN', 'crtEV', 'crtMF', 'crtMM', 'crtOB', 'crtPG', 'crtSE', 'crtSEOptimal', 'crtSG', 'crtSP', 'crtST', 'crtTM', 'crt_pf_strategy', 'crt_sys_strategy', 'date', 'datetime', 'df_to_ind', 'extend', 'find_optimal_system', 'find_optimal_system_multi', 'get_block', 'get_business_name', 'get_current_hub', 'get_data_from_buffer_server', 'get_date_range', 'get_draw_title', 'get_hub_name_list', 'get_hub_path', 'get_kdata', 'get_last_version', 'get_log_level', 'get_part', 'get_part_info', 'get_part_list', 'get_part_module', 'get_part_name_list', 'get_series_name', 'get_stock', 'get_system_part_enum', 'get_system_part_name', 'get_version', 'get_version_git', 'get_version_with_build', 'grid_pos', 'help_part', 'hikyuu_init', 'hku_catch', 'hku_check', 'hku_check_ignore', 'hku_check_throw', 'hku_debug', 'hku_debug_if', 'hku_error', 'hku_error_if', 'hku_fatal', 'hku_fatal_if', 'hku_info', 'hku_info_if', 'hku_logger', 'hku_to_async', 'hku_trace', 'hku_trace_if', 'hku_warn', 'hku_warn_if', 'hub', 'ibar', 'in_interactive_session', 'in_ipython_frontend', 'indicator', 'indicator_getitem', 'indicator_iter', 'indicator_to_df', 'inner_analysis_sys_list', 'inner_combinate_ind_analysis', 'inner_combinate_ind_analysis_with_block', 'iplot', 'isinf', 'isnan', 'kplot', 'kplot_line', 'list_getitem', 'new_Query_init', 'np', 'old_Query_init', 'open_ostream_to_python', 'open_spend_time', 'opts', 'os', 'part_clone', 'part_init', 'part_iter', 'pd', 'pickle', 'print_part_info', 'pyind', 'remove_hub', 'roundDown', 'roundEx', 'roundUp', 'run_in_strategy', 'search_part', 'set_log_level', 'set_my_logger_file', 'set_python_in_interactive', 'set_python_in_jupyter', 'simple_datetime_list', 'spend_time', 'start_spot_agent', 'stop_spot_agent', 'sys', 'sys_performance', 'sysplot', 'talib_wrap', 'time', 'timedelta', 'timeout', 'timezone', 'toPriceList', 'traceback', 'trade', 'trade_manage', 'trade_sys', 'tzinfo', 'update_hub', 'util', 'volume_barplot', 'with_trace', 'wraps']
634
+ __all__ = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', 'AF_FixedWeight', 'AF_FixedWeightList', 'AF_MultiFactor', 'ALIGN', 'AMA', 'AMO', 'ASIN', 'ATAN', 'ATR', 'AVEDEV', 'AllocateFundsBase', 'BACKSET', 'BARSCOUNT', 'BARSLAST', 'BARSSINCE', 'BARSSINCEN', 'BETWEEN', 'BLOCKSETNUM', 'BUSINESS', 'Bar', 'Block', 'BlockInfoDriver', 'BorrowRecord', 'BrokerPositionRecord', 'CAPITAL', 'CEILING', 'CLOSE', 'CN_Bool', 'CN_OPLine', 'CONST', 'CONTEXT', 'CONTEXT_K', 'CORR', 'COS', 'COST', 'COUNT', 'CROSS', 'CVAL', 'CYCLE', 'C_AMO', 'C_CLOSE', 'C_HIGH', 'C_KDATA', 'C_LOW', 'C_OPEN', 'C_VOL', 'ChartBase', 'ConditionBase', 'Constant', 'CostRecord', 'DATE', 'DAY', 'DEBUG', 'DECLINE', 'DEVSQ', 'DIFF', 'DIRECT', 'DISCARD', 'DMA', 'DOWNNDAY', 'DROPNA', 'DataDriverFactory', 'Datetime', 'DatetimeList', 'DatetimeList_to_df', 'DatetimeList_to_np', 'Datetime_date', 'Datetime_datetime', 'Days', 'EMA', 'ERROR', 'EVERY', 'EV_Bool', 'EV_TwoLine', 'EXIST', 'EXP', 'EasyTraderOrderBroker', 'EnvironmentBase', 'FATAL', 'FILTER', 'FINANCE', 'FLOOR', 'FundsRecord', 'Grid', 'HHV', 'HHVBARS', 'HIGH', 'HKUCheckError', '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', 'JsCode', 'KALMAN', 'KDATA', 'KDATA_PART', 'KDJ', 'KData', 'KDataDriver', 'KData_getitem', 'KData_iter', 'KData_to_df', 'KData_to_np', 'KRecord', 'KRecordList', 'Kline', 'LAST', 'LASTVALUE', 'LIUTONGPAN', 'LLV', 'LLVBARS', 'LN', 'LOG', 'LOG_LEVEL', 'LONGCROSS', 'LOW', 'Line', 'LoanRecord', 'LoggingContext', 'MA', 'MACD', 'MAX', 'MAXYEAR', 'MDD', 'MF_EqualWeight', 'MF_ICIRWeight', 'MF_ICWeight', 'MF_Weight', 'MIN', 'MINUTE', 'MINYEAR', 'MM_FixedCapital', 'MM_FixedCapitalFunds', 'MM_FixedCount', 'MM_FixedCountTps', 'MM_FixedPercent', 'MM_FixedRisk', 'MM_FixedUnits', 'MM_Nothing', 'MM_WilliamsFixedRisk', 'MOD', 'MONTH', 'MRR', 'MailOrderBroker', 'MarketInfo', 'Microseconds', 'Milliseconds', 'Minutes', 'MoneyManagerBase', 'MultiFactorBase', 'MultiLineTextChart', 'NDAY', 'NOT', 'OFF', 'OPEN', 'OrderBrokerBase', 'OrderBrokerWrap', 'PF_Simple', 'PF_WithoutAF', 'PG_FixedHoldDays', 'PG_FixedPercent', 'PG_NoGoal', 'POS', 'POW', 'PRICELIST', 'Page', 'Parameter', 'Parameter_items', 'Parameter_iter', 'Parameter_keys', 'Parameter_to_dict', 'Path', 'Performance', 'Performance_to_df', 'Portfolio', 'PositionList_to_df', 'PositionList_to_np', 'PositionRecord', 'PositionRecordList', 'ProfitGoalBase', 'Query', 'RECOVER_BACKWARD', 'RECOVER_EQUAL_BACKWARD', 'RECOVER_EQUAL_FORWARD', 'RECOVER_FORWARD', 'REF', 'REPLACE', 'RESULT', 'REVERSE', 'ROC', 'ROCP', 'ROCR', 'ROCR100', 'ROUND', 'ROUNDDOWN', 'ROUNDUP', 'RSI', 'SAFTYLOSS', 'SE_Fixed', 'SE_MaxFundsOptimal', 'SE_MultiFactor', 'SE_PerformanceOptimal', 'SE_Signal', 'SGN', 'SG_Add', 'SG_AllwaysBuy', 'SG_And', 'SG_Band', 'SG_Bool', 'SG_Buy', 'SG_Cross', 'SG_CrossGold', 'SG_Cycle', 'SG_Div', 'SG_Flex', 'SG_Mul', 'SG_OneSide', 'SG_Or', 'SG_Sell', 'SG_Single', 'SG_Single2', 'SG_Sub', 'SIN', 'SLICE', 'SLOPE', 'SMA', 'SPEARMAN', 'SP_FixedPercent', 'SP_FixedValue', 'SQRT', 'STD', 'STDEV', 'STDP', 'ST_FixedPercent', 'ST_Indicator', 'ST_Saftyloss', 'SUM', 'SUMBARS', 'SYS_Simple', 'SYS_WalkForward', 'Scatter', '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', 'TestOrderBroker', 'TimeDelta', 'TimeDelta_timedelta', 'TimeLineList', 'TimeLineRecord', 'TimeLine_to_df', 'TimeLine_to_np', 'TradeCostBase', 'TradeList_to_df', 'TradeList_to_np', 'TradeManager', 'TradeRecord', 'TradeRecordList', 'TradeRequest', 'TransList', 'TransList_to_df', 'TransList_to_np', 'TransRecord', 'UPNDAY', 'UTC', 'VALUE', 'VAR', 'VARP', 'VIGOR', 'VOL', 'WARN', 'WEAVE', 'WEEK', 'WINNER', 'WMA', 'YEAR', 'ZHBOND10', 'ZONGGUBEN', 'ZSCORE', 'active_device', 'add_class_logger_handler', 'add_local_hub', 'add_remote_hub', 'analysis', 'analysis_sys_list', 'analysis_sys_list_multi', 'backtest', 'batch_calculate_inds', 'broker', 'broker_easytrader', 'broker_mail', 'build_hub', 'can_upgrade', 'capture_multiprocess_all_logger', 'class_logger', 'close_ostream_to_python', 'close_spend_time', 'combinate_ind', 'combinate_ind_analysis', 'combinate_ind_analysis_multi', 'combinate_index', 'concat_to_df', 'constant', 'core', 'cpp', 'crtAF', 'crtBrokerTM', 'crtCN', 'crtEV', 'crtMF', 'crtMM', 'crtOB', 'crtPG', 'crtSE', 'crtSEOptimal', 'crtSG', 'crtSP', 'crtST', 'crtTM', 'crt_pf_strategy', 'crt_sys_strategy', 'date', 'datetime', 'df_to_ind', 'extend', 'fetch_trial_license', 'find_optimal_system', 'find_optimal_system_multi', 'get_block', 'get_business_name', 'get_current_hub', 'get_data_from_buffer_server', 'get_date_range', 'get_draw_title', 'get_hub_name_list', 'get_hub_path', 'get_kdata', 'get_last_version', 'get_log_level', 'get_part', 'get_part_info', 'get_part_list', 'get_part_module', 'get_part_name_list', 'get_series_name', 'get_stock', 'get_system_part_enum', 'get_system_part_name', 'get_version', 'get_version_git', 'get_version_with_build', 'grid_pos', 'help_part', 'hikyuu_init', 'hku_catch', 'hku_check', 'hku_check_ignore', 'hku_check_throw', 'hku_debug', 'hku_debug_if', 'hku_error', 'hku_error_if', 'hku_fatal', 'hku_fatal_if', 'hku_info', 'hku_info_if', 'hku_logger', 'hku_to_async', 'hku_trace', 'hku_trace_if', 'hku_warn', 'hku_warn_if', 'hub', 'ibar', 'in_interactive_session', 'in_ipython_frontend', 'indicator', 'indicator_getitem', 'indicator_iter', 'indicator_to_df', 'inner_analysis_sys_list', 'inner_combinate_ind_analysis', 'inner_combinate_ind_analysis_with_block', 'iplot', 'isinf', 'isnan', 'kplot', 'kplot_line', 'list_getitem', 'new_Query_init', 'np', 'old_Query_init', 'open_ostream_to_python', 'open_spend_time', 'opts', 'os', 'part_clone', 'part_init', 'part_iter', 'pd', 'pickle', 'print_part_info', 'pyind', 'remove_hub', 'remove_license', 'roundDown', 'roundEx', 'roundUp', 'run_in_strategy', 'search_part', 'set_log_level', 'set_my_logger_file', 'set_python_in_interactive', 'set_python_in_jupyter', 'simple_datetime_list', 'spend_time', 'start_data_server', 'start_spot_agent', 'stop_data_server', 'stop_spot_agent', 'sys', 'sys_performance', 'sysplot', 'talib_wrap', 'time', 'timedelta', 'timeout', 'timezone', 'toPriceList', 'traceback', 'trade', 'trade_manage', 'trade_sys', 'tzinfo', 'update_hub', 'util', 'view_license', 'volume_barplot', 'with_trace', 'wraps']
627
635
  class MultiLineTextChart(pyecharts.charts.base.Base):
628
636
  def __init__(self, init_opts: pyecharts.options.global_options.InitOpts = ...):
629
637
  ...
@@ -823,6 +823,86 @@ def sysplot(sys, new=True, axes=None, style=1, only_draw_close=False):
823
823
  )
824
824
 
825
825
 
826
+ def tm_performance(tm: TradeManager, query: Query, ref_stk: Stock = None):
827
+ """
828
+ 绘制系统绩效,即账户累积收益率曲线
829
+
830
+ :param SystemBase | PortfolioBase sys: SYS或PF实例
831
+ :param Stock ref_stk: 参考股票, 默认为沪深300: sh000300, 绘制参考标的的收益曲线
832
+ :return: None
833
+ """
834
+ if ref_stk is None:
835
+ ref_stk = get_stock('sh000300')
836
+
837
+ sh000001_k = get_kdata('sh000001', query)
838
+ ref_dates = sh000001_k.get_datetime_list()
839
+
840
+ ref_k = ref_stk.get_kdata(query)
841
+
842
+ funds_list = tm.get_funds_list(ref_dates)
843
+ funds = [f.total_assets for f in funds_list]
844
+ funds = VALUE(funds)
845
+ funds_return = [f.total_assets / f.total_base if f.total_base != 0.0 else constant.null_price for f in funds_list]
846
+ funds_return = VALUE(funds_return, align_dates=ref_dates)
847
+ funds_return.name = "系统累积收益率"
848
+ ref_return = ALIGN(ROCR(ref_k.close, 0), ref_dates)
849
+ ref_return.name = f"{ref_stk.name}({ref_stk.market_code})"
850
+
851
+ per = Performance()
852
+ text = per.report(tm, sh000001_k[-1].datetime)
853
+
854
+ # 计算最大回撤
855
+ max_pullback = min(MDD(funds).to_np())
856
+
857
+ # 计算 sharp
858
+ bond = ZHBOND10(ref_dates)
859
+ sigma = STDEV(ROCP(funds), len(ref_dates))
860
+ sigma = 15.874507866387544 * sigma[-1] # 15.874 = sqrt(252)
861
+ sharp = (per['帐户平均年收益率%'] - bond[-1]) * 0.01 / sigma if sigma != 0.0 else 0.0
862
+
863
+ invest_total = per['累计投入本金'] + per['累计投入资产']
864
+ cur_fund = per['当前总资产']
865
+ t1 = '投入总资产: {:<.2f} 当前总资产: {:<.2f} 当前盈利: {:<.2f}'.format(
866
+ invest_total, cur_fund, cur_fund - invest_total)
867
+ t2 = '当前策略收益: {:<.2f}% 年化收益率: {:<.2f}% 最大回撤: {:<.2f}%'.format(
868
+ funds_return[-1]*100 - 100, per["帐户平均年收益率%"], max_pullback)
869
+ t3 = '系统胜率: {:<.2f}% 盈/亏比: 1 : {:<.2f} 夏普比率: {:<.2f}'.format(
870
+ per['赢利交易比例%'], per['净赢利/亏损比例'], sharp)
871
+
872
+ import matplotlib.pyplot as plt
873
+ fg = plt.figure(figsize=(15, 10))
874
+ gs = fg.add_gridspec(5, 4)
875
+ ax1 = fg.add_subplot(gs[:4, :3])
876
+ ax2 = fg.add_subplot(gs[:, 3:])
877
+ ax3 = fg.add_subplot(gs[4:, :3])
878
+ ref_return.plot(axes=ax1, legend_on=True)
879
+ funds_return.plot(axes=ax1, legend_on=True)
880
+ ax1.set_title(f"账户({tm.name}) 累积收益率")
881
+ label = t1 + '\n\n' + t2 + '\n\n' + t3
882
+ ax2.text(0,
883
+ 1,
884
+ text,
885
+ horizontalalignment='left',
886
+ verticalalignment='top',
887
+ transform=ax2.transAxes,
888
+ # color='r'
889
+ )
890
+ ax3.text(0.02,
891
+ 0.9,
892
+ label,
893
+ horizontalalignment='left',
894
+ verticalalignment='top',
895
+ transform=ax3.transAxes,
896
+ # color='r'
897
+ )
898
+ ax2.xaxis.set_visible(False)
899
+ ax2.yaxis.set_visible(False)
900
+ ax2.set_frame_on(False)
901
+ ax3.xaxis.set_visible(False)
902
+ ax3.yaxis.set_visible(False)
903
+ ax3.set_frame_on(False)
904
+
905
+
826
906
  def sys_performance(sys, ref_stk=None):
827
907
  """
828
908
  绘制系统绩效,即账户累积收益率曲线
@@ -128,10 +128,10 @@ from hikyuu.cpp.core312 import KDataDriver
128
128
  from hikyuu.cpp.core312 import KRecord
129
129
  from hikyuu.cpp.core312 import KRecordList
130
130
  from hikyuu.cpp.core312 import LAST
131
- from hikyuu.cpp.core312 import LASTVALUE as CONST
132
131
  from hikyuu.cpp.core312 import LASTVALUE
133
- from hikyuu.cpp.core312 import LIUTONGPAN as CAPITAL
132
+ from hikyuu.cpp.core312 import LASTVALUE as CONST
134
133
  from hikyuu.cpp.core312 import LIUTONGPAN
134
+ from hikyuu.cpp.core312 import LIUTONGPAN as CAPITAL
135
135
  from hikyuu.cpp.core312 import LLV
136
136
  from hikyuu.cpp.core312 import LLVBARS
137
137
  from hikyuu.cpp.core312 import LN
@@ -459,6 +459,8 @@ from hikyuu.cpp.core312 import ZHBOND10
459
459
  from hikyuu.cpp.core312 import ZONGGUBEN
460
460
  from hikyuu.cpp.core312 import ZSCORE
461
461
  from hikyuu.cpp.core312 import __init__ as old_Query_init
462
+ from hikyuu.cpp.core312 import active_device
463
+ from hikyuu.cpp.core312 import backtest
462
464
  from hikyuu.cpp.core312 import batch_calculate_inds
463
465
  from hikyuu.cpp.core312 import can_upgrade
464
466
  from hikyuu.cpp.core312 import close_ostream_to_python
@@ -470,6 +472,7 @@ from hikyuu.cpp.core312 import crtSEOptimal
470
472
  from hikyuu.cpp.core312 import crtTM
471
473
  from hikyuu.cpp.core312 import crt_pf_strategy
472
474
  from hikyuu.cpp.core312 import crt_sys_strategy
475
+ from hikyuu.cpp.core312 import fetch_trial_license
473
476
  from hikyuu.cpp.core312 import find_optimal_system
474
477
  from hikyuu.cpp.core312 import find_optimal_system_multi
475
478
  from hikyuu.cpp.core312 import get_block
@@ -493,6 +496,7 @@ from hikyuu.cpp.core312 import isinf
493
496
  from hikyuu.cpp.core312 import isnan
494
497
  from hikyuu.cpp.core312 import open_ostream_to_python
495
498
  from hikyuu.cpp.core312 import open_spend_time
499
+ from hikyuu.cpp.core312 import remove_license
496
500
  from hikyuu.cpp.core312 import roundDown
497
501
  from hikyuu.cpp.core312 import roundEx
498
502
  from hikyuu.cpp.core312 import roundUp
@@ -500,9 +504,12 @@ from hikyuu.cpp.core312 import run_in_strategy
500
504
  from hikyuu.cpp.core312 import set_log_level
501
505
  from hikyuu.cpp.core312 import set_python_in_interactive
502
506
  from hikyuu.cpp.core312 import set_python_in_jupyter
507
+ from hikyuu.cpp.core312 import start_data_server
503
508
  from hikyuu.cpp.core312 import start_spot_agent
509
+ from hikyuu.cpp.core312 import stop_data_server
504
510
  from hikyuu.cpp.core312 import stop_spot_agent
505
511
  from hikyuu.cpp.core312 import toPriceList
512
+ from hikyuu.cpp.core312 import view_license
506
513
  from hikyuu.draw.drawplot.common import get_draw_title
507
514
  from hikyuu import extend
508
515
  from hikyuu.extend import DatetimeList_to_df
@@ -535,8 +542,8 @@ from hikyuu.hub import get_part_info
535
542
  from hikyuu.hub import get_part_list
536
543
  from hikyuu.hub import get_part_module
537
544
  from hikyuu.hub import get_part_name_list
538
- from hikyuu.hub import print_part_info
539
545
  from hikyuu.hub import print_part_info as help_part
546
+ from hikyuu.hub import print_part_info
540
547
  from hikyuu.hub import remove_hub
541
548
  from hikyuu.hub import search_part
542
549
  from hikyuu.hub import update_hub
@@ -626,11 +633,12 @@ from matplotlib.ticker import FuncFormatter
626
633
  import numpy as np
627
634
  import os as os
628
635
  import pandas as pd
636
+ from pathlib import Path
629
637
  import pickle as pickle
630
638
  import seaborn as sns
631
639
  import sys as sys
632
640
  import traceback as traceback
633
- __all__ = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', 'AF_FixedWeight', 'AF_FixedWeightList', 'AF_MultiFactor', 'ALIGN', 'AMA', 'AMO', 'ASIN', 'ATAN', 'ATR', 'AVEDEV', 'AllocateFundsBase', 'BACKSET', 'BARSCOUNT', 'BARSLAST', 'BARSSINCE', 'BARSSINCEN', 'BETWEEN', 'BLOCKSETNUM', 'BUSINESS', 'Block', 'BlockInfoDriver', 'BorrowRecord', 'BrokerPositionRecord', 'CAPITAL', 'CEILING', 'CLOSE', 'CN_Bool', 'CN_OPLine', 'CONST', 'CONTEXT', 'CONTEXT_K', 'CORR', 'COS', 'COST', 'COUNT', 'CROSS', 'CVAL', 'CYCLE', 'C_AMO', 'C_CLOSE', 'C_HIGH', 'C_KDATA', 'C_LOW', 'C_OPEN', 'C_VOL', 'ConditionBase', 'Constant', 'CostRecord', 'DATE', 'DAY', 'DEBUG', 'DECLINE', 'DEVSQ', 'DIFF', 'DIRECT', 'DISCARD', 'DMA', 'DOWNNDAY', 'DRAWBAND', 'DRAWBMP', 'DRAWICON', 'DRAWIMG', 'DRAWLINE', 'DRAWNULL', 'DRAWNUMBER', 'DRAWNUMBER_FIX', 'DRAWRECTREL', 'DRAWSL', 'DRAWTEXT', 'DRAWTEXT_FIX', 'DROPNA', 'DataDriverFactory', 'Datetime', 'DatetimeList', 'DatetimeList_to_df', 'DatetimeList_to_np', 'Datetime_date', 'Datetime_datetime', 'Days', 'EMA', 'ERROR', 'EVERY', 'EV_Bool', 'EV_TwoLine', 'EXIST', 'EXP', 'EasyTraderOrderBroker', 'EnvironmentBase', 'FATAL', 'FILTER', 'FINANCE', 'FLOOR', 'FixedLocator', 'FontManager', 'FuncFormatter', 'FundsRecord', 'HHV', 'HHVBARS', 'HIGH', 'HKUCheckError', 'HKUException', 'HOUR', 'HSL', 'Hours', 'IC', 'ICIR', 'ICON_PATH', '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', 'KDATA_PART', 'KDJ', 'KData', 'KDataDriver', 'KData_getitem', 'KData_iter', 'KData_to_df', 'KData_to_np', 'KRecord', 'KRecordList', 'LAST', 'LASTVALUE', 'LIUTONGPAN', 'LLV', 'LLVBARS', 'LN', 'LOG', 'LOG_LEVEL', 'LONGCROSS', 'LOW', 'Line2D', 'LoanRecord', 'LoggingContext', 'MA', 'MACD', 'MAX', 'MAXYEAR', 'MDD', 'MF_EqualWeight', 'MF_ICIRWeight', 'MF_ICWeight', 'MF_Weight', 'MIN', 'MINUTE', 'MINYEAR', 'MM_FixedCapital', 'MM_FixedCapitalFunds', 'MM_FixedCount', 'MM_FixedCountTps', 'MM_FixedPercent', 'MM_FixedRisk', 'MM_FixedUnits', 'MM_Nothing', 'MM_WilliamsFixedRisk', 'MOD', 'MONTH', 'MRR', 'MailOrderBroker', 'MarketInfo', 'Microseconds', 'Milliseconds', 'Minutes', 'MoneyManagerBase', 'MultiFactorBase', 'NDAY', 'NOT', 'OFF', 'OPEN', 'OrderBrokerBase', 'OrderBrokerWrap', 'PF_Simple', 'PF_WithoutAF', 'PG_FixedHoldDays', 'PG_FixedPercent', 'PG_NoGoal', 'PLOYLINE', 'POS', 'POW', 'PRICELIST', 'Parameter', 'Parameter_items', 'Parameter_iter', 'Parameter_keys', 'Parameter_to_dict', 'Performance', 'Performance_to_df', 'Portfolio', 'PositionList_to_df', 'PositionList_to_np', 'PositionRecord', 'PositionRecordList', 'ProfitGoalBase', 'Query', 'RECOVER_BACKWARD', 'RECOVER_EQUAL_BACKWARD', 'RECOVER_EQUAL_FORWARD', 'RECOVER_FORWARD', 'REF', 'REPLACE', 'RESULT', 'REVERSE', 'RGB', 'ROC', 'ROCP', 'ROCR', 'ROCR100', 'ROUND', 'ROUNDDOWN', 'ROUNDUP', 'RSI', 'Rectangle', 'SAFTYLOSS', 'SE_Fixed', 'SE_MaxFundsOptimal', 'SE_MultiFactor', 'SE_PerformanceOptimal', 'SE_Signal', 'SGN', 'SG_Add', 'SG_AllwaysBuy', 'SG_And', 'SG_Band', 'SG_Bool', 'SG_Buy', 'SG_Cross', 'SG_CrossGold', 'SG_Cycle', 'SG_Div', 'SG_Flex', 'SG_Mul', 'SG_OneSide', 'SG_Or', 'SG_Sell', 'SG_Single', 'SG_Single2', 'SG_Sub', 'SHOWICONS', 'SIN', 'SLICE', 'SLOPE', 'SMA', 'SPEARMAN', 'SP_FixedPercent', 'SP_FixedValue', 'SQRT', 'STD', 'STDEV', 'STDP', 'STICKLINE', 'ST_FixedPercent', 'ST_Indicator', 'ST_Saftyloss', 'SUM', 'SUMBARS', 'SYS_Simple', 'SYS_WalkForward', 'ScoreRecord', 'ScoreRecordList', 'Seconds', 'SelectorBase', 'SignalBase', 'SlippageBase', 'SpotRecord', 'Stock', 'StockFuncFormatter', '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', 'TICKLEFT', 'TICKRIGHT', 'TIME', 'TIMELINE', 'TIMELINEVOL', 'TR', 'TRACE', 'TURNOVER', 'TestOrderBroker', 'TimeDelta', 'TimeDelta_timedelta', 'TimeLineList', 'TimeLineRecord', 'TimeLine_to_df', 'TimeLine_to_np', 'TradeCostBase', 'TradeList_to_df', 'TradeList_to_np', 'TradeManager', 'TradeRecord', 'TradeRecordList', 'TradeRequest', 'TransList', 'TransList_to_df', 'TransList_to_np', 'TransRecord', 'UPNDAY', 'UTC', 'VALUE', 'VAR', 'VARP', 'VIGOR', 'VOL', 'WARN', 'WEAVE', 'WEEK', 'WINNER', 'WMA', 'YEAR', 'ZHBOND10', 'ZONGGUBEN', 'ZSCORE', 'add_class_logger_handler', 'add_local_hub', 'add_remote_hub', 'adjust_axes_show', 'analysis', 'analysis_sys_list', 'analysis_sys_list_multi', 'ax_draw_macd', 'ax_draw_macd2', 'ax_set_locator_formatter', 'axes', 'batch_calculate_inds', 'broker', 'broker_easytrader', 'broker_mail', 'build_hub', 'can_upgrade', 'capture_multiprocess_all_logger', 'class_logger', 'close_ostream_to_python', 'close_spend_time', 'cnplot', 'combinate_ind', 'combinate_ind_analysis', 'combinate_ind_analysis_multi', 'combinate_index', 'concat_to_df', 'constant', 'core', 'cpp', 'create_figure', 'create_four_axes_figure', 'create_one_axes_figure', 'create_three_axes_figure', 'create_two_axes_figure', 'crtAF', 'crtBrokerTM', 'crtCN', 'crtEV', 'crtMF', 'crtMM', 'crtOB', 'crtPG', 'crtSE', 'crtSEOptimal', 'crtSG', 'crtSP', 'crtST', 'crtTM', 'crt_pf_strategy', 'crt_sys_strategy', 'date', 'datetime', 'df_to_ind', 'draw', 'evplot', 'extend', 'figure', 'find_optimal_system', 'find_optimal_system_multi', 'fm_logger', 'gca', 'gcf', 'getDayLocatorAndFormatter', 'getMinLocatorAndFormatter', 'get_block', 'get_business_name', 'get_current_hub', 'get_data_from_buffer_server', 'get_date_range', 'get_draw_title', 'get_hub_name_list', 'get_hub_path', 'get_kdata', 'get_last_version', 'get_log_level', 'get_part', 'get_part_info', 'get_part_list', 'get_part_module', 'get_part_name_list', 'get_stock', 'get_system_part_enum', 'get_system_part_name', 'get_version', 'get_version_git', 'get_version_with_build', 'help_part', 'hikyuu_init', 'hku_catch', 'hku_check', 'hku_check_ignore', 'hku_check_throw', 'hku_debug', 'hku_debug_if', 'hku_error', 'hku_error_if', 'hku_fatal', 'hku_fatal_if', 'hku_info', 'hku_info_if', 'hku_logger', 'hku_to_async', 'hku_trace', 'hku_trace_if', 'hku_warn', 'hku_warn_if', 'hub', 'ibar', 'iheatmap', 'imread', 'in_interactive_session', 'in_ipython_frontend', 'indicator', 'indicator_getitem', 'indicator_iter', 'indicator_to_df', 'inner_analysis_sys_list', 'inner_combinate_ind_analysis', 'inner_combinate_ind_analysis_with_block', 'iplot', 'isinf', 'isnan', 'kplot', 'list_getitem', 'logging', 'math', 'matplotlib', 'mkplot', 'new_Query_init', 'np', 'old_Query_init', 'open_ostream_to_python', 'open_spend_time', 'os', 'part_clone', 'part_init', 'part_iter', 'pd', 'pickle', 'print_part_info', 'pyind', 'rcParams', 'remove_hub', 'roundDown', 'roundEx', 'roundUp', 'run_in_strategy', 'search_part', 'set_log_level', 'set_mpl_params', 'set_my_logger_file', 'set_python_in_interactive', 'set_python_in_jupyter', 'sgplot', 'sns', 'spend_time', 'start_spot_agent', 'stop_spot_agent', 'sys', 'sys_heatmap', 'sys_performance', 'sysplot', 'talib_wrap', 'time', 'timedelta', 'timeout', 'timezone', 'tm_heatmap', 'toPriceList', 'traceback', 'trade', 'trade_manage', 'trade_sys', 'tzinfo', 'update_hub', 'util', 'with_trace', 'ylabel']
641
+ __all__ = ['ABS', 'ACOS', 'AD', 'ADVANCE', 'AF_EqualWeight', 'AF_FixedWeight', 'AF_FixedWeightList', 'AF_MultiFactor', 'ALIGN', 'AMA', 'AMO', 'ASIN', 'ATAN', 'ATR', 'AVEDEV', 'AllocateFundsBase', 'BACKSET', 'BARSCOUNT', 'BARSLAST', 'BARSSINCE', 'BARSSINCEN', 'BETWEEN', 'BLOCKSETNUM', 'BUSINESS', 'Block', 'BlockInfoDriver', 'BorrowRecord', 'BrokerPositionRecord', 'CAPITAL', 'CEILING', 'CLOSE', 'CN_Bool', 'CN_OPLine', 'CONST', 'CONTEXT', 'CONTEXT_K', 'CORR', 'COS', 'COST', 'COUNT', 'CROSS', 'CVAL', 'CYCLE', 'C_AMO', 'C_CLOSE', 'C_HIGH', 'C_KDATA', 'C_LOW', 'C_OPEN', 'C_VOL', 'ConditionBase', 'Constant', 'CostRecord', 'DATE', 'DAY', 'DEBUG', 'DECLINE', 'DEVSQ', 'DIFF', 'DIRECT', 'DISCARD', 'DMA', 'DOWNNDAY', 'DRAWBAND', 'DRAWBMP', 'DRAWICON', 'DRAWIMG', 'DRAWLINE', 'DRAWNULL', 'DRAWNUMBER', 'DRAWNUMBER_FIX', 'DRAWRECTREL', 'DRAWSL', 'DRAWTEXT', 'DRAWTEXT_FIX', 'DROPNA', 'DataDriverFactory', 'Datetime', 'DatetimeList', 'DatetimeList_to_df', 'DatetimeList_to_np', 'Datetime_date', 'Datetime_datetime', 'Days', 'EMA', 'ERROR', 'EVERY', 'EV_Bool', 'EV_TwoLine', 'EXIST', 'EXP', 'EasyTraderOrderBroker', 'EnvironmentBase', 'FATAL', 'FILTER', 'FINANCE', 'FLOOR', 'FixedLocator', 'FontManager', 'FuncFormatter', 'FundsRecord', 'HHV', 'HHVBARS', 'HIGH', 'HKUCheckError', 'HKUException', 'HOUR', 'HSL', 'Hours', 'IC', 'ICIR', 'ICON_PATH', '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', 'KDATA_PART', 'KDJ', 'KData', 'KDataDriver', 'KData_getitem', 'KData_iter', 'KData_to_df', 'KData_to_np', 'KRecord', 'KRecordList', 'LAST', 'LASTVALUE', 'LIUTONGPAN', 'LLV', 'LLVBARS', 'LN', 'LOG', 'LOG_LEVEL', 'LONGCROSS', 'LOW', 'Line2D', 'LoanRecord', 'LoggingContext', 'MA', 'MACD', 'MAX', 'MAXYEAR', 'MDD', 'MF_EqualWeight', 'MF_ICIRWeight', 'MF_ICWeight', 'MF_Weight', 'MIN', 'MINUTE', 'MINYEAR', 'MM_FixedCapital', 'MM_FixedCapitalFunds', 'MM_FixedCount', 'MM_FixedCountTps', 'MM_FixedPercent', 'MM_FixedRisk', 'MM_FixedUnits', 'MM_Nothing', 'MM_WilliamsFixedRisk', 'MOD', 'MONTH', 'MRR', 'MailOrderBroker', 'MarketInfo', 'Microseconds', 'Milliseconds', 'Minutes', 'MoneyManagerBase', 'MultiFactorBase', 'NDAY', 'NOT', 'OFF', 'OPEN', 'OrderBrokerBase', 'OrderBrokerWrap', 'PF_Simple', 'PF_WithoutAF', 'PG_FixedHoldDays', 'PG_FixedPercent', 'PG_NoGoal', 'PLOYLINE', 'POS', 'POW', 'PRICELIST', 'Parameter', 'Parameter_items', 'Parameter_iter', 'Parameter_keys', 'Parameter_to_dict', 'Path', 'Performance', 'Performance_to_df', 'Portfolio', 'PositionList_to_df', 'PositionList_to_np', 'PositionRecord', 'PositionRecordList', 'ProfitGoalBase', 'Query', 'RECOVER_BACKWARD', 'RECOVER_EQUAL_BACKWARD', 'RECOVER_EQUAL_FORWARD', 'RECOVER_FORWARD', 'REF', 'REPLACE', 'RESULT', 'REVERSE', 'RGB', 'ROC', 'ROCP', 'ROCR', 'ROCR100', 'ROUND', 'ROUNDDOWN', 'ROUNDUP', 'RSI', 'Rectangle', 'SAFTYLOSS', 'SE_Fixed', 'SE_MaxFundsOptimal', 'SE_MultiFactor', 'SE_PerformanceOptimal', 'SE_Signal', 'SGN', 'SG_Add', 'SG_AllwaysBuy', 'SG_And', 'SG_Band', 'SG_Bool', 'SG_Buy', 'SG_Cross', 'SG_CrossGold', 'SG_Cycle', 'SG_Div', 'SG_Flex', 'SG_Mul', 'SG_OneSide', 'SG_Or', 'SG_Sell', 'SG_Single', 'SG_Single2', 'SG_Sub', 'SHOWICONS', 'SIN', 'SLICE', 'SLOPE', 'SMA', 'SPEARMAN', 'SP_FixedPercent', 'SP_FixedValue', 'SQRT', 'STD', 'STDEV', 'STDP', 'STICKLINE', 'ST_FixedPercent', 'ST_Indicator', 'ST_Saftyloss', 'SUM', 'SUMBARS', 'SYS_Simple', 'SYS_WalkForward', 'ScoreRecord', 'ScoreRecordList', 'Seconds', 'SelectorBase', 'SignalBase', 'SlippageBase', 'SpotRecord', 'Stock', 'StockFuncFormatter', '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', 'TICKLEFT', 'TICKRIGHT', 'TIME', 'TIMELINE', 'TIMELINEVOL', 'TR', 'TRACE', 'TURNOVER', 'TestOrderBroker', 'TimeDelta', 'TimeDelta_timedelta', 'TimeLineList', 'TimeLineRecord', 'TimeLine_to_df', 'TimeLine_to_np', 'TradeCostBase', 'TradeList_to_df', 'TradeList_to_np', 'TradeManager', 'TradeRecord', 'TradeRecordList', 'TradeRequest', 'TransList', 'TransList_to_df', 'TransList_to_np', 'TransRecord', 'UPNDAY', 'UTC', 'VALUE', 'VAR', 'VARP', 'VIGOR', 'VOL', 'WARN', 'WEAVE', 'WEEK', 'WINNER', 'WMA', 'YEAR', 'ZHBOND10', 'ZONGGUBEN', 'ZSCORE', 'active_device', 'add_class_logger_handler', 'add_local_hub', 'add_remote_hub', 'adjust_axes_show', 'analysis', 'analysis_sys_list', 'analysis_sys_list_multi', 'ax_draw_macd', 'ax_draw_macd2', 'ax_set_locator_formatter', 'axes', 'backtest', 'batch_calculate_inds', 'broker', 'broker_easytrader', 'broker_mail', 'build_hub', 'can_upgrade', 'capture_multiprocess_all_logger', 'class_logger', 'close_ostream_to_python', 'close_spend_time', 'cnplot', 'combinate_ind', 'combinate_ind_analysis', 'combinate_ind_analysis_multi', 'combinate_index', 'concat_to_df', 'constant', 'core', 'cpp', 'create_figure', 'create_four_axes_figure', 'create_one_axes_figure', 'create_three_axes_figure', 'create_two_axes_figure', 'crtAF', 'crtBrokerTM', 'crtCN', 'crtEV', 'crtMF', 'crtMM', 'crtOB', 'crtPG', 'crtSE', 'crtSEOptimal', 'crtSG', 'crtSP', 'crtST', 'crtTM', 'crt_pf_strategy', 'crt_sys_strategy', 'date', 'datetime', 'df_to_ind', 'draw', 'evplot', 'extend', 'fetch_trial_license', 'figure', 'find_optimal_system', 'find_optimal_system_multi', 'fm_logger', 'gca', 'gcf', 'getDayLocatorAndFormatter', 'getMinLocatorAndFormatter', 'get_block', 'get_business_name', 'get_current_hub', 'get_data_from_buffer_server', 'get_date_range', 'get_draw_title', 'get_hub_name_list', 'get_hub_path', 'get_kdata', 'get_last_version', 'get_log_level', 'get_part', 'get_part_info', 'get_part_list', 'get_part_module', 'get_part_name_list', 'get_stock', 'get_system_part_enum', 'get_system_part_name', 'get_version', 'get_version_git', 'get_version_with_build', 'help_part', 'hikyuu_init', 'hku_catch', 'hku_check', 'hku_check_ignore', 'hku_check_throw', 'hku_debug', 'hku_debug_if', 'hku_error', 'hku_error_if', 'hku_fatal', 'hku_fatal_if', 'hku_info', 'hku_info_if', 'hku_logger', 'hku_to_async', 'hku_trace', 'hku_trace_if', 'hku_warn', 'hku_warn_if', 'hub', 'ibar', 'iheatmap', 'imread', 'in_interactive_session', 'in_ipython_frontend', 'indicator', 'indicator_getitem', 'indicator_iter', 'indicator_to_df', 'inner_analysis_sys_list', 'inner_combinate_ind_analysis', 'inner_combinate_ind_analysis_with_block', 'iplot', 'isinf', 'isnan', 'kplot', 'list_getitem', 'logging', 'math', 'matplotlib', 'mkplot', 'new_Query_init', 'np', 'old_Query_init', 'open_ostream_to_python', 'open_spend_time', 'os', 'part_clone', 'part_init', 'part_iter', 'pd', 'pickle', 'print_part_info', 'pyind', 'rcParams', 'remove_hub', 'remove_license', 'roundDown', 'roundEx', 'roundUp', 'run_in_strategy', 'search_part', 'set_log_level', 'set_mpl_params', 'set_my_logger_file', 'set_python_in_interactive', 'set_python_in_jupyter', 'sgplot', 'sns', 'spend_time', 'start_data_server', 'start_spot_agent', 'stop_data_server', 'stop_spot_agent', 'sys', 'sys_heatmap', 'sys_performance', 'sysplot', 'talib_wrap', 'time', 'timedelta', 'timeout', 'timezone', 'tm_heatmap', 'tm_performance', 'toPriceList', 'traceback', 'trade', 'trade_manage', 'trade_sys', 'tzinfo', 'update_hub', 'util', 'view_license', 'with_trace', 'ylabel']
634
642
  class StockFuncFormatter:
635
643
  """
636
644
  用于坐标轴显示日期
@@ -1134,6 +1142,16 @@ def tm_heatmap(tm, start_date, end_date = None, axes = None):
1134
1142
  :param axes: 绘制的轴对象,默认为None,表示创建新的轴对象
1135
1143
  :return: None
1136
1144
 
1145
+ """
1146
+ def tm_performance(tm: hikyuu.cpp.core312.TradeManager, query: hikyuu.cpp.core312.Query, ref_stk: hikyuu.cpp.core312.Stock = None):
1147
+ """
1148
+
1149
+ 绘制系统绩效,即账户累积收益率曲线
1150
+
1151
+ :param SystemBase | PortfolioBase sys: SYS或PF实例
1152
+ :param Stock ref_stk: 参考股票, 默认为沪深300: sh000300, 绘制参考标的的收益曲线
1153
+ :return: None
1154
+
1137
1155
  """
1138
1156
  AMO: hikyuu.cpp.core312.Indicator # value = Indicator{...
1139
1157
  CLOSE: hikyuu.cpp.core312.Indicator # value = Indicator{...
@@ -257,7 +257,7 @@
257
257
  "name": "python",
258
258
  "nbconvert_exporter": "python",
259
259
  "pygments_lexer": "ipython3",
260
- "version": "3.11.7"
260
+ "version": "3.12.7"
261
261
  }
262
262
  },
263
263
  "nbformat": 4,