Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
F
fund_report
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭熊
fund_report
Commits
ac64e3d0
Commit
ac64e3d0
authored
Dec 09, 2020
by
pengxiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://47.100.44.39:10001/pengxiong/fund_report
into dev
parents
be101748
06ecd2b6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
193 additions
and
180 deletions
+193
-180
portfolio_diagnose.py
app/service/portfolio_diagnose.py
+182
-169
monthReportV2.html
app/templates/v2/monthReportV2.html
+11
-11
No files found.
app/service/portfolio_diagnose.py
View file @
ac64e3d0
...
...
@@ -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
=
dat
etime
.
datetime
.
now
()
.
year
current_month
=
dat
etime
.
datetime
.
now
()
.
month
current_day
=
dat
etime
.
datetime
.
now
()
.
day
current_year
=
dat
a_adaptor
.
end_date
.
year
current_month
=
dat
a_adaptor
.
end_date
.
month
current_day
=
dat
a_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
=
[]
...
...
app/templates/v2/monthReportV2.html
View file @
ac64e3d0
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment