Use Zipline Reloaded to run a monthly trend strategy end to end.

By PyQuant News

Published: 2026-09-12

URL: https://pyquantnews.substack.com/p/build-your-own-trading-strategy-with


Each week, I send out one Python tutorial to help you get started with algorithmic trading, market data analysis, and quant finance. Upgrade to a paid plan to access the Python code notebooks, Discord community, and code support.

Subscribe now


You can run a complete trading strategy with five ETFs (exchange-traded funds, which are baskets of stocks or bonds you buy like a single stock) and one decision a month.

Most beginners assume returns come from constant activity and a screen full of positions. The strategy in this issue trades on the first market day of each month. Its entire rule is a single price comparison.

That assumption costs people months of work on minute-by-minute price data they can’t clean and strategies they never finish testing.

Where the time goes

When I started out, I built something that needed clean minute-by-minute prices from three exchanges. I never got the timestamps to line up, so the strategy never ran once.

Most beginners I talk to do the same thing. They stack indicators and time frames on top of each other before they’ve tested one rule from start to finish.

The people I sat near in London who decided how to split money across markets adjusted their holdings once a month and spent the rest of their time measuring risk.

What you’ll build

In today’s post, you’ll run a five-fund trend strategy against historical prices in Zipline, a Python library for testing trading rules, and read the risk report it produces.

Let’s go.