1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-15 16:56:54 +08:00

update handler & fix some bugs

This commit is contained in:
Young
2020-11-05 10:22:42 +00:00
parent 918a2b8a38
commit e37950d636
6 changed files with 78 additions and 33 deletions

View File

@@ -160,7 +160,7 @@ class Position:
def save_position(self, path, last_trade_date):
path = pathlib.Path(path)
p = copy.deepcopy(self.position)
cash = pd.Series()
cash = pd.Series(dtype=np.float)
cash["init_cash"] = self.init_cash
cash["cash"] = p["cash"]
cash["today_account_value"] = p["today_account_value"]