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
6451e514
Commit
6451e514
authored
Nov 29, 2022
by
纪超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去除警告
parent
92cd4d49
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
api.py
api.py
+1
-1
robo_executor.py
robo_executor.py
+2
-0
No files found.
api.py
View file @
6451e514
...
...
@@ -400,7 +400,7 @@ class PortfoliosHolder(ABC):
@
abstractmethod
def
build_hold_portfolio
(
self
,
day
,
risk
:
PortfoliosRisk
):
'''
构建指定日期,指定风险等级的持仓投组
构建指定日期,指定风险等级的持仓投组
,以day为截止日期,会持续补满
:param day: 指定日期
:param risk: 指定风险等级
:return:
...
...
robo_executor.py
View file @
6451e514
...
...
@@ -123,8 +123,10 @@ class RealExecutor(RoboExecutor):
for
risk
in
PortfoliosRisk
:
logger
.
info
(
f
"start to build risk[{risk.name}] real for date[{format_date(date)}]"
.
center
(
50
,
'-'
))
now
=
dt
.
now
()
# 因为每天都必须有NORMAL最优投组,不管用不用
self
.
_builder
.
get_portfolios
(
prev_workday
(
date
),
risk
)
self
.
_hold
.
build_hold_portfolio
(
date
,
risk
)
# 如果当前持仓为风控投组,则还要计算风控投组,不管用不用
p_type
=
self
.
_hold
.
get_portfolio_type
(
date
,
risk
)
if
p_type
is
not
PortfoliosType
.
NORMAL
:
self
.
_builder
.
get_portfolios
(
prev_workday
(
date
),
p_type
)
...
...
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