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
a5e8402b
Commit
a5e8402b
authored
Feb 15, 2023
by
jichao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
定版
parent
3e1d3c87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
right_side.py
rebalance/signals/right_side.py
+2
-2
No files found.
rebalance/signals/right_side.py
View file @
a5e8402b
...
@@ -37,7 +37,7 @@ class MarketRight(BaseRebalanceSignal):
...
@@ -37,7 +37,7 @@ class MarketRight(BaseRebalanceSignal):
return
self
.
_config
[
'cvar-min-volume'
]
return
self
.
_config
[
'cvar-min-volume'
]
@
property
@
property
def
in
clude_last_type
(
self
):
def
ex
clude_last_type
(
self
):
return
[
return
[
SignalType
.
CRISIS_ONE
,
SignalType
.
CRISIS_ONE
,
SignalType
.
CRISIS_TWO
,
SignalType
.
CRISIS_TWO
,
...
@@ -47,7 +47,7 @@ class MarketRight(BaseRebalanceSignal):
...
@@ -47,7 +47,7 @@ class MarketRight(BaseRebalanceSignal):
def
is_trigger
(
self
,
day
,
risk
:
PortfoliosRisk
)
->
bool
:
def
is_trigger
(
self
,
day
,
risk
:
PortfoliosRisk
)
->
bool
:
last_re
=
rrs
.
get_last_one
(
risk
=
risk
,
max_date
=
day
,
effective
=
True
)
last_re
=
rrs
.
get_last_one
(
risk
=
risk
,
max_date
=
day
,
effective
=
True
)
if
last_re
is
not
None
and
SignalType
(
last_re
[
'type'
])
in
self
.
in
clude_last_type
:
if
last_re
is
not
None
and
SignalType
(
last_re
[
'type'
])
in
self
.
ex
clude_last_type
:
return
False
return
False
spx
=
self
.
load_spx_close_rtns
(
day
)
spx
=
self
.
load_spx_close_rtns
(
day
)
if
spx
[
-
1
][
'rtn'
]
>
self
.
min_threshold
:
if
spx
[
-
1
][
'rtn'
]
>
self
.
min_threshold
:
...
...
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