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
da666688
Commit
da666688
authored
Apr 12, 2024
by
wenwen.tang
😕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
https://www.tapd.cn/59187493/documents/show/1159187493001000730
依照文档进行模型优化,bugfix
parent
dc58d48b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
asset_optimize.py
asset_pool/asset_optimize.py
+4
-2
No files found.
asset_pool/asset_optimize.py
View file @
da666688
...
...
@@ -173,10 +173,12 @@ class FundDividendSortinoAssetOptimize(SortinoAssetOptimize):
exclude
=
f
.
get
(
'exclude'
)
volatility
=
f
.
get
(
'volatility'
)
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'
]])
if
exclude
is
not
None
:
exclude
=
exclude
if
len
(
records
)
>
exclude
else
len
(
records
)
if
exclude
>
0
:
records
=
records
[:
len
(
records
)
-
exclude
]
filtered
.
extend
(
records
[
-
exclude
:])
records
=
records
[:
-
exclude
]
if
volatility
is
not
None
:
records
=
[
record
for
record
in
records
if
annual
.
get
(
record
[
'id'
])
>
volatility
]
filtered
.
extend
(
records
)
...
...
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