Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
Q
Quant_API_SDK
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
Quant_API_SDK
Commits
858fd29c
Commit
858fd29c
authored
Jan 15, 2025
by
吕先亚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
再平衡判断依据改为rp_id
parent
dcc77e2c
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
16 deletions
+8
-16
test_case_exec.txt
test_case_exec.txt
+2
-12
testcase_example.xlsx
test_case_gen/Sample/testcase_example.xlsx
+0
-0
testcase_example_1227.xlsx
test_case_gen/Sample/testcase_example_1227.xlsx
+0
-0
quant_api_base.py
vender/quant_api_base.py
+5
-2
sv_quant_api.py
vender/sv_quant_api.py
+1
-2
No files found.
test_case_exec.txt
View file @
858fd29c
生成测试用例:
python test_case_gen\Sample\gentestcase.py test_case_gen\Sample\testcase_example
_1114
.xlsx
python test_case_gen\Sample\gentestcase.py test_case_gen\Sample\testcase_example.xlsx
执行测试用例:
python reb_test.py sv test test_case_gen/Sample/TEST_CASE_1_portfolio.json test_ca
se_gen/Sample/TEST_CASE_1_recomm.json test_data\class.json test_data\record_portfolio.json 20230804
python reb_test.py sv test test_case_gen/Sample/TEST_CASE_2_portfolio.json test_ca
se_gen/Sample/TEST_CASE_2_recomm.json test_data\class.json test_data\record_portfolio.json 20230810
python reb_test.py sv test test_case_gen/Sample/TEST_CASE_3_portfolio.json test_ca
se_gen/Sample/TEST_CASE_3_recomm.json test_data\class.json test_data\record_portfolio.json 20230817
python reb_test.py sv test test_case_gen/Sample/TEST_CASE_4_portfolio.json test_case_gen/Sample/TEST_CASE_4_recomm.json test_data\class.json test_data\record_portfolio.json 20230812
python reb_test.py sv test TEST_CASE_4_portfolio.json TEST_CASE_4_recomm.json test_data\class.json test_data\record_portfolio.json 20230812
test_case_gen/Sample/testcase_example.xlsx
View file @
858fd29c
No preview for this file type
test_case_gen/Sample/testcase_example_1227.xlsx
deleted
100644 → 0
View file @
dcc77e2c
File deleted
vender/quant_api_base.py
View file @
858fd29c
...
...
@@ -112,10 +112,13 @@ class base_Quant_api():
if
res
==
0
:
rp_id
=
'0'
reason
=
'符合所有條件,無需REB'
last_busi_date
=
None
rec_reason
=
None
else
:
(
rp_id
,
reason
)
=
res
(
rp_id
,
reason
,
last_busi_date
,
rec_reason
)
=
res
self
.
__default_msg
[
'rebs'
]
.
append
({
"pt_id"
:
pt
[
"pt_id"
],
"rp_id"
:
rp_id
,
"reason"
:
reason
})
self
.
__default_msg
[
'rebs'
]
.
append
({
"pt_id"
:
pt
[
"pt_id"
],
"rp_id"
:
rp_id
,
"reason"
:
reason
,
"last_busi_date"
:
last_busi_date
,
"rec_reason"
:
rec_reason
})
#self.__default_msg['rebs'].append({"pt_id":pt["pt_id"], "rp_id": self._rebalance(pt)})
return
self
.
__default_msg
...
...
vender/sv_quant_api.py
View file @
858fd29c
...
...
@@ -26,8 +26,7 @@ class Quant_api(base_Quant_api):
return
last_day_date
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S.
%
f'
)[:
-
3
]
model_portfolio
=
self
.
get_latest_portfolio
(
pt
[
'recomm_id'
])
if
not
pt
.
get
(
'last_check_date'
)
or
pt
.
get
(
'last_check_date'
)
.
replace
(
'-'
,
''
)
<=
model_portfolio
[
'data_Date'
]:
if
not
pt
.
get
(
'rp_id'
)
or
pt
.
get
(
'rp_id'
)
!=
model_portfolio
[
'rp_id'
]:
note
=
json
.
loads
(
pt
.
get
(
'note'
))
if
not
note
.
get
(
'recomm_reason'
):
raise
RuntimeError
(
'未輸入推薦理由'
)
...
...
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