Gain access to exclusive tools that Wall Street's Elite don't want you to have. Don't miss the next issue...
Join 11,500+ Quant Scientists learning one article at a time
Join 11,500+ Quant Scientists learning one article at a time
Python is crazy for finance! In this QS Newsletter (get the code), we are showing how to optimize Nancy Pelosi's investment picks for a 1400% return over 6 years (that's a 33% compound annual growth rate). Today, you learn:
Who is Nancy Pelosi (and why are we analyzing her investment portfolio)?
What is Portfolio Optimization (and what tools exist in Python)
Full tutorial: How to optimize Nancy Pelosi's stock picks
BONUS: Get the Python Code for EVERYTHING you see in this post
Disclaimer:
The information and educational material provided by Quant Science, LLC are for educational purposes only and should not be considered as financial advice or recommendations to purchase, hold, or sell any securities or other financial instruments. Before you proceed, please review our full disclaimer here.
Want exclusive access to our FULL codebase for this Quant Science tutorial plus dozens more? The code is in the QS015 Folder. Join here:
Are you interested in learning Algorithmic Trading with Python? Do you want to learn how to execute trades automatically, how to find edge, backtest trading strategies, analyze risk, then take your winning trades from Paper Account to Production (Live Trading)?
If the answer is Yes, then we have a NEW Free 5-Day Algorithmic Trading.
👉 Click here to join our free 5-Day Algorithmic Trading Course.
On February 8th, the twitter handle, @PelosiTracker_, reported that elements of Nancy Pelosi's portfolio were up big. Nancy Pelosi's estimated net worth is $114,662,521 in 2018. The most interesting part. Her annual salary is $193,400 a year.
This has led many recent investors to label Nancy the modern-day GOAT of investing. Much of her net worth is attributed to Venture Capital (her husband, Paul Pelosi, who runs Financial Leasing Services, Inc, a San Francisco-based real estate and venture capital investment firm).
More recently, Nancy Pelosi's trading activity has come into the spotlight for being an early mover on stock of Nvidia (NVDA) and several other high profile companies that have experienced extraordinary growth.
Nancy Pelosi came under scrutiny because of her role as Speaker of the House in which she has the ability to influence laws that govern many of the companies that she is actively investing in.
Nevertheless, Pelosi has shown a tremendous track record in her stock picks in recent years. So today, we're analyzing her investment universe. And more specifically we'll optimize her portfolio to determine the weights that maximize Sharpe.
Portfolio optimization is a mathematical method used to select the best allocation of assets in an investment portfolio, given certain objectives and constraints. This process seeks to optimize an objective function, typically maximizing returns, minimizing risk, or finding a balance between the two under certain constraints such as budget, risk tolerance, and regulatory requirements.
The Efficient Frontier is a concept from Modern Portfolio Theory, introduced by Harry Markowitz in the 1950s. It represents a set of portfolios that offer the highest expected return for a given level of risk or the lowest risk for a given level of expected return. This set forms a curve on a graph plotting expected return (y-axis) against portfolio risk (standard deviation of returns, on the x-axis).
Upper Boundary: The portfolios on the efficient frontier are not outperformed by any other portfolios in terms of risk-return balance. They are considered optimal because no other portfolios offer higher returns for the same risk or lower risk for the same returns.
Portfolio Selection: An investor chooses a portfolio along the frontier based on their risk tolerance. Those who tolerate more risk might choose a portfolio further to the right (higher risk and higher expected return), while risk-averse investors might select a portfolio towards the left (lower risk and lower expected return).
Visualization: The curve helps investors visualize and choose among the various trade-offs between risk and return.
To use the Efficient Frontier in practical investment decisions, investors can use portfolio optimization software or tools, such as Riskfolio-Lib in Python, which help in determining the weights of assets in a portfolio. By inputting historical returns data and constraints, investors can calculate and plot the efficient frontier to see their options for asset allocation.
Ok, let's dive in and see what you can optimize Nancy Pelosi's Investment Portfolio in Python. First, make sure to sign up for our Newsletter to get all of the code you see today.
Next, run this code from the "QS016-nancy-pelosi-portfolio" Folder:
This code downloads data for the top 8 stocks that are in Nancy Pelosi's portfolio according to this article.
Next, we'll create a Riskfolio Portfolio Object from the returns data. Run this code:
Next, we will make the default portfolio that maximizes the Sharpe Ratio. Run this code:
Here's the 4 charts that are output.
Portfolio Composition: 48.8% NVDA, 21.9% PANW, 19.6% TSLA, 9.7% MSFT, and Others are 0%
Compounded Historical Returns: 1400% over 6 years
Historical Drawdowns: -57.6% Max Drawdown
Risk Table: 50% Average Return, 33.7% compound annual growth rate (CAGR), 40% standard deviation, -57.6% Max Drawdown
Python is wild for finance. We've used Riskfolio to come up with a passive investing strategy that could yield significant future returns. Note that with max drawdown exceed -57%, this portfolio is not for the faint of heart. But at 33.7% CAGR (and 1400% total return), it's shown to be a significant wealth generator in the past. Keep in mind, the past is not indicative of the future, so who knows what will happen.
Are you interested in learning active investing strategies that use algorithms to maximize returns responsibly, help you manage risk, and grow your investments? We implement 3 core trading strategies including portfolio, momentum, and spread trades that have worked in our favor in the past and continue to produce results for our students.
Learn with 200+ of us that are learning to apply python to algorithmic trading to grow investments.
Leo was up 11.5% in just 13 trading days.
Alex was waiting 9 years for a course like this:
There's nothing worse than going at this alone--
❌ Learning Python is tough.
❌ Learning Trading is tough.
❌ Learning Math & Stats is tough.
It's no wonder why it's easy to feel lost, make bad decisions, and lose money.
Want help?
👉 Join 8,200+ future Quant Scientists on our Python for Algorithmic Trading Course Waitlist: https://learn.quantscience.io/python-algorithmic-trading-course-waitlist
Gain access to exclusive tools that Wall Street's Elite don't want you to have. Don't miss the next issue...
Join 11,500+ Quant Scientists learning one article at a time
Join 11,500+ Quant Scientists learning one article at a time