How I built an AI that magically rebalances your portfolio
Imagine Executing a Dozen Trades With the Click of a Button
Everybody has heard of “the Magnificent 7”.
You don’t have to be a finance bro to know that these are some of the best stocks in the world. They include tech giants like NVIDIA, Google, and Tesla that have seen outsized returns across the past decade. These stocks also happen to be the leaders of the Artificial Intelligence revolution.
And yet, most people don’t invest in them.
The reasons why are pretty obvious. Nobody knows when is the best time to start selling off some of your shares and buying more. Nobody wants to do all of that work. So they choose boring ETFs like SPY and VOO instead.
But what if there was a way to automatically invest in some of the best stocks in the market?
I built an AI that does this. Give me 3 minutes and I’ll demonstrate its power.
An Insanely Powerful Rebalancing Tool
Before I start, I want to say something fairly obvious…
You don’t need an AI to buy and hold stocks.
If your goal is just to buy the Magnificent 7, hold them for the long-run, and never rebalance your allocations, you can do that fairly quickly with any brokerage app. You don’t need any specialized tools; with just the click of few buttons, you’ll have a fairly successful strategy on your hand.

But if your goal is to run simulations or change the allocations of your portfolio dynamically across time, you’re SOL, especially for a complex strategy. For example, let’s say you wanted to test out or deploy a strategy that rebalances these 7 stocks, but weighted by the log of their PE ratio. Unless you’re willing to:
- Pull a calculator out
- Calculate the exact amount of shares you would have to buy and sell
- Execute a dozen manual orders every week
Then you’re not going to do this. It’s impractical for the vast majority of people.
With AI, you can now do this with the click of a button.

How Does the AI Work?
This is all possible with NexusTrade, my free, AI-Powered algorithmic trading platform.
The AI that powers all of this is a large language model. It works by converting plain English into a “trading strategy configuration”.

The AI generates a configuration containing a portfolio, the list of strategies, and the actions and conditions within each strategy. On the UI, it looks like the following screenshot.

These configurations has rules for when to buy, sell, alert, and even rebalance a portfolio. We can control the exact conditions and the actions in the strategy. Maybe we want to trigger the rebalance when any of these stocks have a significant change in P/E ratio. Or, we want to initiate the rebalance every single day. All of this is controllable using natural language.
More than that, we can test to see how these rules perform during any period in the past — a process called backtesting. We can also deploy these rules live using a brokerage like Tradestation to automatically execute trades.
While backtesting and paper trading are fully automated, the platform incorporates additional safeguards for live trading to ensure you have the final say. For your financial safety, the system sends an alert with the trades 100% ready for execution. All it needs is our final approval.

When we click “View in Portfolio”, a modal will pop-up that reiterates our new portfolio allocations. If we’re ready to trade, we’ll click “Confirm Portfolio Rebalance” to execute the trades.

The above screenshot shows a relatively simple strategy where we’re rebalancing by equal weight. However, we can choose to do something far more complex.
For example, if we ask the AI to create a strategy that rebalances based on the log of their PE ratio, it will compute the metric, sum the logs, and divide each stock’s value by the sum… all of this behind the scenes, while you see the final allocations.

Not only can we execute all of the trades, including the buying and selling, with the click of a button, but we can also simulate how this exact strategy performed in the past, just as easily.
I just typed “backtest across the past 5 years”, and in less than a minute, I know that this strategy earned 341% in the past 5 years (compared to SPY’s 106%).

If we click the graph, we get even more information. We see metrics like sharpe ratio, sortino ratio, and drawdown. We can see that this particular strategy has a roughly equivalent sharpe ratio, a higher drawdown, and a much higher percent change than holding SPY, making it perfect for risk-hungry tech bros who believe in the future of artificial intelligence.

All of these metrics, simulations, and evaluations without costing you a dollar. That’s pretty crazy!
Concluding Thoughts
I’m not claiming that this AI will make you a millionaire overnight. We haven’t begun to talk about hindsight bias, survivorship bias, or overfitting.
But in comparison to executing dozens of manual trades, the difference is legitimately night and day.
Not only can you test out fairly complex trading strategies, but you can do so using natural language. You don’t need a finance background or software engineering skills to get started.
If you ever thought about making more money as a trader or long-term investor, now is the perfect time to get started. Imagine being able to test your wildest ideas within minutes. No wrestling APIs or debugging Python.
Just plain English. If you can read and write, the sky is the limit.
Don’t believe me? Spend 5 minutes of your day to just try it for yourself. Getting started is free.
No comments yet.