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
05c3b6dc
Commit
05c3b6dc
authored
Feb 10, 2025
by
吕先亚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c862f571
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
funds_selection.py
reports/funds_selection.py
+2
-1
No files found.
reports/funds_selection.py
View file @
05c3b6dc
...
@@ -29,7 +29,8 @@ class FundSelectionProcessReportor(RoboReportor):
...
@@ -29,7 +29,8 @@ class FundSelectionProcessReportor(RoboReportor):
def
load_report
(
self
,
max_date
=
dt
.
today
(),
min_date
=
None
)
->
List
[
dict
]:
def
load_report
(
self
,
max_date
=
dt
.
today
(),
min_date
=
None
)
->
List
[
dict
]:
day
=
prev_workday
(
filter_weekend
(
max_date
))
day
=
prev_workday
(
filter_weekend
(
max_date
))
funds
=
self
.
_datum
.
get_datums
(
type
=
DatumType
.
FUND
)
funds
=
self
.
_datum
.
get_datums
(
type
=
DatumType
.
FUND
)
fund_ids
=
[
fund
[
'id'
]
for
fund
in
funds
]
funds_dict
=
{
fund
[
'id'
]:
fund
[
'chineseName'
]
for
fund
in
funds
}
fund_ids
=
funds_dict
.
keys
()
pct_change
=
pd
.
DataFrame
(
self
.
_optimize
.
get_pct_change
(
fund_ids
,
day
))
pct_change
=
pd
.
DataFrame
(
self
.
_optimize
.
get_pct_change
(
fund_ids
,
day
))
pct_change
.
set_index
(
'date'
,
inplace
=
True
)
pct_change
.
set_index
(
'date'
,
inplace
=
True
)
pct_change
=
pct_change
.
truncate
(
before
=
(
day
-
relativedelta
(
pct_change
=
pct_change
.
truncate
(
before
=
(
day
-
relativedelta
(
...
...
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