Skip to content

Instantly share code, notes, and snippets.

@dharma6872
Created February 16, 2021 10:54
Show Gist options
  • Save dharma6872/40cab8f7edf95a3573aa0403b9e8b7d2 to your computer and use it in GitHub Desktop.
Save dharma6872/40cab8f7edf95a3573aa0403b9e8b7d2 to your computer and use it in GitHub Desktop.
[백테스터 템플릿] #퀀트
import backtrader as bt
class MyStrategy(bt.Strategy):
def next(self):
pass #Do something
#Instantiate Cerebro engine
cerebro = bt.Cerebro()
#Add strategy to Cerebro
cerebro.addstrategy(MyStrategy)
#Run Cerebro Engine
cerebro.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment