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
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):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
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: IBM/AIF360
Commit Name: 240d23ec41ee51c72a69fda93148cb534a6688ec
Time: 2020-08-05
Author: hoffman.sc@gmail.com
File Name: aif360/algorithms/inprocessing/meta_fair_classifier.py
Class Name: MetaFairClassifier
Method Name: fit
Project Name: yzhao062/pyod
Commit Name: 24d96c7ec2d80322ceb7a084199b891c9ebf88b9
Time: 2019-03-12
Author: yalmardeny@tssg,org
File Name: pyod/models/sod.py
Class Name: SOD
Method Name: _snn