Building Your Portfolio, One Incantation at a Time
I recently added a new building block (a.k.a. incantation in our lingo) to QuantMage. Up until now, we've armed our users with six potent incantations, each designed to manipulate the mystical market forces in your favor. Ticker is a primitive incantation that represents one individual asset by its ticker symbol. Weighted is for asset allocation. You can apply equal or custom weights to its children to have a balanced & diversified portfolio. Filtered allows you to sort and select only a certain few among its children according to an indicator reading on each and distribute your capital among them. If/Else enables you to choose one way or the other based on indicator comparisons. You can vary your approach based how many in a set of signals are firing with Switch. Enter/Exit is the only stateful incantation available, which accepts separate entry and exit signals.
Introducing: Mixed
The idea for the new incantation, Mixed came from Risk Adjusted RSI Strategy introduced in a previous post. There I used a Switch incantation to vary the portion of an aggressive asset based on a RSI reading and achieve a risk-adjusted approach. Unfortunately having the two mean reversions (for both overbought and oversold cases) still required a lot of repetitions on my side and the resulting spell was lengthy and verbose. It made me think how wonderful it would be if I can just express the idea of seamlessly transitioning from one asset to the other based on an indicator reading in QuantMage and that’s how the brand-new incantation came to life.
Risk Adjusted RSI Strategy, Reimagined
Picture this: instead of juggling complex sequences to adjust your asset mix based on RSI readings, you now have Mixed. With it, transitioning from aggressive to conservative assets (or vice versa) is as smooth as the potion in your cauldron—no lumps, no bumps:
When oversold, it mixes TECL (Direxion Daily Technology Bull 3X Shares ETF) and SHV (iShares Short Treasury Bond ETF) according to where exactly TQQQ (ProShares UltraPro QQQ)’s 10-day RSI falls between 15% and 35%. When overbought, it mixes VIXY (ProShares VIX Short-Term Futures ETF) and SHV according to where the same indicator falls between 90% and 70%. And the entire logic can be in a single shot now! Gone are the days of cumbersome, repetitive spells. In a mathy way, If/Else is like a step function while this is like having a ramp function (linear interpolation) in-between so that the transition can be smooth. It gives you a 13-year backtesting result like below:
Not a bad performance, when considering that it was effectively in the market only 8% of the time, as you can check from the orange numbers indicating each branch’s activation percentage in the first screenshot. The performance stats are not exactly the same as for the original since their exact conditions and parameters are slightly different. The new version’s smaller discrepancy for YC/TO is also encouraging. You can check the new spell yourself here.
Beyond RSI: A Glimpse into Volatility's Crystal Ball
But why stop there? Our exploration into the arcane arts of asset mixing has unveiled yet another gem: blending TQQQ and SHV based on QQQ's volatility:
This simple yet profound strategy has shown to mirror TQQQ's returns with only half the heartache of drawdowns. In the plot, I enabled the indicator visualization, another powerful feature of QuantMage, and you can see how the 20-day volatility of QQQ fared over time and specifically when it surged above 2% and dipped below 1%. And yes, while similar feats could be achieved with our existing incantations after some tweaking, there's something irresistibly smooth about the Mixed method:
Here checking the condition for last 2 days was the key to achieving a comparable performance.
The Stage Is Yours
Now, it's over to you, fellow investment wizards and witches. How will you wield this new power? What strategies will you unlock with the Mixed incantation? The realm of QuantMage is vast, and with Mixed, it just got a whole lot more exciting.
Disclaimer: Our incantations are potent, but they're not infallible. The realms of investment are ever-changing, and while we strive to arm you with the best, always conduct your own research and consider professional counsel. Our magic is meant to inform, not to dictate.