def summary(self):
"""
This function is used to summary the result.
If you want calculate some other indicator, you can add them here.
:return:
"""
if self._analysis is not None:
self._analysis(self.asset_dict)
# for x in self.asset_dict:
# self.get_benchmark()
# asset_return = (self.asset_dict[x] - self._base_fund) / self._base_fund
# asset_return = asset_return.add_prefix(str(x) + "_")
# print asset_return
# result = pd.merge(asset_return, self._benchmark_data,
# left_index=True, right_index=True, how="inner")
# max_return = self.get_max_return(x, begin=self._begin_date, end=self._end_date)
# print max_return
# # print result
# # if self._analysis is not None:
# # self._analysis(result)
# # result.plot()
# # plt.show()
评论列表
文章目录