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
d7064c59
Commit
d7064c59
authored
Dec 09, 2020
by
pengxiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
样式2
parent
fd490bcd
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
270 additions
and
6 deletions
+270
-6
fund_report.iml
.idea/fund_report.iml
+2
-0
modules.xml
.idea/modules.xml
+2
-0
vcs.xml
.idea/vcs.xml
+2
-1
data_service.py
app/service/data_service.py
+1
-1
draw.py
app/utils/draw.py
+3
-0
jinjia2html.py
app/utils/jinjia2html.py
+4
-4
tamp_course_order.log
logs/tamp_course_order.log
+256
-0
No files found.
.idea/fund_report.iml
View file @
d7064c59
...
@@ -4,6 +4,8 @@
...
@@ -4,6 +4,8 @@
<content
url=
"file://$MODULE_DIR$"
/>
<content
url=
"file://$MODULE_DIR$"
/>
<orderEntry
type=
"jdk"
jdkName=
"Python 3.7"
jdkType=
"Python SDK"
/>
<orderEntry
type=
"jdk"
jdkName=
"Python 3.7"
jdkType=
"Python SDK"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"sourceFolder"
forTests=
"false"
/>
<orderEntry
type=
"module"
module-name=
"tamp_course_order"
/>
<orderEntry
type=
"module"
module-name=
"tamp_app_scan"
/>
</component>
</component>
<component
name=
"TestRunnerService"
>
<component
name=
"TestRunnerService"
>
<option
name=
"PROJECT_TEST_RUNNER"
value=
"Unittests"
/>
<option
name=
"PROJECT_TEST_RUNNER"
value=
"Unittests"
/>
...
...
.idea/modules.xml
View file @
d7064c59
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
<component
name=
"ProjectModuleManager"
>
<component
name=
"ProjectModuleManager"
>
<modules>
<modules>
<module
fileurl=
"file://$PROJECT_DIR$/.idea/fund_report.iml"
filepath=
"$PROJECT_DIR$/.idea/fund_report.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/.idea/fund_report.iml"
filepath=
"$PROJECT_DIR$/.idea/fund_report.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/../tamp_app_scan/.idea/tamp_app_scan.iml"
filepath=
"$PROJECT_DIR$/../tamp_app_scan/.idea/tamp_app_scan.iml"
/>
<module
fileurl=
"file://$PROJECT_DIR$/../tamp_course_order/.idea/tamp_course_order.iml"
filepath=
"$PROJECT_DIR$/../tamp_course_order/.idea/tamp_course_order.iml"
/>
</modules>
</modules>
</component>
</component>
</project>
</project>
\ No newline at end of file
.idea/vcs.xml
View file @
d7064c59
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<project
version=
"4"
>
<component
name=
"VcsDirectoryMappings"
>
<component
name=
"VcsDirectoryMappings"
>
<mapping
directory=
"$PROJECT_DIR$"
vcs=
"Git"
/>
<mapping
directory=
""
vcs=
"Git"
/>
<mapping
directory=
"$PROJECT_DIR$/../tamp_app_scan"
vcs=
"Git"
/>
</component>
</component>
</project>
</project>
\ No newline at end of file
app/service/data_service.py
View file @
d7064c59
...
@@ -285,7 +285,7 @@ class UserCustomerDataAdaptor:
...
@@ -285,7 +285,7 @@ class UserCustomerDataAdaptor:
confirm_date_nav_data
=
p_nav_df
[
p_nav_df
.
index
==
confirm_share_date
][
cur_fund_id
]
.
tail
(
1
)
confirm_date_nav_data
=
p_nav_df
[
p_nav_df
.
index
==
confirm_share_date
][
cur_fund_id
]
.
tail
(
1
)
confirm_date_cnav_data
=
p_cnav_df
[
p_cnav_df
.
index
==
confirm_share_date
][
cur_fund_id
]
.
tail
(
1
)
confirm_date_cnav_data
=
p_cnav_df
[
p_cnav_df
.
index
==
confirm_share_date
][
cur_fund_id
]
.
tail
(
1
)
diff_nav
=
Decimal
(
row
[
"nav"
])
-
Decimal
(
confirm_date_nav_data
.
values
[
0
])
diff_nav
=
Decimal
(
row
[
"nav"
])
-
Decimal
(
confirm_date_nav_data
.
values
[
0
])
cur_cnav
=
confirm_date_cnav_data
.
values
[
0
]
+
diff_nav
cur_cnav
=
Decimal
(
confirm_date_cnav_data
.
values
[
0
])
+
Decimal
(
diff_nav
)
cnav_df
.
loc
[
confirm_share_date
,
cur_fund_id
]
=
cur_cnav
cnav_df
.
loc
[
confirm_share_date
,
cur_fund_id
]
=
cur_cnav
cnav_df
=
cnav_df
.
dropna
(
axis
=
0
,
how
=
"all"
)
.
fillna
(
method
=
'ffill'
)
cnav_df
=
cnav_df
.
dropna
(
axis
=
0
,
how
=
"all"
)
.
fillna
(
method
=
'ffill'
)
...
...
app/utils/draw.py
View file @
d7064c59
...
@@ -144,6 +144,9 @@ def draw_contribution_chart(xlabels, product_list, cumulative):
...
@@ -144,6 +144,9 @@ def draw_contribution_chart(xlabels, product_list, cumulative):
# 画折线图
# 画折线图
ax2
.
plot
(
loc
,
cumulative
[
'data'
],
color
=
'#B40A15'
,
marker
=
''
,
linewidth
=
3
,
label
=
cumulative
[
'name'
])
ax2
.
plot
(
loc
,
cumulative
[
'data'
],
color
=
'#B40A15'
,
marker
=
''
,
linewidth
=
3
,
label
=
cumulative
[
'name'
])
# 添加数字标签
for
a
,
b
in
zip
(
range
(
len
(
xlabels
)),
cumulative
[
'data'
]):
ax2
.
text
(
a
+
0.2
,
b
+
0.1
,
'
%.2
f'
%
b
+
'
%
'
,
ha
=
'center'
,
va
=
'bottom'
,
fontsize
=
fontsize
,
color
=
'#B40A15'
)
ax2
.
legend
(
loc
=
'upper left'
,
fontsize
=
fontsize
)
ax2
.
legend
(
loc
=
'upper left'
,
fontsize
=
fontsize
)
imgdata
=
BytesIO
()
imgdata
=
BytesIO
()
...
...
app/utils/jinjia2html.py
View file @
d7064c59
...
@@ -39,6 +39,8 @@ class DataIntegrate:
...
@@ -39,6 +39,8 @@ class DataIntegrate:
self
.
contribution_deco
()
self
.
contribution_deco
()
# 个基点评
# 个基点评
self
.
single_fund_comment
()
self
.
single_fund_comment
()
# 旧收益比较
self
.
get_old_compare_pic
()
# 旧相关性
# 旧相关性
self
.
get_old_correlation
()
self
.
get_old_correlation
()
# 新相关性
# 新相关性
...
@@ -47,8 +49,6 @@ class DataIntegrate:
...
@@ -47,8 +49,6 @@ class DataIntegrate:
self
.
propose_fund
()
self
.
propose_fund
()
# 目标与业绩
# 目标与业绩
self
.
objectives_performance
(
self
.
group_result
)
self
.
objectives_performance
(
self
.
group_result
)
# 旧收益比较
self
.
get_old_compare_pic
()
# 新收益比较
# 新收益比较
self
.
get_transfer_suggestions
()
self
.
get_transfer_suggestions
()
# 渲染模版
# 渲染模版
...
@@ -199,9 +199,9 @@ class DataIntegrate:
...
@@ -199,9 +199,9 @@ class DataIntegrate:
# 个基点评
# 个基点评
'box5'
:
'block'
,
'box5'
:
'block'
,
# 优化组合建议
# 优化组合建议
'box6'
:
'block'
,
'box6'
:
None
,
# 新增基金
# 新增基金
'box7'
:
'block'
,
'box7'
:
None
,
# 结尾
# 结尾
'box8'
:
'block'
,
'box8'
:
'block'
,
'cover_back'
:
template_folder
+
'/v2/img/cover-back.png'
,
'cover_back'
:
template_folder
+
'/v2/img/cover-back.png'
,
...
...
logs/tamp_course_order.log
View file @
d7064c59
This diff is collapsed.
Click to expand it.
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