Skip to content

Commit

Permalink
fix position access error (#1267)
Browse files Browse the repository at this point in the history
* fix position access error

position is s sub attribute of _value
error since commit(id:89972f6c6f9fa629b4f74093d4ba1e93c9f7a5e5)

* lint with blank
  • Loading branch information
lerit authored Nov 8, 2022
1 parent 94e420f commit 59fbf23
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions qlib/contrib/report/analysis_position/parse_position.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def parse_position(position: dict = None) -> pd.DataFrame:

result_df = pd.DataFrame()
for _trading_date, _value in position.items():
_value = _value.position
# pd_date type: pd.Timestamp
_cash = _value.pop("cash")
for _item in ["now_account_value"]:
Expand Down

0 comments on commit 59fbf23

Please sign in to comment.