-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
https://doc.finlab.tw/details/backtest_decorator/#hold_until
訊號進出場(hold_until)
這是所有策略撰寫中,最重要的語法糖,用法為:
from finlab import data
close = data.get('price:收盤價')
buy = close > close.averate(5)
sell = close < close.average(20)
position = buy.hold_until(sell)
Should be ->
buy = close > close.average(5)
Metadata
Metadata
Assignees
Labels
No labels