Skip to content

Instantly share code, notes, and snippets.

@data-octo
data-octo / bactrader_sample.py
Created August 8, 2020 16:02 — forked from ceshine/bactrader_sample.py
A Simple Strategy Trading Two Stocks (back trader)
"""A Simple Strategy Trading Two Stocks
Original code: https://blog.csdn.net/qq_26948675/article/details/80016633
Modified based on: https://www.backtrader.com/blog/posts/2018-04-22-improving-code/improving-code.html
Replaced the local CSV files with online data from IEX.
Unfortunately, this strategy is not profitable for the two stocks picked.
"""