38a07735faccfe4530860f1a967e195bc70b739c,QUANTAXIS/QAARP/QAAccount.py,QA_Account,daily_cash,#QA_Account#,654

Before Change


        "每日交易结算时的现金表"
        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
    def daily_hold(self):
        "每日交易结算时的持仓表"

After Change


        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_
            
    @property
    def daily_hold(self):
        "每日交易结算时的持仓表"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

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: QUANTAXIS/QUANTAXIS
Commit Name: 261c81df171eef85417c7cf1aaefb2955a1f1a8f
Time: 2018-09-23
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAARP/QAAccount.py
Class Name: QA_Account
Method Name: daily_hold


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 10ca2d031d39fb5ad1e9415c4027b14e56474fb3
Time: 2018-06-11
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAARP/QAAccount.py
Class Name: QA_Account
Method Name: hold_table