Commit 06ecd2b6 authored by 李宗熹's avatar 李宗熹

修改异常

parent 2d9f3ed0
...@@ -752,7 +752,7 @@ class PortfolioDiagnose(object): ...@@ -752,7 +752,7 @@ class PortfolioDiagnose(object):
return ret return ret
def new_evaluation(self, group_name, group_result, data_adaptor): def new_evaluation(self, group_name, group_result, data_adaptor):
try:
group_result_data = group_result[group_name] group_result_data = group_result[group_name]
hold_info = group_result_data["group_hoding_info"] hold_info = group_result_data["group_hoding_info"]
hold_info_df = pd.DataFrame(hold_info) hold_info_df = pd.DataFrame(hold_info)
...@@ -908,6 +908,9 @@ class PortfolioDiagnose(object): ...@@ -908,6 +908,9 @@ class PortfolioDiagnose(object):
whole_sentence = ",".join(sentence).lstrip(",") + "。" whole_sentence = ",".join(sentence).lstrip(",") + "。"
return suggestions_result, suggestions_result_asset, return_compare_result, indicator_compare, whole_sentence return suggestions_result, suggestions_result_asset, return_compare_result, indicator_compare, whole_sentence
except Exception as e:
repr(e)
return None
def single_evaluation(self, fund_id): def single_evaluation(self, fund_id):
""" """
...@@ -1041,6 +1044,7 @@ class PortfolioDiagnose(object): ...@@ -1041,6 +1044,7 @@ class PortfolioDiagnose(object):
return evaluation_dict return evaluation_dict
def old_portfolio_evaluation(self, ): def old_portfolio_evaluation(self, ):
try:
result = [] result = []
for fund in self.portfolio: for fund in self.portfolio:
try: try:
...@@ -1048,12 +1052,21 @@ class PortfolioDiagnose(object): ...@@ -1048,12 +1052,21 @@ class PortfolioDiagnose(object):
except IndexError: except IndexError:
continue continue
return result return result
except Exception as e:
repr(e)
return None
def propose_fund_evaluation(self, ): def propose_fund_evaluation(self, ):
try:
result = [] result = []
for fund in self.proposal_fund: for fund in self.proposal_fund:
result.append(self.single_evaluation(fund)) result.append(self.single_evaluation(fund))
return result return result
except Exception as e:
repr(e)
return None
def single_fund_radar(self): def single_fund_radar(self):
radar_data = [] radar_data = []
......
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