New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stock_position字段property提示,portfolio字段向前兼容 #100

Closed
handsomu opened this Issue Apr 21, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@handsomu
Contributor

handsomu commented Apr 21, 2017

stock_position有以下变更,应当在调用该property的时候打出warning,提示该字段已失效。

  • total_orders
  • total_trades
  • sold_quantity
  • sold_value
  • bought_quantity
  • bought_value

portfolio有以下变更需要注意

  • 加入pnl字段,计算逻辑为 (unit_net_value - 1) * units。调用时提示该字段deprecate
  • 加入starting_cash字段,值为units。在调用该property时候打出warning,提示该字段已失效,返回units字段
  • 加入frozen_cash字段,数值为下属account的frozen_cash加总。调用时候提示该字段deprecate。

stock_account, future_account为了与stock_portfolio, future_portfolio兼容,加入以下字段:

  • portfolio_value,该字段与total_value值一致。如果调用,提示该字段deprecate,使用total_value代替
  • pnl, daily_pnl, daily_returns, total_returns, starting_cash全部返回0,提示abandon停止使用
  • daily_holding_pnl, daily_realized_pnl分别重定向至holding_pnl, realized_pnl
@wh1100717

This comment has been minimized.

Member

wh1100717 commented Apr 26, 2017

已实现

@wh1100717 wh1100717 closed this Apr 26, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment