Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
R
robo-dividend
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenwen.tang
robo-dividend
Commits
3234e299
Commit
3234e299
authored
Jun 05, 2025
by
stephen.wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新config,基金池變更
更新json相關程序
parent
99e568d6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
11 deletions
+18
-11
config-industryfund.yml
config-industryfund.yml
+4
-4
config-mdis_prr3.yml
config-mdis_prr3.yml
+3
-1
api_json_save.http
web/api_json_save.http
+1
-1
recomm_reason.py
web/recomm_reason.py
+10
-5
No files found.
config-industryfund.yml
View file @
3234e299
...
...
@@ -57,10 +57,10 @@ basic: # 基础信息模块
date
:
${DATUM_CHANGE_DATE}
file
:
${DATUM_CHANGE_FILE}
excludes
:
# 排除的资料彭博ticker
#
backtest:
# - 'FKRCX US Equity' # 富蘭克林黃金基金 美元 A(Ydis)
backtest
:
-
'
FRAIAAU
LX
Equity'
# 富蘭克林坦伯頓全球投資系列-創新科技基金 美元A(acc)股
real
:
-
'
XXX
LX
Equity'
-
'
FRAIAAU
LX
Equity'
# 富蘭克林坦伯頓全球投資系列-創新科技基金 美元A(acc)股
navs
:
# 净值模块
exrate
:
# 汇率,如果不开启,整个这块注释掉
-
from
:
EUR
# 需要转换的货币类型
...
...
@@ -240,7 +240,7 @@ robo-executor: # 执行器相关
sync-data
:
${SYNC_DATA:on}
# 是否开启同步资料数据
backtest
:
# 回测执行器相关
start-date
:
2013-01-02
# 回测起始日期
end-date
:
2025-0
4
-30
# 回测截止日期
end-date
:
2025-0
5
-30
# 回测截止日期
sealing-period
:
10
#调仓封闭期
start-step
:
${BACKTEST_START_STEP:1}
# 回测从哪一步开始执行 1:计算资产池;2:计算最优投组:3:计算再平衡信号以及持仓投组
end-step
:
${BACKTEST_END_STEP:3}
# 回测从哪一步执行完成后结束执行 1:计算资产池;2:计算最优投组:3:计算再平衡信号以及持仓投组
...
...
config-mdis_prr3.yml
View file @
3234e299
...
...
@@ -60,9 +60,11 @@ basic: # 基础信息模块
backtest
:
-
'
FRSTAMP
LX
Equity'
# 富蘭克林坦伯頓全球投資系列-精選收益基金 美元A(Mdis-pc)股
# - 'TEMFHYI LX Equity' # 富蘭克林坦伯頓全球投資系列-公司債基金 美元A(Mdis)股 -> 20240722起可一般申购
-
'
FTEAMUH
LX
Equity'
# 富蘭克林坦伯頓全球投資系列-歐洲股票收益基金美元避險A(Mdis)股-H1 -> 20250602併入其他基金
real
:
-
'
FRSTAMP
LX
Equity'
# 富蘭克林坦伯頓全球投資系列-精選收益基金 美元A(Mdis-pc)股
# - 'FTSIADU LX Equity' # 富蘭克林坦伯頓全球投資系列-精選收益基金 美元A(Mdis)股
-
'
FTEAMUH
LX
Equity'
# 富蘭克林坦伯頓全球投資系列-歐洲股票收益基金美元避險A(Mdis)股-H1 -> 20250602併入其他基金
navs
:
# 净值模块
exrate
:
# 汇率,如果不开启,整个这块注释掉
-
from
:
EUR
# 需要转换的货币类型
...
...
@@ -247,7 +249,7 @@ robo-executor: # 执行器相关
sync-data
:
${SYNC_DATA:on}
# 是否开启同步资料数据
backtest
:
# 回测执行器相关
start-date
:
2013-01-02
# 回测起始日期
end-date
:
2025-0
2-28
# 回测截止日期
end-date
:
2025-0
5-30
# 回测截止日期
sealing-period
:
10
#调仓封闭期
start-step
:
${BACKTEST_START_STEP:1}
# 回测从哪一步开始执行 1:计算资产池;2:计算最优投组:3:计算再平衡信号以及持仓投组
end-step
:
${BACKTEST_END_STEP:3}
# 回测从哪一步执行完成后结束执行 1:计算资产池;2:计算最优投组:3:计算再平衡信号以及持仓投组
...
...
web/api_json_save.http
View file @
3234e299
### 请求 8080 lowrisk_rr3 -> AB088E61-FAB1-4466-B6AD-6E8AE253391E
GET http://localhost:808
1
/franklin/recommend/save
GET http://localhost:808
0
/franklin/recommend/save
### 请求 8081 usmarket_prr4 -> 2CB50688-96F8-4C3E-87AB-6DEE2B4713B1
GET http://localhost:8081/franklin/recommend/save
...
...
web/recomm_reason.py
View file @
3234e299
...
...
@@ -11,10 +11,11 @@ def recomm_reason(filelist, note_review, printoutput=False):
for
file_name
in
filelist
:
# 读取原json文件
try
:
with
open
(
f
'{file_name}.json'
,
'r'
,
encoding
=
'utf-8'
)
as
file
:
with
open
(
f
'
./json/
{file_name}.json'
,
'r'
,
encoding
=
'utf-8'
)
as
file
:
data
=
json
.
load
(
file
)
except
FileNotFoundError
:
print
(
f
'{file_name}.json文件未找到,请检查文件路径。'
)
continue
except
json
.
JSONDecodeError
:
print
(
f
'{file_name}.json文件不是有效的 JSON 格式,请检查文件内容。'
)
...
...
@@ -41,17 +42,21 @@ def recomm_reason(filelist, note_review, printoutput=False):
# 保存修改后的 JSON 数据到新文件
try
:
with
open
(
f
'{file_name}_{data_date}.json'
,
'w'
,
encoding
=
'utf-8'
)
as
file
:
with
open
(
f
'
./json/
{file_name}_{data_date}.json'
,
'w'
,
encoding
=
'utf-8'
)
as
file
:
json
.
dump
(
data
,
file
,
indent
=
2
,
ensure_ascii
=
False
)
print
(
f
'修改后的 JSON 数据已成功保存到 [{file_name}_{data_date}.json] 文件中。'
)
except
Exception
as
e
:
print
(
f
'保存文件时出现错误: {e}'
)
print
(
'------------------------------------------------------------------------------------------'
)
print
(
'------------------------------------------------------------------------------------------'
)
if
__name__
==
'__main__'
:
# 參數設置
filelist
=
[
'D0FE0BF1-14F8-4350-833C-FD77AEE73E7A'
]
note_review
=
pd
.
read_excel
(
'主題式投資組合配置說明_0425v1(正式送審).xlsx'
,
sheet_name
=
'note_review'
)
filelist
=
[
'AB088E61-FAB1-4466-B6AD-6E8AE253391E'
,
'2CB50688-96F8-4C3E-87AB-6DEE2B4713B1'
,
'D0FE0BF1-14F8-4350-833C-FD77AEE73E7A'
]
note_review
=
pd
.
read_excel
(
'./json/主題式投資組合配置說明_0625v1(正式送審).xlsx'
,
sheet_name
=
'note_review'
)
# 更新說明
recomm_reason
=
recomm_reason
(
filelist
,
note_review
)
\ No newline at end of file
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