I Gave My Terrible Trading Bot $10,000 to Trade Stocks

preview_player
Показать описание
Thanks to DataStax for helping with the Trading Bot.

In this video, I build 3 stock trading bots with $10,000 of my own money to see if I can make a profit.

The first bot uses a mix of momentum trading and value investing on a set of "safe" stocks. It analyzes price and P/E ratio to determine when to buy and sell.

The second bot scans news articles for company mentions. If the news is good, it buys the stock. If bad news comes out about a stock it owns, it sells right away.

The third bot randomly selects a stock, finds related news articles, and uses AI to match them with Taylor Swift lyrics to gauge sentiment. If the lyrics are happy, it buys the stock. When negative lyrics come up, it sells.

I built the bots in Python, used historical data to backtest strategies, and ran them live for 3-4 days. Despite issues with delayed and partial orders through Interactive Brokers API, the bots made a small profit of $109. But after fees, I ended up losing $8 overall.

I learned that algorithmic trading involves complex math and mechanics like partial fills and sync issues. The real winners are the APIs charging for data. But I had fun developing the bots and dipping my toes into algorithmic finance and trading.

None of this would be possible without the support of my viewers on YouTube and other platforms. Thank you for allowing me to take risks like this $10k experiment. I appreciate you watching my coding videos focused on building real projects. Please check the description for a special Discord event and to see other coding projects I've made like a Reddit bot and news bot.

MY NEWSLETTER 💌
------

DISCORD:

CONNECT WITH ME ON SOCIAL

—-
My gear 💻
-----

TIMESTAMPS
00:00 - Introduction
00:30 - Before we Start
01:00 - The 3 Trading Bots
02:02 - The Tech I Will Build With (AD)
03:30 - The First Trading Bot Build
06:10 - The Second Trading Bot Build
08:44 - The Taylor Swift Trading Bot Build
09:14 - Delivering Data Back to the User
10:33 - Deployment...
11:29 - The Results of Bot 1
12:16 - The Results of Bot 2
13:45 - The Results of Bot 3
14:46 - Results of Everything (Win or Loss?)
15:23 What I Learned from Coding This
17:06 The API Pricing.....
17:32 Thank You...
Рекомендации по теме
Комментарии
Автор

Hi everyone! Open sourcing this bot! I am just doing a couple of extra tweaks and security things in order to make it easy to read.

Warning though! The code won't be fun to read! Open sourcing will be an attempt for me to show you what I dealt with and how I did it :)

Should be up by later this week!

CodingWithLewis
Автор

now imagine if you were able to run this for a month let say, the trading fees and other things would become a not that significant cut of your profits, but considering the bots actually perform like this continually.

aravpanwar
Автор

This is awesome. I would like to do this as a hobby. But why do live trading when you can (I presume) do paper trading instead ?

dimitristripakis
Автор

Some of you have been wondering why I haven't been posting as much... this is why! I spent SO LONG on this... I am so glad I can do this! Let me know if you want me to open source the code. (I will remove the Interactive Brokers part lol)

UPDATE: Going to be open sourcing soon. Have been dealing with some burnout and some other tasks. Will get up asap!

CodingWithLewis
Автор

I don't think enough people are apresciating how insane the results from bot 2 are! Even though the profits are not sky high, doing 9 trades and have only a single negative one is mental. I would really like to see it running longer and maybe some updates!

finnskov
Автор

This channel is seriously underrated, I cant believe this kind of content only has this little views. Keep going Lewis!

Arktic_
Автор

The most gratifying thing is reaching a point where we can be the reason for someone else's livelihood. Congrats Lewis.

allergictobs
Автор

I'm not exactly surprised but it was super interesting to me that the news bot was the most "effective" overall. (making the most trades, green on almost every trade) I do seriously wonder what that bot would look like over a month, or even 6 months. However, as you mentioned, API costs are an important consideration

pupdad
Автор

"How hard can it be? Buy high, sell low!"
You sure got me hooked! 😄👍

danielbergman
Автор

The greatest tech channel, Lewis makes videos fun and informative for every developer regardless of their software speciality.

Also the editing is OP

abdulhadeahmad
Автор

Amazing video, loved the graphics and animation you used. Would love to see more about the technical side in future videos. Keep up the great work!

Trimonu
Автор

My man really gave the bot money instead of giving it hypothetical currency and letting it track the value of it for the sake of an effective test

WingedGlider
Автор

The amount of effort that goes into the animations for your videos is insane. I respect the effort + ofcourse the time it takes to write three trading bots :p

bvdlio
Автор

We love u!!!! Ur content is really good, keep it up
U really grew the interest of coding in me, thanks Lewis!!!

djalilattabi
Автор

Awesome video lewis, keep these awesome projects coming!

Firelord
Автор

I stabled across these questions after comparing my research on such bots:
1) doesn't this fall under PDT (Pattern day trading) and wouldnt you need 25k$ in your account to legally trade?
2) what AI did you choose for the news articles and maybe share a video on how you combined those generated stock vectors
3) how did you handle opening and closing hours, was it though the API or made your own script to check the time and wait till open hours?

P.S thank you for the statistics and the whole process/time you spent making this and if possible open soruce it ❤️

Zetornator
Автор

your teaching is insane ur voice is soft it makes easy to understand thank you !

ghsiii
Автор

The effort to make this video is commendable

TheOneWhoKnocks
Автор

Your editing is... just wow, greatest tech channel, seriously underrated

pizza
Автор

"Buy high. Sell low" wow I've never thought of that. If you buy $1000 worth of stock and you sell it when it goes to $900, you'll make a -$100 profits 😮

PanhaNi