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
c03626ff
Commit
c03626ff
authored
Nov 28, 2022
by
jichao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
但任务回测完成
parent
16c1760c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
curve_drift.py
rebalance/signals/curve_drift.py
+1
-1
high_low_buy.py
rebalance/signals/high_low_buy.py
+1
-1
No files found.
rebalance/signals/curve_drift.py
View file @
c03626ff
...
...
@@ -35,7 +35,7 @@ class CurveDrift(BaseRebalanceSignal):
normal_weight
=
round
(
sum
([
x
[
1
]
for
x
in
normal_portfolio
.
items
()
if
x
[
0
]
in
datum_ids
]),
2
)
hold_portfolio
=
self
.
_hold
.
get_portfolios_weight
(
day
,
risk
)
hold_weight
=
round
(
sum
([
x
[
1
]
for
x
in
hold_portfolio
.
items
()
if
x
[
0
]
in
datum_ids
]),
2
)
return
normal_weight
-
hold_weight
>=
self
.
_solver
.
get_drift
(
day
,
risk
)
return
normal_weight
-
hold_weight
>=
self
.
_solver
.
get_drift
(
day
,
risk
)
# TODO 左边应该加绝对值
@
property
def
diff_threshold
(
self
):
...
...
rebalance/signals/high_low_buy.py
View file @
c03626ff
...
...
@@ -48,7 +48,7 @@ class HighBuySignal(BaseRebalanceSignal):
class
LowBuySignal
(
HighBuySignal
):
@
property
def
include_last_type
(
self
):
def
include_last_type
(
self
):
# TODO 回头看看要不要假如drift买入
return
[
SignalType
.
CRISIS_ONE
,
SignalType
.
CRISIS_TWO
,
...
...
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