Commit ac64e3d0 authored by pengxiong's avatar pengxiong

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

parents be101748 06ecd2b6
......@@ -648,9 +648,9 @@ class PortfolioDiagnose(object):
def old_evaluation(self, group_name, group_result, data_adaptor):
start_year = data_adaptor.start_date.year
start_month = data_adaptor.start_date.month
current_year = datetime.datetime.now().year
current_month = datetime.datetime.now().month
current_day = datetime.datetime.now().day
current_year = data_adaptor.end_date.year
current_month = data_adaptor.end_date.month
current_day = data_adaptor.end_date.day
past_month = (current_year - start_year) * 12 + current_month - start_month
# 投入成本(万元)
......@@ -755,7 +755,7 @@ class PortfolioDiagnose(object):
return ret
def new_evaluation(self, group_name, group_result, data_adaptor):
try:
group_result_data = group_result[group_name]
hold_info = group_result_data["group_hoding_info"]
hold_info_df = pd.DataFrame(hold_info)
......@@ -911,6 +911,9 @@ class PortfolioDiagnose(object):
whole_sentence = ",".join(sentence).lstrip(",") + "。"
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):
"""
......@@ -1044,6 +1047,7 @@ class PortfolioDiagnose(object):
return evaluation_dict
def old_portfolio_evaluation(self, ):
try:
result = []
for fund in self.portfolio:
try:
......@@ -1051,12 +1055,21 @@ class PortfolioDiagnose(object):
except IndexError:
continue
return result
except Exception as e:
repr(e)
return None
def propose_fund_evaluation(self, ):
try:
result = []
for fund in self.proposal_fund:
result.append(self.single_evaluation(fund))
return result
except Exception as e:
repr(e)
return None
def single_fund_radar(self):
radar_data = []
......
......@@ -1559,21 +1559,21 @@
<th>基金简称</th>
<th>买入时间</th>
<th>存续年数</th>
<th>投资本金 (万元</th>
<th>当月收益</th>
<th>当月收益率</th>
<th>月末市值 (万元</th>
<th>月末占比</th>
<th>累计收益</th>
<th>累计收益率</th>
<th>年化收益率</th>
<th>投资本金 (万元)</th>
<th>当月收益 (万元)</th>
<th>当月收益率 (%)</th>
<th>月末市值 (万元)</th>
<th>月末占比 (%)</th>
<th>累计收益 (万元)</th>
<th>累计收益率 (%)</th>
<th>年化收益率 (%)</th>
</tr>
{% for one in group_hoding_info %}
<tr>
<td rowspan="1">{{one.fund_strategy_name}}</td>
<td>{{one.fund_name}}</td>
<td class="text_red">{{one.confirm_date}}</td>
<td class="text_green">{{one.hold_year}}</td>
<td>{{one.confirm_date}}</td>
<td>{{one.hold_year}}</td>
<td>{{one.cost}}</td>
<td>{{one.profit}}</td>
<td>{{one.month_return_ratio}}</td>
......@@ -1590,7 +1590,7 @@
<td>{{group_hoding_info_total["cur_month_profit"]}}</td>
<td>{{group_hoding_info_total["cur_month_profit_ratio"]}}</td>
<td>{{group_hoding_info_total["ending_assets"]}}</td>
<td>100</td>
<td>100%</td>
<td>{{group_hoding_info_total["cumulative_profit"]}}</td>
<td>{{group_hoding_info_total["cumulative_return"]}}</td>
<td>{{group_hoding_info_total["return_ratio_year"]}}</td>
......
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