本文整理匯總了Python中mewp.simulate.report.Report.get_avg_max_draw_down方法的典型用法代碼示例。如果您正苦於以下問題:Python Report.get_avg_max_draw_down方法的具體用法?Python Report.get_avg_max_draw_down怎麽用?Python Report.get_avg_max_draw_down使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類mewp.simulate.report.Report
的用法示例。
在下文中一共展示了Report.get_avg_max_draw_down方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: run_simulation
# 需要導入模塊: from mewp.simulate.report import Report [as 別名]
# 或者: from mewp.simulate.report.Report import get_avg_max_draw_down [as 別名]
def run_simulation(p):
runner.run(algo_param={'rolling': p[0], 'bollinger': p[1], 'stop_win': p[2]})
report = Report(runner)
runner._algo.tracker.order_winning_ratio()
pnl = float(report.get_final_pnl())
final_return = float(report.get_final_return())
sharpe_ratio = float(report.get_sharpie_ratio())
avg_draw_down = float(report.get_avg_max_draw_down())
max_draw_down = float(report.get_max_max_draw_down()[0])
order_winning_ratio = float(runner._algo.tracker.order_winning_ratio())
waiting_time = float(runner._algo.tracker.analyze_all_waiting()[0])
avg_profit = float(runner._algo.tracker.analyze_all_profit()[0])
num_orders = int(runner._algo.tracker.analyze_all_profit()[2])
return pnl, final_return, sharpe_ratio, avg_draw_down, max_draw_down, \
order_winning_ratio, waiting_time, avg_profit, num_orders