RSS Amplifier

PyQuant News · Jul 25, 2026

🐍 Build your own volatility targeting portfolio

0
Sign in to vote or save

PyQuant News · PyQuant News

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.

Most investors build portfolios by splitting their money equally across a handful of stocks.

That sounds fair, but it ignores something important. Not every stock moves the same amount. A calm utility stock and a volatile biotech stock carry very different levels of risk, so giving them equal dollar amounts means the volatile one will dominate your portfolio’s ups and downs.

This mismatch is one of the most common reasons beginner portfolios behave in ways their owners don’t expect.

Before I could even think about building a smarter portfolio, I had a more basic problem. The data I needed was scattered across dozens of websites. I was downloading CSV files, renaming columns, and stitching everything together by hand. It took an entire afternoon just to get a clean dataset for 20 stocks.

Most people who try to build a portfolio in Python hit this exact wall before they write a single line of strategy code.

Professionals at large firms don’t deal with this because they pay for expensive data terminals that put everything in one place.

In today’s post, you’ll learn how to pull stock data from a free platform called OpenBB, then use that data to build a portfolio where each stock contributes an equal amount of risk instead of an equal number of dollars.

Let’s go.

Read the original on pyquantnews.substack.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.