Skip to content

birdfly8888/bt-qmt-store

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

知识星球

bt-qmt-store

Backtrader QMT Store

1. 安装

pip install qmtbt

2. 使用

import backtrader as bt
from qmtbt import QMTStore

cerebro = bt.Cerebro()

store = QmtStore()

data = store.getdata(dataname='600115.SH', timeframe=bt.TimeFrame.Days, fromdate=datetime(2022, 1, 1), todate=datetime(2023, 9, 6), dividend_type='front')
cerebro.adddata(data)

timeframe

支持以下时间周期:

period_map = {
  bt.TimeFrame.Days: '1d',
  bt.TimeFrame.Minutes: '1m',
  bt.TimeFrame.Ticks: 'tick'
}

About

Backtrader QMT Store

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%