Skip to content

💧🩸 create and simulate strategies on historical stock data 🩸💧

License

Notifications You must be signed in to change notification settings

ojustino/backstroke

Repository files navigation

backstroke 💧


( ⬆️ click above to run in the cloud)

A Python package that allows users to create portfolio Strategy classes based on a "safe core, risky satellite" model and simulate their performances on historical stock data from a free API hosted by Tiingo.

I created this repository because I wanted to research the purported dangers of leveraged ETFs (which magnify an index's daily gains and losses) for myself. I tried sites like QuantConnect and Portfolio Visualizer but resolved to write my own Python package to gain more flexibility in creating strategies than the former allows and more visualization options than exist in the latter.

Now, I actually use a Strategy class to make decisions for my IRA. (Naturally, your results may vary.)

Skills used:
(bear with me; I'm job-hunting)

data(Frame) manipulation with pandas, fetching data over HTTP with requests, object-oriented programming with abstract base classes, visualization with matplotlib, cloud-based Jupyter environment creation with Binder and Docker, and continuous integration with pytest and GitHub Actions (formerly Travis).

Example usage:

Read through walkthrough.ipynb and buy_and_hold.ipynb to get familiar with the package. Or, click the badge atop this file for an interactive walkthrough.

Installation (coming soon):

git clone https://github.com/ojustino/backstroke
cd backstroke
pip install .

(Add -e before the period in the final line if you intend to make changes to the source code.)

License:

This project uses a slightly modified version of the PolyForm Noncommercial License 1.0.0. Basically, you're free to view, run, download, and modify this package for any non-commercial purpose.

About

💧🩸 create and simulate strategies on historical stock data 🩸💧

Resources

License

Stars

Watchers

Forks

Packages

No packages published