Commit 32a8212d authored by 赵杰's avatar 赵杰

继续修复上个bug的年化

parent 1d8be969
......@@ -56,6 +56,11 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
return_ratio_df, month_return_ratio_df, contribution_decomposition = self.combination_yield(resample_cur_folio_result_cnav_data,
fund_id_list)
resample_df = resample(return_ratio_df, self.trade_cal_date, freq_max)
if resample_df.index.values[-1] > self.end_date:
last = resample_df.index.values[-1]
resample_df["index_date"] = resample_df.index
resample_df.loc[last, "index_date"] = self.end_date
resample_df.set_index("index_date", inplace=True)
resample_df = resample_df[resample_df.index <= self.end_date]
......@@ -229,6 +234,11 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
resample_cur_folio_result_cnav_data = resample_cur_folio_result_cnav_data[resample_cur_folio_result_cnav_data.index <=self.end_date]
return_ratio_df, month_return_ratio_df, contribution_decomposition = self.combination_yield(resample_cur_folio_result_cnav_data, fund_id_list)
resample_df = resample(return_ratio_df, self.trade_cal_date, freq_max)
if resample_df.index.values[-1] > self.end_date:
last = resample_df.index.values[-1]
resample_df["index_date"] = resample_df.index
resample_df.loc[last, "index_date"] = self.end_date
resample_df.set_index("index_date", inplace=True)
resample_df = resample_df[resample_df.index <= self.end_date]
# 总成本
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment