2Settimana·

Nasdaq100 Leveraged LTTS - Kickoff

Good evening GQ,

Today I would like to introduce you to my Nasdaq100 Leveraged Long-Term Trading System. The whole thing is by and large an AI model which is based on the $EQQQ (+0,23%) the $TQQQ , $SQQQ or cash.


Origin

The idea for the model was born in December after a conversation with @Epi about his GTAA model which I have been following for some time. The first idea at that time was to buy the leveraged Nasdaq100 by comparing the 50-SMA and 200-SMA. $TQQQ to buy the leveraged one. After various backtests on portfolio visualizers and unsuccessful attempts in Excel to find a pattern within the technical indicators, the idea of my own AI model was born.


The model

The LTTS model basically consists of 2 parts in Python. The first part uses an ensemble of 3 AI models to forecast the course of the Nasdaq100 over the next few days using various technical indicators. The history of SMA, RSI, MACD, ROC, VIX or various volume parameters back to 2010 are used. The output of the ensemble is a trading signal and the current model confidence.

The second part of the model consists of a kind of optimization loop that uses the Bayesian optimization model to try to optimize several indicators such as the buy thresholds for $TQQQ , $SQQQ , cash, smoothing parameters, interaction of trading signal with confidence, ensemble agreement and other parameters through backtests. This means that the model itself carries out backtests with the signals from the forecast model over various time ranges and settings in order to optimize performance. The AI is rewarded with high returns or low drawdowns, while deductions are made for an excessively high number of trades (long term model) or low sharp ratios.


Development

When creating the concept, it quickly became clear that the model should run in Python on Google Colab. Since I myself work as an engineer in the development department of a semiconductor company, I am basically familiar with models and programming, but in much lower-level programming languages. Since my Python knowledge is limited, I decided to develop the model with the help of LLM-AI models (mainly Claude Sonnet 3.5, individually also ChatGPT and Perplex) and to optimize the code. The experience of using AI on a daily basis at work has been confirmed time and again. The AI has suggested code that I would never have managed to program in this way, but you have to check each line individually and debug very carefully whether everything has been understood correctly and the code does what it is supposed to do. In total, about 80 hours have gone into the development in the last few months, the final training of the models (on my iMac from 2012 - Colab has a limited runtime) is about 28 hours and will be repeated every 2-3 weeks. The daily calculation of the current signals has a runtime of approx. 1 minute on Colab.


Outlook

Even though the backtests have produced very good results, the model still has to prove itself, which is why there is currently still a small investment amount in the new GQ portfolio. I will share my experiences with the model with you over the next few months. In theory, the model can be trained (and traded) with any asset, but currently only the Nasdaq with the corresponding levers is planned.


Current LTTS signal: Cash (will be entered accordingly in the GQ portfolio in order to be able to compare with the market)


Best regards

Your Internet Explorer

1Posizione
300,00 €
0,00%
24
8 Commenti

immagine del profilo
2Settimana
Very cool! But I have a few questions:

What are the performance figures of the backtest, including trading costs?

How do you get around the problem of overfitting?

Is there an overarching economic logic to your model beyond the pure backtest results?
3
@Epi Overfitting was indeed a big issue in the beginning, especially for parameter variation... I ran the backtests for Bayesian-Optimization over smaller time periods and then wanted to combine the results via Weighted Average --> saw that the algorithm overoptimizes the parameters for the time periods and then other time periods with the same parameters don't work at all... Solution now is actually the optimization over the entire period as training data minus test data whereby the parameters must exist for different bear/bull markets... The parameters found are then varied slightly +- and the effect on drawdown is observed (so that an "optimal spike" is not found and the same deviations do not work at all). I am currently at 35% drawdown +- 4% depending on the variation, which is ok for me, but maybe I will increase the deductions for drawdown to get closer to the 30 range...
For the signal forecast itself, the LSTM is particularly susceptible to overfitting, the current remedy against overfitting training/test data is above all the ensemble agreement of the 3 models, as RF and GB are less susceptible to overfitting... But the ensemble is the next point I would like to look at more closely.

As a technician, I had to google the topic of "higher-level economic logic" for a moment, but I would describe the whole thing as a kind of extended fear-greed --> bull market starts to falter --> switch from TQQQ to SQQQ, bear market starts to falter --> switch from SQQQ to TQQQ, side market or uncertain model confidence = cash. But yes, the model depends a lot on error-free backtests that I had to recalculate manually for a long time (or the respective TQQQ/SQQQ positions)
3
immagine del profilo
@InternetExplorer What performance p.a. did your model achieve in the backtest and did you also work with dropout or noise to test the robustness of the model?
1
I am currently at 105% pa with TQQQ and SQQQ at 35% dropdown over the entire period (Learn+Test), I have also tested a variant without SQQQ, which was slightly better than the SMA TQQQ + Cash Model, I would have to look up the exact values. Dropout/Noise are currently not included, but is a good input... Would generally like to split test/learn data better, but ea is a bit difficult due to the long bull market the last few years (as the model is less challenged there)... If I do Test-Data from 2020-2025 (where Bull/Bear would be included), Learndata 2011-2020 is relatively short in relation...
2
immagine del profilo
What is your expected return with this trading system?
@MoneyGame The goal is to beat the market... But it's only a side project (also out of technical interest as to whether it's possible), the main portfolio remains Core-Satelite with $VWRL
immagine del profilo
@InternetExplorer And in this case, which index do you use to define the market? Presumably Nasdaq 100?
@MoneyGame First and foremost World (quasi Buy&Hold World vs Trading System incl Transactioncost), secondly an underperformance against Buy&Hold Nasdaq100 would be a clear failure of the model... Backtest currently gives 105% pa with 35% drawdown since 2010 but this has to be proven first
Partecipa alla conversazione