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
d10b09d4
Commit
d10b09d4
authored
Apr 16, 2024
by
stephen.wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-dividend' into dev-dividend
parents
ea7ee695
ed794b2e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
asset_optimize.py
asset_pool/asset_optimize.py
+6
-2
config-svrobo_Mdiv_PRR3.yml
config-svrobo_Mdiv_PRR3.yml
+9
-10
No files found.
asset_pool/asset_optimize.py
View file @
d10b09d4
...
@@ -172,15 +172,19 @@ class FundDividendSortinoAssetOptimize(SortinoAssetOptimize):
...
@@ -172,15 +172,19 @@ class FundDividendSortinoAssetOptimize(SortinoAssetOptimize):
customType
=
f
.
get
(
'customType'
)
customType
=
f
.
get
(
'customType'
)
exclude
=
f
.
get
(
'exclude'
)
exclude
=
f
.
get
(
'exclude'
)
volatility
=
f
.
get
(
'volatility'
)
volatility
=
f
.
get
(
'volatility'
)
retain
=
f
.
get
(
'min-retain'
)
records
=
[
fund
for
fund
in
funds
if
fund
[
'customType'
]
==
customType
and
fund
[
'id'
]
in
annual
.
keys
()]
records
=
[
fund
for
fund
in
funds
if
fund
[
'customType'
]
==
customType
and
fund
[
'id'
]
in
annual
.
keys
()]
records
=
sorted
(
records
,
key
=
lambda
x
:
annual
[
x
[
'id'
]])
records
=
sorted
(
records
,
key
=
lambda
x
:
annual
[
x
[
'id'
]])
max_exclude
=
len
(
records
)
-
retain
if
exclude
is
not
None
:
if
exclude
is
not
None
:
exclude
=
exclude
if
len
(
records
)
>
exclude
else
len
(
records
)
exclude
=
exclude
if
len
(
records
)
>
exclude
else
len
(
records
)
exclude
=
max_exclude
if
(
len
(
records
)
-
exclude
)
<
retain
else
exclude
if
exclude
>
0
:
if
exclude
>
0
:
filtered
.
extend
(
records
[
-
exclude
:])
filtered
.
extend
(
records
[
-
exclude
:])
records
=
records
[:
-
exclude
]
records
=
records
[:
-
exclude
]
if
volatility
is
not
None
:
if
volatility
is
not
None
and
len
(
records
)
>
retain
:
records
=
[
record
for
record
in
records
if
annual
.
get
(
record
[
'id'
])
>
volatility
]
max_exclude
=
max_exclude
-
len
(
records
)
records
=
[
record
for
record
in
records
if
annual
.
get
(
record
[
'id'
])
>
volatility
][:
max_exclude
]
filtered
.
extend
(
records
)
filtered
.
extend
(
records
)
for
f
in
filtered
:
for
f
in
filtered
:
funds
.
remove
(
f
)
funds
.
remove
(
f
)
...
...
config-svrobo_Mdiv_PRR3.yml
View file @
d10b09d4
...
@@ -80,16 +80,15 @@ asset-pool: # 资产池模块
...
@@ -80,16 +80,15 @@ asset-pool: # 资产池模块
optimize-count
:
3
#基金优选个数
optimize-count
:
3
#基金优选个数
annual-volatility-filter
:
#1各资产年化波动率末exclude位 2各资产年化波动率大于volatility
annual-volatility-filter
:
#1各资产年化波动率末exclude位 2各资产年化波动率大于volatility
-
customType
:
1
-
customType
:
1
exclude
:
1
volatility
:
0
-
customType
:
2
exclude
:
3
volatility
:
0.05
-
customType
:
3
exclude
:
2
exclude
:
2
volatility
:
0.001
min-retain
:
2
# volatility: 100
-
customType
:
4
exclude
:
5
min-retain
:
2
# volatility: 111
annual-volatility-section
:
# 波动率时间区间
annual-volatility-section
:
# 波动率时间区间
-
years
:
3
-
years
:
1
portfolios
:
# 投组模块
portfolios
:
# 投组模块
holder
:
# 持仓投组相关
holder
:
# 持仓投组相关
init-nav
:
100
# 初始金额
init-nav
:
100
# 初始金额
...
@@ -252,8 +251,8 @@ robo-executor: # 执行器相关
...
@@ -252,8 +251,8 @@ robo-executor: # 执行器相关
use
:
${ROBO_EXECUTOR:backtest}
# 执行哪个执行器,优先取系统环境变量ROBO_EXECUTOR的值,默认backtest
use
:
${ROBO_EXECUTOR:backtest}
# 执行哪个执行器,优先取系统环境变量ROBO_EXECUTOR的值,默认backtest
sync-data
:
${SYNC_DATA:off}
# 是否开启同步资料数据
sync-data
:
${SYNC_DATA:off}
# 是否开启同步资料数据
backtest
:
# 回测执行器相关
backtest
:
# 回测执行器相关
start-date
:
20
13-01
-02
# 回测起始日期
start-date
:
20
24-03
-02
# 回测起始日期
end-date
:
202
3-10-3
1
# 回测截止日期
end-date
:
202
4-04-1
1
# 回测截止日期
sealing-period
:
10
#调仓封闭期
sealing-period
:
10
#调仓封闭期
start-step
:
${BACKTEST_START_STEP:1}
# 回测从哪一步开始执行 1:计算资产池;2:计算最优投组:3:计算再平衡信号以及持仓投组
start-step
:
${BACKTEST_START_STEP:1}
# 回测从哪一步开始执行 1:计算资产池;2:计算最优投组:3:计算再平衡信号以及持仓投组
end-step
:
${BACKTEST_END_STEP:3}
# 回测从哪一步执行完成后结束执行 1:计算资产池;2:计算最优投组:3:计算再平衡信号以及持仓投组
end-step
:
${BACKTEST_END_STEP:3}
# 回测从哪一步执行完成后结束执行 1:计算资产池;2:计算最优投组:3:计算再平衡信号以及持仓投组
...
...
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