Skip to content

Commit

Permalink
进度条阀值优化
Browse files Browse the repository at this point in the history
  • Loading branch information
bbfamily committed Aug 25, 2017
1 parent f8e0cb2 commit eec09ac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions abupy/TradeBu/ABuTradeExecute.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ def apply_action_to_capital(capital, action_pd, kl_pd_manager):
logging.info('apply_action_to_capital action_pd.empty!!!')
return

# 如果交易symbol数量 > 100个显示初始化进度条
init_show_progress = len(set(action_pd.symbol)) > 100
# 如果交易symbol数量 > 10000个显示初始化进度条
init_show_progress = len(set(action_pd.symbol)) > 10000
# 资金时间序列初始化各个symbol对应的持仓列,持仓价值列
capital.apply_init_kl(action_pd, show_progress=init_show_progress)

Expand All @@ -164,8 +164,8 @@ def apply_action_to_capital(capital, action_pd, kl_pd_manager):
action_pd['deal'] = action_pd.apply(capital.apply_action, axis=1,
args=(progress if show_apply_act_progress else None,))

# 如果交易symbol数量 > 100个显示apply进度条
show_apply_kl = len(set(action_pd.symbol)) > 100
# 如果交易symbol数量 > 1000个显示apply进度条
show_apply_kl = len(set(action_pd.symbol)) > 1000
# 根据交易行为产生的持仓列,持仓价值列更新资金时间序列
capital.apply_kl(action_pd, kl_pd_manager, show_progress=show_apply_kl)

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ abu能够帮助用户自动完善策略,主动分析策略产生的交易行
| 阿布量化交易系统 | abupy目录 |
| 阿布量化交易教程 | abupy_lecture目录 |
| 《量化交易之路》示例代码 | ipython/python目录|
| 《机器学习之路》及机器学习相关资料 | https://github.com/maxmon/abu_ml |
| 《机器学习之路》示例代码 | https://github.com/maxmon/abu_ml |

### 特点

Expand Down

0 comments on commit eec09ac

Please sign in to comment.