1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-10 06:20:57 +08:00

Update part of the docs

This commit is contained in:
Jactus
2020-11-24 23:56:16 +08:00
parent 5059bba51e
commit b4671746c2
30 changed files with 902 additions and 113 deletions

View File

@@ -65,10 +65,14 @@ def get_strategy(
topk : int (Default value: 50)
top-N stocks to buy.
margin : int or float(Default value: 0.5)
if isinstance(margin, int):
- if isinstance(margin, int):
sell_limit = margin
else:
- else:
sell_limit = pred_in_a_day.count() * margin
buffer margin, in single score_mode, continue holding stock if it is in nlargest(sell_limit)
sell_limit should be no less than topk
n_drop : int
@@ -204,10 +208,14 @@ def backtest(pred, account=1e9, shift=1, benchmark="SH000905", verbose=True, **k
topk : int (Default value: 50)
top-N stocks to buy.
margin : int or float(Default value: 0.5)
if isinstance(margin, int):
- if isinstance(margin, int):
sell_limit = margin
else:
- else:
sell_limit = pred_in_a_day.count() * margin
buffer margin, in single score_mode, continue holding stock if it is in nlargest(sell_limit)
sell_limit should be no less than topk
n_drop : int