Using Math to Design AI Trading Strategy from $0 to $10k/Month (Advanced Guide)

Trade Tactics www.youtube.com

Kurze Zusammenfassung

Das Video stellt eine von Claude optimierte Handelsstrategie vor, die mithilfe eines lokalen Trade Engine und VectorBT entwickelt wurde. Es werden die Erstellung eines Strategie-Dashboards, Monte-Carlo-Simulationen, Datensplitting und Out-of-Sample-Tests behandelt. Außerdem werden Risikometriken, Strategieoptimierung, Ergebnisse der Overnight-Strategieiteration, Risikomanagement, Parameterkonfiguration, Bootstrap-Training und die Anbindung an echte Börsen über SignalSwap erläutert. Abschließend werden die Funktionen des Marktplatzes, die Erstellung von Trading-Bots und Alerts sowie zukünftige Tutorials und Entwicklungspläne vorgestellt.

  • Vorstellung einer von Claude optimierten Handelsstrategie.
  • Entwicklung eines lokalen Trade Engine mit VectorBT.
  • Anbindung an echte Börsen über SignalSwap.
  • Vorstellung der Funktionen des Marktplatzes und der Bot-Erstellung.

Vorstellung der Claude-optimierten Handelsstrategie

Der Sprecher stellt ein Dashboard vor, das von Claude Opus erstellt wurde, um eine über Nacht entwickelte Handelsstrategie zu demonstrieren. Diese Strategie verwendet einen lokalen Engine, um Token zu sparen, und optimiert einen Momentum-Squeeze-Indikator mit verschiedenen Ebenen, einschließlich Trade-Exit-Regeln. Der Prozess begann mit einem Netto-Drawdown von 38 % und erreichte 27 % im Sample und etwa 14 % im Out-of-Sample mit einer Sharpe Ratio von 0,86. Der Sprecher betont, dass diese Ergebnisse in nur einer Nacht erzielt wurden.

Aufruf zur Kanal-Subskription

Der Sprecher fordert die Zuschauer auf, den Trade Tactics YouTube-Kanal zu abonnieren und die Like-Taste zu drücken. Er bietet an, Kommentare zu beantworten, insbesondere in den ersten Tagen nach der Veröffentlichung des Videos, und Fragen zu seinen Systemen, der Einrichtung und dem Auffinden seiner Strategien zu beantworten.

Aufbau einer lokalen Trade Engine mit Vector BT

Der Sprecher erklärt, wie er seine lokal laufende Trade Engine mit einer benutzerdefinierten Version von VectorBT aufgebaut hat. Er empfiehlt die Installation von Claude über Visual Studio Code und die Verwendung der Installationsbefehle aus der Claude Code-Dokumentation. Die Interaktion mit Claude erfolgt in natürlicher Sprache, was die Bedienung vereinfacht.

Strategie-Dashboard und Monte-Carlo-Simulationen

Der Sprecher zeigt ein Dashboard, das von Claude erstellt wurde und Trades und verschiedene Simulationen anzeigt. Die Monte-Carlo-Simulationen werden als Stresstest verwendet, bei dem ähnliche Daten randomisiert werden, um die Konsistenz der Strategie zu überprüfen. Der Sprecher betont, dass Claude diese Details nicht kennt und dass ein System wie VectorBT erforderlich ist, um eine Strategie zu entwerfen, die Preisdaten herunterlädt.

Datensplitting und Out-of-Sample-Tests

Der Sprecher erklärt den Prozess des Datensplittings, bei dem 60 % der Daten für das Training und 40 % für die Verifizierung verwendet werden. Er betont, wie wichtig es ist, die Strategie mit Testdaten zu verifizieren, nachdem gute Parameter für die Trainingsdaten gefunden wurden. Die Out-of-Sample-Testdaten sollten erst dann angezeigt werden, wenn eine zufriedenstellende Konfiguration gefunden wurde, um Bias zu vermeiden. Der Sprecher warnt davor, die Strategie über die gesamte Historie zu optimieren, da dies zu Verzerrungen führen kann.

Risikometriken und Strategieoptimierung

Der Sprecher betont, wie wichtig es ist, nicht nur den Nettogewinn zu maximieren, sondern auch den Netto-Drawdown zu minimieren. Er erklärt, dass ein hoher Nettogewinn mit einer guten Sharpe Ratio einhergehen sollte. Der maximale Drawdown sollte niedrig sein, um das Risiko zu minimieren. Er vergleicht verschiedene Strategien mit unterschiedlichen Gewinnraten und Sharpe Ratios, um zu zeigen, wie Claude die Parameter und Regeln modifiziert hat, um bessere Konfigurationen zu finden.

Ergebnisse der Overnight-Strategieiteration

Der Sprecher betont, dass alle gezeigten Strategievariationen über Nacht generiert wurden, während er schlief. Er vergleicht eine frühe, schlechte Version mit einem Netto-Drawdown von 38 % und einer Sharpe Ratio von 0,43 mit einer späteren Version mit einer Sharpe Ratio von 0,59 und einem niedrigeren Netto-Drawdown. Er erklärt, dass er Claude angewiesen hat, die Strategie progressiv über Nacht zu iterieren, ohne sein Zutun.

Risikomanagement und Parameterkonfiguration

Der Sprecher erklärt, dass jede Ebene, die dem System hinzugefügt wird, das Risikomanagement verbessern muss. Jeder Parameter ist so konfiguriert, dass er sicher, breit gefächert und verallgemeinert ist, ohne auf bestimmte Datensätze hyperfixiert oder kurvenangepasst zu sein. Er erwähnt die Verwendung verschiedener Bootstrap-Datensätze und betont, dass die Parameter so gewählt werden, dass sie in allen verschiedenen historischen Versionen gut abschneiden.

Bootstrap-Training und schlechteste Performer

Der Sprecher spricht über die Bootstrap-Trainingsmetriken und die Analyse der schlechtesten 5 % der Performer. Er erwähnt die Pass-Rate, die Fail-Rate und den Runup. Die endgültigen Parameter werden nicht nur aufgrund der besten Leistung in einer Metrik ausgewählt, sondern müssen über alle Metriken hinweg ausgewogen sein und in allen verschiedenen historischen Versionen gut abschneiden. Die Strategie muss auch in den finalen Out-of-Sample-Daten gut abschneiden, um nicht verworfen zu werden.

Anbindung an echte Börsen über SignalSwap

Der Sprecher erwähnt, dass die Strategie mit echtem Geld an einer echten Börse eingesetzt werden kann, indem man sich über signal swap.io mit Bybit, AEX Pro oder Pinex verbindet. Die Website befindet sich derzeit im Alpha-Test. Benutzer können ein Konto erstellen, zum Dashboard gehen und Bots erstellen und verwalten. Der Sprecher bittet um Feedback im Discord, falls Fehler auftreten.

Marktplatz- und Bot-Publishing-Funktionen

Der Sprecher erklärt, dass Bots, die bestimmte Kriterien erfüllen, auf dem Marktplatz veröffentlicht werden können. Nur Bots, die in Echtzeit performen, werden angezeigt. Es gibt Stresstests, um die Robustheit der Bots zu überprüfen. Benutzer können ihre vollständige Historie anzeigen und, falls robust, ihren Bot auf dem Marktplatz anbieten. Alle Daten sind Live-Performance-Daten, und die Schlüssel sind verschlüsselt. Benutzer können Backtests anhängen und den Großteil der Einnahmen aus Abonnements für ihren Trading-Bot behalten.

Erstellung von Trading-Bots Schritt für Schritt

Der Sprecher erklärt, wie man einen Bot erstellt, indem man einen Bot-Namen eingibt, eine Börse und ein Handelspaar auswählt und optional Backtest-Ergebnisse hochlädt. Benutzer können die Höhe des zu handelnden Betrags, die Auftragsgröße, den Hebel und die Art des Hebels festlegen sowie Stop-Loss und Take-Profit festlegen.

Erstellung von Alerts und Webhooks

Der Sprecher erklärt, wie man den Bot mit TradingView integriert, indem man die generierte Webhook-URL und die Alert-Nachricht kopiert und in TradingView einfügt. Benutzer können einen Alert erstellen, ihre Strategie auswählen und die Alert-Nachricht einfügen. Die Webhook-URL wird in das Benachrichtigungsfeld eingefügt. Nach der Bestätigung und dem Deployment des Bots wird dieser im Dashboard angezeigt und kann dort verwaltet werden.

Zukünftige Tutorials und Entwicklungspläne

Der Sprecher kündigt an, dass er weitere ausführliche Anleitungen zur Installation und Ausführung von VectorBT geben wird, um Stresstest-Systeme wie das gezeigte zu erstellen. Er plant, auf Pine Script umzusteigen und sich mit seinem eigenen Signal Swap-Signal zu verbinden. Er wird seinen Wolfpack Elitebot 2 auf dem Signal Swap-Marktplatz veröffentlichen. Er fordert die Zuschauer auf, den Kanal zu abonnieren, das Video zu liken und Kommentare zu hinterlassen, die er beantworten wird.

Fasse jedes YouTube-Video in Sekunden zusammen

Hol dir Zusammenfassungen wie diese für jedes Video, in deiner Sprache, mit der kostenlosen Summ-App.

Laden im App Store
Jetzt bei Google Play

Transkript

Vollständiges Transkript von „Using Math to Design AI Trading Strategy from $0 to $10k/Month (Advanced Guide)“. Klicke auf einen Zeitstempel, um das Video an dieser Stelle zu öffnen. Du brauchst ein anderes Video? Nutze den YouTube-Transkript-Generator.

0:00 This is the dashboard that I had Claude Opus create me to show you guys the strategy that I made overnight. I went to bed and it worked straight for eight hours and it did not use that many tokens because the engine that it's using is local. So, it launches it goes Claude goes to sleep and then it starts its work and it creates and optimized this strategy. Here is the parameter set. It's a momentum squeeze indicator with several layers including trade exit rules and it to get to this point we started way back. We started with 38% net draw down and we got down all the way to 27% in sample and in out of sample is able to achieve around 14% net draw down with 0.86 sharp ratio which is almost a sharp

0:46 ratio of one which is ideally my target and it did that only in one evening. So, if you're not subscribed to the Trade Tactics YouTube channel yet, then what are you doing? Hit the subscribe button and the like button. And if you comment down below, I will respond to your comments. If you comment in the first couple days of posting the video, I'll respond to any question that you have about my systems, how to set this up for yourself, where to find my strategies, or anything else like that. So, if I go over to my Claude Opus, what I have here, this is my my setup. So I have four different dashboards and I can show you how they they look here. It went through these one by one overnight and I have a fivephase approach overnight. So this is kind of my system prompt here. So I have a backbone that it starts with. So it started with that momentum

1:32 squeeze. It moved on to fa phase two and it wanted to verify the directional filters and then phase three it can create new flat filters like chop indexes, things like that rule out bad trades. Then it looks for the exit rules and it keeps going. It'll scrap them and create new ones. I have on my machine now probably 50 or 60 different totally custom indicators that it built overnight entirely unattended. So yes, I it it's telling me here what's in the prompt, but I literally go to sleep and wake up with a fully optimized strategy. I'm not kidding here. So how I built this trade engine that I have running locally, it's using a custom version of vectorbt. Now vectorbt you can just ask claude. So if you haven't installed

2:18 claude, you would just download Visual Studio Code, which is just at code.vvisisualstudio.com. Just hit the download button for your machine. And then if you go to the Claude Code documentation, all you need to do is use the install commands right here. So super easy to follow. It really is just just installing Claude and then when you run it runs right in your command line. So instead of having to act like a hacker and type all these super hard to remember commands, you can just talk to Claude in your natur in just natural language. So if you haven't experimented with it, I highly recommend trying it. It's extremely powerful. I mean it was able easily to build me this dashboard here where I can show you all of the trades and the different simulations here. These are the meat and

3:04 potatoes of the stress test. So the the original training data here, this is the full data frame for Solano, the 1 hour chart here in the top right or the top left corner. You can see Solana, you can see the parameters here. You can see some of the results there, but it's better displayed in my table here. And what you have on the right hand side, this is just a demonstration of the Monte Carlos simulation. So for example, it will take this this sample of data and it'll make similar data and then it'll randomize it again and again and again. And if your strategy can consistently perform in these simulations, the machine counts it as a pass. Now Claude doesn't know any of this, right? I have my own engine. You have to use a system just like VectorBT. You have to ask your claude to design

3:50 you a a vector BT strategy or an engine that downloads price data. What I'm doing here number one is acquire the data. You have to reach out through an API to the exchange. It's free to do. Download the price data and then you start splicing it up. So you can do 60% of the data you reserve for training your system. And then 40% is verification or you could do 70 30 different splits like that. And then you start once once you ac once you find good parameters that work on the training data then you can verify with the testing data. Does it still perform on the testing data or not? And you only want to show the out of sample testing data. you know, once you're happy with a configuration because there's no cheating or peaking involved that would invoke bias. Now, with a normal trader, let's say you open your trading view and you have a strategy and you do not want

4:38 to be the kind of person who opens up their their strategy and starts doing deep back tests like let's say the entire history. We optimize our report. Notice how Trading View takes painfully long here and on our local system it does thousands of back tests per second. So you don't have to wait for Trading View servers to so basically you know you can you can convert your strategy into Pinecript and run your signals through their servers which is reliable. That's what I do. But here if I were just to optimize on the entire data set here you see how it took 10 seconds where as you know my back testing engine here will do thousands of back tests per second. uh just as a as kind of another pro. Uh even though Training View has some cons, it does have its pros, too. Like it will send web hooks 24/7 no matter what cuz they have servers for

5:23 it. The thing is this is cheating if you just train on all the data at once or try to maximize the net profit. Don't be the person who just tries to maximize net profit only. You want to minimize net draw down on it. So this is an example of exactly what not to do because if that net profit looks really high, what's the sharp ratio at? Right? Scroll down here. So let's let's look at some of the other metrics, right? Don't get ahead of yourself and compare to the buy and hold and then yeah, your net profit as a result of having a sharp ratio of, for example, like 0.86, your net profit will be good just as a result. But if you're putting real money on the line, you want your net uh your max draw down to be really low because that's your risk, right? And Sharp does take into risk uh risk as well. And Certino as well. Certino ratio is really

6:09 good, too. So these numbers here match Trading View's math, but I have other strategies here. So I'm just flipping back and forth just to show you kind of 40 4% win rate. This one has 48% win rate. So different vari Let's just flip back here for one second. This was on the wrong one. So we're going on the the training data. We have a 43% win rate. This one is 48% win rate. So you know that's one of the metrics to compare in the in sample data. 0 59 sharp ratio.56. Of course, sharp is such a good metric, right, to maximize for and 27% draw down. 27% draw down. You can see here the parameters are changing. It has different rules because Claude used the engine and it modified what it was putting the math that it was putting into it and it found that this configuration on net was better with

6:56 these parameters. So, it has different thresholds for the exits, the exit rules as well. This one doesn't have as many. And then if I go back further, we have even more variations. Now, all of these were in one night. I was sleeping while this was happening. I'm not lying to you. I was asleep and it generated all of these. So, we started out with this really terrible version. 418 net profit with 38% net draw down. Sharp ratio is only43. And we came up to sharp ratio 0.59 with net profit is 619. So far better on every single metric. Net draw down came down. And it's because I told it to. I told it to iterate this way progressively overnight with no input from me cuz I was asleep. And again, this didn't blow out my claw tokens because yes, it has to develop the

7:42 trading rules. It has to develop the actual trading math, the computation, the algorithm that it's trading with, right? It's not just a simple EMA. This is far more complicated momentum squeeze and then we're having all the different filters in it. And we're we're not contaminating our data. All of these are separate tests for separate validation. So as it progressed, it found that there was certain ones that would add benefits and then there was drawbacks to some of them. So it wants to find the best of all worlds. And that's how that's how I prompted it. So the the again the key takeaway is that each layer that it adds to the system has to improve the the risk management. It can't we're not just adding all of these for nothing. every single parameter is configured to be the

8:28 safest and more broad and generalized. It's not hyperfixed or hyper tuned or curve fitted for any specific data set. Again, we have all of our different data sets here, the different bootstrap data frames. And I didn't just make six bootstrap data frames. There was thousands and it runs them all and it has to pass in a certain majority of them. Now, in the worst simulations, for example, if I scroll down to the detailed metrics, the here's the bootstrap training metrics. the worst performers like the worst 5%. We can see that, right? So, we can see the the pass rate, we can see the fail rate, we can see the runup in involved as well. And all of these metrics, it's it's choosing its parameters. The way that it got to these final parameters is not just so straightforward as picking the best the best one for one metric. It has to be

9:14 balanced across the board and perform well in all different versions of history, all of these different variations. And then I have the final out of sample data here that it also has to perform in. If it doesn't perform in here, it throws in the garbage. Now any of these the the way we got to sharp 0.86, which again, if I kept going with this, I could probably get over sharp one, right? This was just one evening that I iterated. So if I kept if I just focused on net profit alone, you know, if I didn't focus on how much divergence is there between the the insample data, which is this here, and if I scroll down to the out of sample data, how much divergence is here, right? If I didn't focus on that, most people don't even care because in real time that also counts as out of sample data. And here's the out of sample data. And you want it to per perform well in data that you

10:00 specifically withheld that you didn't show your algorithm until later because you're showing it new unseen stress that it has to re uh respondse to. And in real time when when data goes forward in real time, if you hook this up to real real money, real signals on a real exchange, which by the way you can do by going to signal swap.io, you can connect your signals for free as well. You can connect Bybit, AEX Pro, Pinex as well. All three of these work and we are currently in alpha testing. So you can just come to the website. A lot of people were trying to uh register for the alpha testing. So I opened up the website. There's no password to access the website. just come create an account, go to the dashboard here, and you'll be able to see all of your the

10:46 bots that you create. It's really easy to set up bots, and it's really easy to manage them live. So, you can just click on a bot once you've created it here. You can see the live data feed here, and you can see, you know, all of your back testing results and the trade history as well. So, if there's any errors or anything like that, let me know in the Discord, come through the Discord link is down in the description. And you can publish it to the marketplace if it meets certain criteria. And we only show on the marketplace spots that are performing in real time. There's no um fake fake way to back test it. We do have stress tests like we have a back testing machine just like I'm showing you in this video. And you can just drop drag and drop and it will optimize it for you. It'll pick the best parameters and it'll tell you if it passes the stress test. For example, you could show your full history here whether it's robust or not. And if it is robust, you

11:32 can take it onto your bot on the marketplace that we have. So really cool system. All of the data is live performance data. So the graph you see here is the the signals that we received and there's encryption. So your keys are safe and there will be there's a back testing tab here. You can attach any back test and you can publish and keep the vast majority of your trading uh revenue that comes through the website for subscriptions to your trading bot. So you have a really good trading bot. You can upload it to the marketplace. You do not have to attach back testing as well, but it does go a long way to have a little badge there that shows that you stress test it to proves that the parameters actually do what they say that they're doing. And you know, the live the live trading is good, but with stress test, it's even better for building trust. And it's really easy to just create your bot here. I'll go over

12:18 to the bot tab. You just hit a bot name, select your exchange from the drop-own menu, Apex, Pinex, or Bybit. Choose your trading pair from the drop down. And then you can optionally upload back test results there from the other screen I was just on. And once you select uh once you select it, let's just fill this in really quick. Once you pick your pair, you can just fill in the amount that you want to trade, flat order size, percent of equity, you can set leverage, uh the type of leverage, market or limit order, stop loss or take profit as well. And once you do all of that, you can connect it really easy to the uh your Trading View integration. So web hook URL alert message. So basically these are just generated for yourself. Keep these private for yourself. Just copy that web hook URL and copy the alert message. Once you're in Trading View, just create

13:05 that alert. Really easy to do. You can select your strategy once you configure it and and paste the alert message into this box here. Give it a nice name. And then for the notifications, just paste the web hook URL into this box here and click create. And it will be live once you click the confirm button and deploying the bot. It will show up for you in the dashboard right here, centralized. So, you can just scroll through all of your bots. Click it and manage it right there. You can hit pause. You can publish it to the marketplace if it's performing. You can keep an eye on the signals and how it's doing with the graphs as well in the metrics tab right here in this test bot. So, really, it's free to join, free to use. And yes, back testing is paid, but it obviously uses servers. So, that will

13:50 be up in the following week. just figuring out the finalizing the servers for it. But the system is technically working just has to be uh finalized for you guys. So it is an alpha testing just a note but yeah signal swap.io and that's going to be the video I will do more in-depth instructional showing you live how to install vectorbt and how to get vectorbt running so it can build stress test systems just like this one. I'm probably going to convert over to Pine Script and then hook up to my own uh Signal Swap signal. So, I will I will probably be publishing this on a single swap marketplace. I have my Wolfpack Elitebot 2, which my bot uh you can find my bots down in the description of the video as well. But, hit the subscribe button, like the video pushes it further

14:37 in the algorithm. I really appreciate it. And I'll be responding to comments. Any comment you have down below for the next little while, I will be responding. if you're uh new to the channel.

Share

Weitere Video-Zusammenfassungen