38a07735faccfe4530860f1a967e195bc70b739c,QUANTAXIS/QAARP/QAAccount.py,QA_Account,daily_cash,#QA_Account#,654
Before Change
def daily_cash(self):
"每日交易结算时的现金表"
res = self.cash_table.drop_duplicates(subset="date", keep="last")
res_=pd.concat([res.set_index("date"), pd.Series(data=None, index=pd.to_datetime(self.trade_range).set_names("date"), name="predrop")], axis=1).ffill()
return res_.fillna(self.init_cash).drop(["predrop","datetime","account_cookie"], axis=1).reset_index().set_index(["date"],drop=False).sort_index()
@property
After Change
def daily_cash(self):
"每日交易结算时的现金表"
res = self.cash_table.drop_duplicates(subset="date", keep="last")
le=pd.DataFrame(pd.Series(data=None, index=pd.to_datetime(self.trade_range_max).set_names("date"), name="predrop"))
ri=res.set_index("date")
res_=pd.merge(le,ri,how="left",left_index=True,right_index=True)
res_=res_.ffill().fillna(self.init_cash).drop(["predrop","datetime","account_cookie"], axis=1).reset_index().set_index(["date"],drop=False).sort_index()
res_=res_[res_.index.isin(self.trade_range)]
return res_
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 38a07735faccfe4530860f1a967e195bc70b739c
Time: 2019-04-01
Author: 40067351+zsl3034669@users.noreply.github.com
File Name: QUANTAXIS/QAARP/QAAccount.py
Class Name: QA_Account
Method Name: daily_cash
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 38a07735faccfe4530860f1a967e195bc70b739c
Time: 2019-04-01
Author: 40067351+zsl3034669@users.noreply.github.com
File Name: QUANTAXIS/QAARP/QAAccount.py
Class Name: QA_Account
Method Name: daily_hold
Project Name: bashtage/linearmodels
Commit Name: b4a0bacd5954d39e58e48bdba71d46cf3a777c07
Time: 2017-04-11
Author: kevin.k.sheppard@gmail.com
File Name: experiment.py
Class Name:
Method Name: