Commit 3f339d08 authored by 李宗熹's avatar 李宗熹

修改objective

parent 68c1d166
...@@ -1121,7 +1121,7 @@ class PortfolioDiagnose(object): ...@@ -1121,7 +1121,7 @@ class PortfolioDiagnose(object):
result = [] result = []
for fund in self.portfolio: for fund in self.portfolio:
try: try:
result.append(self.single_evaluation(fund), objective) result.append(self.single_evaluation(fund, objective))
except IndexError: except IndexError:
continue continue
return result return result
...@@ -1155,14 +1155,14 @@ class PortfolioDiagnose(object): ...@@ -1155,14 +1155,14 @@ class PortfolioDiagnose(object):
return radar_data return radar_data
# portfolio = ['HF00002JJ2', 'HF00005DBQ', 'HF0000681Q', 'HF00006693', 'HF00006AZF', 'HF00006BGS'] portfolio = ['HF00002JJ2', 'HF00005DBQ', 'HF0000681Q', 'HF00006693', 'HF00006AZF', 'HF00006BGS']
# portfolio_diagnose = PortfolioDiagnose(client_type=1, portfolio=portfolio, invest_amount=10000000) portfolio_diagnose = PortfolioDiagnose(client_type=1, portfolio=portfolio, invest_amount=10000000)
# portfolio_diagnose.optimize() portfolio_diagnose.optimize()
# if __name__ == '__main__': if __name__ == '__main__':
# print(portfolio_diagnose.single_fund_radar()) print(portfolio_diagnose.single_fund_radar())
# print(portfolio_diagnose.propose_fund_radar()) print(portfolio_diagnose.propose_fund_radar())
# print(portfolio_diagnose.old_portfolio_evaluation()) print(portfolio_diagnose.old_portfolio_evaluation())
# print('旧组合相关性:', portfolio_diagnose.old_correlation) print('旧组合相关性:', portfolio_diagnose.old_correlation)
# print('新组合相关性:', portfolio_diagnose.new_correlation) print('新组合相关性:', portfolio_diagnose.new_correlation)
# print('旧组合个基评价:', portfolio_diagnose.old_portfolio_evaluation()) print('旧组合个基评价:', portfolio_diagnose.old_portfolio_evaluation())
# print('新组合个基评价:', portfolio_diagnose.propose_fund_evaluation()) print('新组合个基评价:', portfolio_diagnose.propose_fund_evaluation())
\ No newline at end of file \ No newline at end of file
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