Commit 92f5f387 authored by pengxiong@wealthgrow.cn's avatar pengxiong@wealthgrow.cn

Merge branch 'dev' of http://47.100.44.39:10001/pengxiong/fund_report into dev

parents e799e713 33df3fe6
...@@ -379,16 +379,20 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor): ...@@ -379,16 +379,20 @@ class UserCustomerResultAdaptor(UserCustomerDataAdaptor):
return str(a) + "/" + str(b) return str(a) + "/" + str(b)
profit_df_cp = signal_fund_cum_weight.copy() profit_df_cp = signal_fund_cum_weight.copy()
profit_df_cp["date"] = profit_df_cp.index profit_df_cp["date"] = list(profit_df_cp.index)
grouped = profit_df_cp.groupby(profit_df_cp["date"].apply(year_month)) grouped = profit_df_cp.groupby(profit_df_cp["date"].apply(year_month))
month_signal_fund_cum = grouped.last().sort_values(by="date") month_signal_fund_cum = grouped.last()
del month_signal_fund_cum["date"] month_signal_fund_cum.rename(columns={"date": "datetime"}, inplace=True)
month_signal_fund_cum.sort_values(by="datetime", inplace=True)
del month_signal_fund_cum["datetime"]
p_cum_df = cum_return_ratio_df.copy() p_cum_df = cum_return_ratio_df.copy()
p_cum_df["date"] = p_cum_df.index p_cum_df["date"] = list(p_cum_df.index)
cum_grouped = p_cum_df.groupby(p_cum_df["date"].apply(year_month)) cum_grouped = p_cum_df.groupby(p_cum_df["date"].apply(year_month))
month_fund_cum = cum_grouped.last().sort_values(by="date") month_fund_cum = cum_grouped.last()
del month_fund_cum["date"] month_fund_cum.rename(columns={"date": "datetime"}, inplace=True)
month_fund_cum.sort_values(by="datetime", inplace=True)
del month_fund_cum["datetime"]
return cum_return_ratio_df, month_fund_cum, month_signal_fund_cum return cum_return_ratio_df, month_fund_cum, month_signal_fund_cum
......
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