I Built an INSANE Fable 5.2 Trading Bot That Made $89,117 (Full Guide)

Kurzzusammenfassung

Zwei Claude-Modelle entwickeln jeweils 100 regelbasierte Bitcoin-Strategien, die zunächst auf historischen 4-Stunden-Daten getestet werden. Ein bislang verborgenes Jahr dient anschließend als Out-of-Sample-Test, um Überanpassung zu erkennen. Die Ergebnisse zeigen, dass hohe Backtest-Renditen allein wenig aussagen: Drawdown, Sharpe Ratio und ausreichend viele Trades sind entscheidend. Zum Schluss wird erklärt, wie sich eine Strategie in TradingView prüfen und über Webhooks mit Bybit verbinden lässt.

  • Fable 5.2 und Opus 5.5 entwickeln unterschiedliche Strategien und beurteilen Risiken verschieden.
  • Im verborgenen Jahr schneiden einige zunächst schwache Strategien überraschend gut ab; die meisten schlagen Bitcoin jedoch nicht über den gesamten Testzeitraum.
  • Backtests sollten mit Vorsicht bewertet und Strategien vor einer größeren Kapitalanlage zunächst im Demo-Modus oder mit kleinen Beträgen im Live-Betrieb getestet werden.

Einführung: KI-Trading-Bot und Testaufbau

Für den Versuch werden Claude Fable 5.2 und Claude Opus 5.5 miteinander verglichen. Beide Modelle sollen jeweils 100 regelbasierte Bitcoin-Strategien entwickeln. Dafür wird eine TradingView-Mitgliedschaft empfohlen; später zeigt das Video außerdem, wie ein Bot mit einer Börse verbunden werden kann.

Der Test soll möglichst fair sein und Überanpassung vermeiden. Als Datengrundlage dienen BTC/USDT-Kerzen im 4-Stunden-Intervall von Bybit: Die Modelle erhalten den Zeitraum von April 2020 bis Oktober 2025 mit 12.240 Kerzen. Weitere 2.191 Kerzen bleiben als verborgenes Out-of-Sample-Zeitfenster zurück. Gebühren und Slippage werden ebenfalls berücksichtigt, damit die Ergebnisse näher an realen Handelsbedingungen liegen.

Faire Testbedingungen für die Strategien

Beide Claude-Sitzungen erhalten denselben Auftrag und arbeiten in getrennten Ordnern, damit sie nicht auf die Daten oder Ergebnisse des jeweils anderen zugreifen können. Sie sollen ihre 100 Strategien über verschiedene Ansätze verteilen: Trendfolge, Mean Reversion (Handel auf eine Rückkehr zum Durchschnitt), Ausbruchs- und Momentumstrategien, Volatilitätsfilter sowie Kombinationen daraus. Die Regeln dürfen nur Informationen bis zur jeweils aktuellen Kerze nutzen, damit kein Blick in die Zukunft entsteht.

Die Modelle sollen zunächst auf dem sichtbaren Zeitraum arbeiten und ihre Strategien danach auf den verborgenen Daten testen lassen. Entscheidend ist nicht der höchste Gewinn im bekannten Zeitraum, sondern die Robustheit außerhalb davon. Jedes Modell soll außerdem die fünf aussichtsreichsten Strategien samt Begründung, größten Risiken und verworfenen Ansätzen dokumentieren.

Erste Backtest-Ergebnisse der beiden Modelle

Fable benötigte etwa 13 Minuten, Opus etwa 17 Minuten. Die Modelle gingen unterschiedlich vor: Opus führte eine einheitliche längere Zeithorizont-Regel ein, nachdem langsamere Horizonte bei vielen Strategien bessere Ergebnisse geliefert hatten. Fable prüfte die Strategien zusätzlich ausführlicher, etwa über einzelne Jahre, veränderte Einstellungen, höhere Gebühren und verspätete Einstiege.

Fables Top-Auswahl war Strategie S100: Sie erzielte im Backtest rund 791 Prozent Gewinn und setzt auf Ausbrüche, wenn mindestens zwei von drei langsameren Trendsignalen übereinstimmen. Ihr größtes Risiko sind seitwärts verlaufende Märkte mit häufigen Fehlsignalen. Opus wählte S84, eine Ausbruchsstrategie in Richtung des Sechsmonatstrends, die rund 331 Prozent erzielte und ebenfalls in Seitwärtsphasen gefährdet ist. Andere Strategien lieferten teils ebenfalls hohe Ergebnisse; eine Fable-Strategie erreichte beispielsweise 896 Prozent Gewinn bei einem maximalen Drawdown von 41 Prozent. Diese Zahlen sind jedoch kein Beweis für künftige Profitabilität.

Test mit dem bislang verborgenen Jahr

Anschließend werden alle 200 Strategien – 100 von jedem Modell – auf dem zuvor zurückgehaltenen Jahr geprüft. Dabei zeigt sich, dass die beste Strategie im ursprünglichen Backtest im neuen Test scheitert, während eine zuvor schwache Strategie plötzlich gewinnt. Fables S14, eine Strategie mit einem gleitenden 50-Tage-Durchschnitt, hatte im bekannten Zeitraum die höchste Sharpe Ratio von 1,44 und hätte aus 10.000 Dollar rechnerisch 181.000 Dollar gemacht. Im verborgenen Jahr fällt Bitcoin jedoch um 29,44 Prozent, und Fables stärkste Strategie legt in diesem Zeitraum lediglich 3,12 Prozent zu.

Den größten Gewinn im verborgenen Jahr erzielt Opus S10, eine Strategie auf Basis der Steigung gleitender Durchschnitte: Sie steigt um 83 Prozent, obwohl sie über den gesamten bekannten Testzeitraum 67 Prozent verloren hatte. Insgesamt schlagen von den 200 Strategien im Zeitraum 2020 bis 2025 nur zwei Fable-Strategien das bloße Halten von Bitcoin; keine Strategie von Opus übertrifft Bitcoin über den gesamten Zeitraum. Viele Strategien schneiden im fallenden verborgenen Jahr dennoch besser ab als Bitcoin und bieten damit teils bessere risikobereinigte Ergebnisse.

Backtests richtig bewerten: Drawdown und Sharpe Ratio

Der maximale Drawdown bezeichnet den stärksten Rückgang vom Höchststand bis zum Tiefpunkt. Er zeigt, welchen Verlust eine Strategie zwischenzeitlich durchstehen müsste. Bitcoin erzielte im bekannten Zeitraum zwar rund 1.600 Prozent, fiel zwischenzeitlich aber 77 Prozent unter seinen Höchststand. Die von den Modellen bevorzugten Strategien hatten geringere Drawdowns: Fables Auswahl lag bei 49,28 Prozent, die von Opus bei 60,67 Prozent. Solche Unterschiede beeinflussen, wie viel Kapital Trader, Fonds oder Portfolios tatsächlich einsetzen können.

Die Sharpe Ratio setzt die Rendite ins Verhältnis zur Volatilität und berücksichtigt damit das Risiko. Werte über eins gelten häufig als ordentlich; Werte über zwei oder drei können verdächtig sein, etwa wenn nur wenige Trades vorliegen. Bitcoin erreichte im bekannten Zeitraum eine Sharpe Ratio von 1,16, während die beste der 200 Strategien 1,44 erzielte. Im verborgenen Jahr kam Opus S61 auf 2,42, hatte allerdings nur vier Trades – zu wenig, um das Ergebnis zuverlässig zu beurteilen. Bei der Bewertung zählen daher neben Drawdown und Sharpe Ratio auch eine ausreichend hohe Trade-Anzahl und eine robuste Leistung in unterschiedlichen Marktphasen.

Strategie in TradingView übertragen

Eine ausgewählte Strategie lässt sich von Claude als Pine Script erstellen und in TradingView einfügen. Dort kann das Skript gespeichert und im Strategy Tester geprüft werden. TradingView bietet eine visuelle Kontrolle und ermöglicht, verschiedene Zeiträume, Trades und Drawdowns anzusehen sowie unterschiedliche Startkapitalbeträge zu simulieren.

Die Strategie kann anschließend gemeinsam mit Claude verändert und erneut getestet werden. Neue Einstellungen sollten jedoch nicht nur nach ihrem Gewinn beurteilt werden, sondern auch danach, ob sie stabil und nachvollziehbar funktionieren. Erst nach dieser Prüfung sollte man überlegen, ob die Strategie im echten Handel eingesetzt werden soll.

TradingView mit Bybit verbinden und vorsichtig testen

Für die praktische Demonstration wird Bybit verwendet. Wer zunächst kein echtes Geld riskieren möchte, kann ein Bybit-Demokonto nutzen. Bei einem Live-Test empfiehlt sich ein Unterkonto mit kleinem Kapital. Im Video wird für die Einrichtung ein Bybit-Webhook erstellt, ein Asset ausgewählt und die zuvor in TradingView geladene Strategie samt Kapital- und Ordergrößeneinstellungen verbunden.

Nach dem Aktivieren des Webhooks wird nicht sofort ein Auftrag ausgeführt: TradingView wartet auf das nächste Signal der Strategie, sendet dann einen Alarm an Bybit und löst dort die Order aus. Der Betreiber empfiehlt, neue Strategien zunächst einige Monate zu simulieren oder mit wenig Kapital zu testen und die Einsätze erst bei überzeugender Entwicklung schrittweise zu erhöhen. Marktbedingungen wie Volatilität und Handelsvolumen ändern sich, auch wenn eine Strategie in früheren Out-of-Sample-Daten gut abgeschnitten hat.

Die technische Verbindung ist laut Video nicht der entscheidende Vorteil; wichtiger ist, eine belastbare Strategie auszuwählen und ihr Verhalten zu verstehen. Bybit ist eine Möglichkeit dafür, daneben kommen auch andere Plattformen wie Alpaca infrage.

Fazit und weitere Tests

Das Experiment zeigt, wie KI regelbasierte Handelsideen erzeugen kann, aber auch, wie stark sich Ergebnisse zwischen bekannten und verborgenen Daten unterscheiden können. Ein hoher historischer Gewinn reicht nicht, um eine Strategie als zuverlässig einzustufen. Sie sollte auf unabhängigen Daten geprüft und anschließend vorsichtig im laufenden Markt getestet werden.

Für weitere Videos sind Tests mit einer größeren Auswahl bekannter quantitativer Handelsstrategien angekündigt. Eine Anleitung und ergänzende Ressourcen zum Aufbau eines Bots sollen über die Community bereitgestellt werden.

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 „I Built an INSANE Fable 5.2 Trading Bot That Made $89,117 (Full 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 In today's video, I'm going to teach you how to build a fully functional AI trading bot, and I'm going to be using the brand new Claude Fable 5.2 model, the new smartest AI model in the world to test the strategy. I want to know if Fable 5.2 can come up with a profitable trading strategy on Bitcoin. And to test this, I'm going to be putting it head-to-head against Claude Opus 5.5 on 100 Bitcoin trading strategies each. And to avoid over fitting bias, I'm going to test them on a year of data that they've never seen before to keep this test as unbiased as possible. So what do you need for today's video? Well, firstly, you need a subscription to Claude. You can obviously do similar things on GPT, but for the purpose of today's video, I'm using Fable. You'll also need a TradingView subscription if you want to test the strategies on TradingView's Pine Script. And later in the video, I'll show you which exchange I like to

0:45 execute my trades so we can connect the AI bot to a real trading exchange. So before I did anything, I got Claude to set the rules because I wanted to hide a year of trading data to see if this was profitable. This is otherwise known as the out-of-sample period, which is an important aspect of AI trading to ensure that you're not over fitting your data to a specific bias. So what I did is I asked it to download the BTC USDT data from Bybit on the 4-hourly candles. I asked it to fact-check the information. I'm interested to see whether Fable 5.2 is more accurate because it's smarter, so theoretically it should be a better critical thinker. I'm going to ask it to hide the exam so all of the candles are hidden so it can't, you know, pick a strategy based on data that it already sees. It has to find a strategy without seeing the data first. And then there are a few other components of the test like the back tester and the template

1:31 which I also generated using Claude to make this a fair test. So I'm getting both AIs to scan the period between April 2020 and October 2025. So that's 12,240 candles. And the after that, which is staying hidden, is 2,191 candles. I'm also factoring in the trader fees and the slippage to make the results more accurate to a a real-life testing environment. And by [clears throat] the way, once we back test and find a strategy here, I'm hoping that we can start running it on a forward test once we potentially find a strategy which edge. Let's see if Fable 5.2 can do it. So I've got two Claude code sessions open, one with Fable and the other with Opus, so they both get the exact same prompt and each one is locked into its own folder so they can't read the data from each other. So what I'm going to tell it is you are a quant researcher, your job is to find

2:16 strategies for BTC on the 4-hour time frame. I gave it the folder. I'm going to tell each AI to create 100 distinct rule-based strategies, spread them across families. So I want to go wide with this test, so trend following, mean reversion, breakout momentum, volatility, regime filters, and combinations, and I'm asking it to only use data up to the current bar so it can't look ahead at the data beyond that. And after they finish, I want all 100 strategies to be scored on the hidden data from after October, so the out-of-sample period that it cannot see. Strategies that occur fitted to the in-sample data will fail. Optimize for robustness, not for the best in-sample number. That's something that a lot of people in AI trading get wrong. They see these crazy strategies with massive results, but in reality they're overfitted. And if you want to find real strategies that you can actually run in a real live environment, I'll show you

3:02 how to do that at the end of today's video. And finally, I'm asking the models when they're done to write a final file containing the top five strategies ranked, why it trusts each of them to hold up out of sample. So each model's going to give me a single champion pick and the biggest risk to it and which ideas it tried and abandoned and why. All right, let's click run here and see what happens. All right, so this is very interesting. Fable 13 actually only took 13 minutes and Opus took about 17 minutes. So this is weird because Fable should theoretically be the slower model, but maybe it's just more efficient for this kind of thinking. So because they're different models with different inference, they both behave differently. For example, Opus 5.5 applied a single global horizon rule after finding that slower horizons help 80% of strategies. So each one came in with a different logic and approach here. And I think that's why it ended up

3:47 actually taking longer because it thought to do that itself. Another difference in the output before we get into the final results is that Fable actually stress tested everything, so it checked every year on its own, every setting, higher fees, and even late entries that Opus didn't do to the same extent. So it gave me a list of things that I should know before trusting the numbers. Now let's actually look at the numbers. All right, so firstly, Fable's pick, it's S100 which profited around 791% on paper. So if you put in $10,000, it would have turned into around 89,000 at the time. So this is a strategy that only trades breakouts when two out of the three slow trend signals agree. So a breakout is essentially when price pushes past its recent high or low. But it says that the biggest risk to it is a sideways whipsawing market. So this is probably a better momentum trading strategy. Keep that risk in mind because

4:33 I'll come back to it later. On the Opus side, Opus picked S84 which is plus 331% on paper. So its back test is weaker across the board. It takes breakouts in the direction of the 6-month trend. So its biggest risk is also a sideways market which is the same worry that Fable had. In a sideways market, you're better off looking at some sort of mean reversion strategy. And you can see both models came up with a variety of other strategies as well which some of them are actually quite profitable. Like number two here on Fable is quite a strong one. It also has a Sharpe ratio of 1.13. It's actually up 896% in profit, max drawdown of 41% which is another strong strategy. And I can actually prompt Fable and I can ask it why it selected the first test instead of the second test and it will give you its rationale. But we're going to put the all the strategies to the test now to really find what the king is because

5:19 Fable says it's the king, Opus has its champion, but is this really the best strategy? We we need to put it to the test. So firstly, what I want to do is an audit. I'm going to use the session to become the referee and unlock the hidden year and run all the 200, so 100 from Opus and 100 from Fable strategies on it. So I said two AI's each built 100 trading strategies. I need you to prove nobody cheated. I need you to look at the engine. I need you to review the tests and provide the new data and then I need you to give me a report. So let's look at the report of the hidden year. So actually the best back test actually ended up flopping and one of the losers ended up winning that year. So of all 200 strategies, the best one on paper was was Fable's S14, a 50-day moving average strategy. It had the top Sharpe ratio of all 1.44. A Sharpe ratio essentially measures the performance of an investment compared to a risk-free

6:05 asset and adjusts for risk, so it's a risk-adjusted return. So essentially, the higher the better. This turned 10K into 181K on paper, which is crazy. What you have to remember is that Bitcoin in the hidden year is actually down 29.44%. So if Fable and Opus lose less than that, they actually win versus holding the market. But the biggest winner wasn't actually Fable, which made +3.12% during the hidden year. The biggest winner was Opus S10, which was a whole moving average slope strategy, which made 83%. So on paper, it actually lost 67%, but it actually won the test during the hidden year, which is crazy. So these strategies actually won versus Bitcoin during that year. However, on paper for the whole test, out of the 200 strategies over the 2020 to 2025 period, only two of Fable's strategies beat just

6:51 holding Bitcoin, and actually none of Opus's strategies beat holding Bitcoin. So both AI's acknowledged this and leaned on safety instead. So they picked strategies which optimized for better risk-adjusted returns. This is actually really important for people to understand when they get into algo trading and automated strategies, and I've gone really deep into this over the past couple of years. There are two things that are really important in terms of reading a backtest. So the first thing is max drawdown. So the max drawdown is essentially the worst drop from a high point to a low. So it tells you how much pain you would have to sit through during the holding period. So for example, during the paper period, Bitcoin made 1,600%, but at its worst, it was 77% below the high, whereas Fable optimized for less of a max drawdown. So the max drawdown was 49.28%, and Opus picked a strategy that went

7:37 down 60.67%. So although they didn't return as much on paper over the period, they had less of a max drawdown, which is important in terms of getting a strong risk-adjusted return as an investor because if you take on these massive, massive, massive drawdowns, obviously that's not ideal because most portfolios, most traders, most funds will have a max drawdown principle, and that would affect your position sizing. Thus, your real profits might end up being less. So a lot of the time, even though you might see a higher percentage number, it doesn't necessarily mean it's a better strategy. And then moving on from that, the second piece is the sharp ratio. So this is the return divided by how volatile the market was during that period scaled to a year. So if it's above one, it's generally good. If it's above two or three, that's usually a bit suspicious. It could be luck, it could be a lack of trades, it could be a bug. Holding Bitcoin on paper during this period scored 1.16. The best of all 200

8:24 strategies on paper scored 1.44 and in the hidden year Opus S61 strategy scored 2.42, but if you dig into it, it's because it only opened four trades. So that's, you know, suspicious because there's not enough data there. So you want to optimize for a lower max drawdown so you're not dealing with these huge swings. A high sharp ratio and I mean it really depends on the strategy, but ideally a decent trade frequency that has enough data to validate a strategy. What's interesting is that Bitcoin actually fell during the hidden year 29% and almost every single strategy from Opus and Fable performed better. So overall these strategies, although they didn't capture upside as well, they were definitely better and on a risk-adjusted basis a lot of them actually ended up winning. So I'm going to take the top pick from Fable which actually outperformed Opus and then I'm going to put it into TradingView. So you can actually ask Claude to create a Pine

9:10 script. This will enable you to test it on TradingView. Then what you want to do is open up TradingView, click on this little like pyramid icon thing. You want to enter it in, click enter, save it and you can open up a back test and you can go and see. Obviously you can do this on Claude as well, but I do find TradingView's data is, you know, very accurate and you know, it's good to have the visual reference. You can now flip between different time periods and see how much it made over different time periods. You can also look at, you know, what the max drawdown is. You can look at all the trades it took. You can adjust your starting position so you can see it with 10k, 100k, a million dollars, you know, whatever your position is and this allows you to better evaluate a trading strategy. So once you have the final Pine script, obviously, you know, you can now make changes. You can go back and forth with Claude to adjust changes. And what I really like is that Fable is a smart model. So it should be able to help you refine the strategy, make it better. You

9:56 can make improvements, see what's more profitable. And once you refine something, you can then set it up for real. You know, I get this question a lot. Okay, obviously once you back tested something, if you do want to start running it for real, how do you set it up? So I'll show you how to actually set it up and enable it to trade on a real exchange. So I could use the winner Fable. I could also pick strategy 10 which one during the hidden year. Just for the purpose of this, I'll pick strategy 10 just because, you know, I'm just showing you how it would work in practice. I like using Bybit. It has good volume. It has lots of pairs. It has lots of different assets as well. If you don't want to sign up for Bybit, I'll leave a link in the description below. We always have best in class sign up bonuses, so you'll get a better bonus if you sign up through my link if you want to do that. So, I'll leave a link down below. Sign up for a Bybit account. So, you have two choices. You can use a real account. The other thing you can do is you can run a demo account if you want to paper trade. So, if you're going to use a real account, create a sub account, do it with a small amount of

10:41 money so you can start forward testing. If you want to run a demo trading account, you can essentially use the Bybit demo website. Just realizing now that there's a lot of steps, so I'll make it very easy for you. I'll put all of that into a free asset that you can get down below. Just join the school community, click on courses, click on free asset library, and I will give you all of this. You can just literally put it into Claude and you'll know exactly what to do. So, once you have a Bybit account, then you need to go over to Bybit and claim a webhook. I'll leave the full setup guide below, but you basically go into the app. You have to create a webhook, then you can click create now, confirm, select the asset that you want to use, then you want to click run a strategy on TradingView. Click that button and then you can go down to the strategy tester, load your strategy so the Pine Script that we discussed before, enter the capital, the order size, etc. You can run this on a

11:27 demo account on Bybit if you want to use fake money. You can also run this on an account with less capital. So, you know, if you're testing out a strategy, you can always run it with real money, but with much less capital. Typically, what I like to do when I'm testing a new strategy and I have many running at once is I like to simulate them for a few months to see how they perform in the real environment. Yes, you can go a year out of sample, but today's regime, you know, market volatility, volume, etc. can change even, you know, to the prior year that you may have tested. So, I like to run a few months and then slowly scale up the capital as it's performing. You know, unless I have a very specific trigger like, you know, I want to trade a range or I want to trade a breakout or I have some sort of personal bias that I want to express using trading bots, then that is a bit different. Then you want to go back to Bybit and click on the run button and now the webhook is live. It won't trade straight away because it will wait for the, you know, strategies

12:14 next signal. But when it happens, TradingView will send the alert, Bybit will place the order, and you'll see the position on your Bybit page. So now essentially you have a working trading bot. So the real moat is in the strategy incubation, strategy selection, and there are many ways to trigger the trade. Bybit being one of them, it's the one that I prefer and I find to be the easiest. But there's Alpaca, there's, you know, other sites as well. The real source is picking a strategy that works. You know, with a strategy like this, for example, I would just want to run and see how it behaves and understand how it behaves. But on the channel we're going to be testing way more. Today was a fun experiment and hopefully you learned a bit about how to actually create a trading bot. But in future videos we're going to do some crazy stuff. I have a video planned where we're taking thousands of the most famous quant trading strategies and we're dissecting all of them to find profitable ones and we're going to start running them live. There's tons of cool stuff I'm working on, very very excited. But in the link below I'll leave the full guide to

13:01 setting up your own trading bot. I'll leave a link to Bybit, I'll leave a link to all the resources you need so you have them and a summary from this video that'll be in the school community. And yeah, I'll see you in the next one. Have a lovely rest of your day. Hope you enjoyed. Peace out.

Share

Weitere Video-Zusammenfassungen