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
e8de612e
Commit
e8de612e
authored
May 14, 2025
by
stephen.wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev-recommend' into dev-recommend
parents
1d38db45
c5a086a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
funds_selection.py
reports/funds_selection.py
+2
-1
robo_controller.py
web/robo_controller.py
+1
-1
No files found.
reports/funds_selection.py
View file @
e8de612e
...
@@ -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
=
list
(
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
(
...
...
web/robo_controller.py
View file @
e8de612e
...
@@ -84,7 +84,7 @@ def load_report(max_date=None, min_date=None, combo: RoboReportor = None):
...
@@ -84,7 +84,7 @@ def load_report(max_date=None, min_date=None, combo: RoboReportor = None):
@
app
.
get
(
"/franklin/recommend"
)
@
app
.
get
(
"/franklin/recommend"
)
async
def
recommend
():
async
def
recommend
():
sig
=
get_
last_signal
()
sig
=
get_
today_rec
()
if
sig
:
if
sig
:
if
not
fund_infos
:
if
not
fund_infos
:
get_fund_infos
()
get_fund_infos
()
...
...
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