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
1174318f
Commit
1174318f
authored
Aug 29, 2023
by
wenwen.tang
😕
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix
parent
e71c080d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
robo_executor.py
robo_executor.py
+4
-7
No files found.
robo_executor.py
View file @
1174318f
...
...
@@ -21,7 +21,7 @@ logger = logging.getLogger(__name__)
@
component
(
bean_name
=
'backtest'
)
class
BacktestExecutor
(
RoboExecutor
):
@
autowired
(
names
=
{
'syncs'
:
'navs-sync'
})
@
autowired
def
__init__
(
self
,
datum
:
Datum
=
None
,
pool
:
AssetPool
=
None
,
syncs
:
List
[
DataSync
]
=
None
,
export
:
RoboExportor
=
None
,
builder
:
PortfoliosBuilder
=
None
,
hold
:
PortfoliosHolder
=
None
,
...
...
@@ -30,7 +30,7 @@ class BacktestExecutor(RoboExecutor):
self
.
_pool
=
pool
self
.
_builder
=
builder
self
.
_hold
=
hold
self
.
_syncs
=
[
syncs
]
self
.
_syncs
=
syncs
self
.
_export
=
export
self
.
_signal
=
signal
self
.
_config
=
get_config
(
__name__
)[
'backtest'
]
...
...
@@ -135,17 +135,14 @@ class BacktestExecutor(RoboExecutor):
@
component
(
bean_name
=
'real'
)
class
RealExecutor
(
RoboExecutor
):
@
autowired
(
names
=
{
'daily_export'
:
'daily-real-export'
,
'monitor_export'
:
'daily-monitor-export'
,
# todo 上线用tw api
# 'syncs': 'tw-navs-sync'})
'syncs'
:
'navs-sync'
})
@
autowired
(
names
=
{
'daily_export'
:
'daily-real-export'
,
'monitor_export'
:
'daily-monitor-export'
})
def
__init__
(
self
,
builder
:
PortfoliosBuilder
=
None
,
hold
:
PortfoliosHolder
=
None
,
syncs
:
List
[
DataSync
]
=
None
,
daily_export
:
RoboExportor
=
None
,
monitor_export
:
RoboExportor
=
None
,
pool
:
AssetPool
=
None
,
signal
:
RebalanceSignal
=
None
):
self
.
_builder
=
builder
self
.
_pool
=
pool
self
.
_hold
=
hold
self
.
_syncs
=
[
syncs
]
self
.
_syncs
=
syncs
self
.
_daily_export
=
daily_export
self
.
_monitor_export
=
monitor_export
self
.
_config
=
get_config
(
__name__
)[
'real'
]
...
...
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