Skip to content

Commit 59fbf23

Browse files
authored
fix position access error (#1267)
* fix position access error position is s sub attribute of _value error since commit(id:89972f6c6f9fa629b4f74093d4ba1e93c9f7a5e5) * lint with blank
1 parent 94e420f commit 59fbf23

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

qlib/contrib/report/analysis_position/parse_position.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def parse_position(position: dict = None) -> pd.DataFrame:
3939

4040
result_df = pd.DataFrame()
4141
for _trading_date, _value in position.items():
42+
_value = _value.position
4243
# pd_date type: pd.Timestamp
4344
_cash = _value.pop("cash")
4445
for _item in ["now_account_value"]:

0 commit comments

Comments
 (0)