Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)
Bollinger's band trading strategy

Bollinger's band take 2 parameters the period N of the underlying moving
average and the widht of the band K.

To instantiate a 20 days, 2 standard dev:

>>> bollinger = Bollinger(20, 2)

src/p/y/python-backtest-HEAD/backtest.py   python-backtest(Download)
from lib import Stock, BackTest
from strategy import Bollinger, Monkey
banner = """Back Testing Trading Strategy Console
type help() for assistance."""
bollinger = Bollinger(30, 1)
monkey = Monkey(30)
goog = Stock('GOOG')