import pandas as pd from rqalpha_backtest.Base import pickle_to_excel pickle_to_excel(pickle_path='combine_RSI_ma_slope.pkl') # dict = pd.read_pickle('bolling_bond.pkl') # print (dict) # import click # from rqalpha import cli # @cli.command() # @click.argument('result_pickle_file_path', type=click.Path(exists=True), required=True) # @click.option('--show/--hide', 'show', default=True) # @click.option('--plot-save', 'plot_save_file', default=None, type=click.Path(), help="save plot result to file") # def plot(result_pickle_file_path, show, plot_save_file): # """ # [sys_analyser] draw result DataFrame # """ # import pandas as pd from rqalpha.mod.rqalpha_mod_sys_analyser.plot import plot_result # result_dict = pd.read_pickle('combine_RSI_ma_slope.pkl') # pd.read_pickle('bolling_bond.pkl').plots.to_excel('C:\\Users\wilsonZhang\Desktop\\bolling_bond_plot.xlsx') # print (result_dict) # plot_result(result_dict)
config = { "base": { "data_bundle_path": "D:\\rqalpha\data_bundle\\bundle", "start_date": "2017-06-01", "end_date": "2019-06-10", "benchmark": "000300.XSHG", "accounts": { "stock": 10000000 } }, "extra": { "log_level": "verbose", }, "mod": { "sys_analyser": { "enabled": True, "plot": True, "output_file": "Portfolio_RSI.pkl" } } } # 您可以指定您要传递的参数 # run_func(init=init, before_trading=before_trading, handle_bar=handle_bar, config=config) # 如果你的函数命名是按照 API 规范来,则可以直接按照以下方式来运行 run_func(**globals()) from rqalpha_backtest.Base import pickle_to_excel pickle_to_excel(pickle_path='Portfolio_RSI.pkl')