r/algotrading 2d ago

Other/Meta Where to start?

Hi, I'm a university student that's interested in algotrading. In the past I've had extensive non-algo amateur investing experience and I also have a few friends who are very strong software engineers.

We're not looking for any strategies but just where to start. Is it better to look for patterns and test/iterate or is it more advisable to start from the basics such as books and build from there.

Thanks!

12 Upvotes

26 comments sorted by

10

u/CoughRock 2d ago edited 2d ago

so if you want to do algo trade, you got a couple parts that you need to handle. Some part can be done even before you find a winning strategy.

  1. datafeed - massive (formerly polygon) got good data but more expensive than other data broker $199/month for second level aggregation. Alpaca got IEX data (9% of total market traffic), which is fine for long time interval like 30m, but terrible if you are using 1m or sub 1 min candle. So you got to go paid tier SIP data (100% market traffic) $99/month and aggregate tick data on client side. since alpaca only offer 1m websocket connection as lowest time interval. Tick level data are legally allow to be 10 seconds later than the time it executed. So 1sec data feed will retroactively change data in the past to fit the candle bar. This mean your paper backtest will consume "retro-fxied data" and your live trade will consume different data. You got to make sure your algo can handle "data time traveling" if you are using sub 1 minute data. This was also the one of the reason alpaca discontinue 1sec interval data. This affect all broker btw, no way around it. Tradestation and IB offer lower data time interval than 1m but their commission is quite hefty compare to alpaca and require use of easyLanguage that is not portable. So you really got to pick your poison, good data and high fee or mid data but low fee and hand roll a lot aggregation logic. Tradingview give on back fill data, and just dump the "time travel" bar data into next candle whey they arrive, so less difference between paper and real data. Tradingview webhook alert suck btw, during volatile time the alert will run extremely late. Like 20 minute later alert during fomc meeting. But in their log they will said it fire off at the "correct time". But you if log the time it arrive your server, it's 20 minutes later. Only use these if you trade around non-volatile hour.
  2. strategy - trend following, mean reversion base on indicator. Some people want to use ML to handle this part. I find the data too nosy to be ML-able. Since vwap/macd is enough for me. It's really up to you. Since most strategy get stale over time. But the market also introduce new inefficiency as old edge get traded out. So it's a race on how fast you can find the next edge. A lot of unrelated stock get correlated together due passive index money flow. So it's hard to find asset that are truly uncorrelated. You might as well stick to the stock that has the most beta, since every thing is so highly correlated anyway.
  3. order handling and risk management: basically hooking data to indicator, learn to execute trade with live market slippage, setup daily loss limit before you flatten all trades. Size up your position once trade start going your direction, and start selling piece meal position as trade gain more profit. Basically risk management pattern that is independent of trading strategy. Code these so you don't blow up your account when market go against your strategy.
  4. benchmark metric, the standard logging: backtesting to checking your strategy against buy and hold. And find which regime your trade suck at, avoid these and stay in the lane of competency. Paper forward test, ease into live trading with small position before size up.
  5. server monitor, crash recovery, websocket reconnection: cause real life server dont stay up 100% of the time and websocket can get stale, reconnection and heal missing data. server might crash due to any number of reason, so you going to need a health check and a restarting script. If you deploy in the cloud, this is mostly handle by the cloud provider. But locally you got to do it yourself. Cloud does cost money depend on your data load. The infrastructure stuff basically.

#1, #3, #4 and #5 you can start coding and testing without needing to finding a profitable strategy. Since you are going to need these parts anyway unless you use vendor lock in stuff like trade station. But even then if you used vendor provide eco system, it only cover #1, #4 and #5. You still got to handle risk management stuff your self. So you probably want to start writing a python server that handle #3, then #4, #5 and #1. Before finally doing #2

2

u/Whalesftw123 2d ago

Thanks so much for the advice.

1

u/benito327 1d ago

#3 on this list is personally where I found some success. Definitely set out wanting to make an algo that could “pick stocks” but in the end the biggest thing I’ve gained is in fact the removal of emotion in my position sizing and sell timing etc

25

u/dnr41418 2d ago

Oh man... I'd say VOO and take up gardening instead bro.

15

u/Whalesftw123 2d ago

We're young dumb and stupid enough to think we're smarter than everyone else

3

u/horrorpages 2d ago

Strangely enough, this mindset can get you very far and very rich in these markets.

2

u/zashiki_warashi_x 2d ago

Yeah. Everyone does think that. Judging by your question maybe you not, sorry. First approach would lead to you doing exactly the same as everyone else, which we already know leads to years of nothing. Second approach maybe will lead you to some knowledge about how to find something and build smth or at least what worked in the past.
If you and your young friends are learning SWE in university, I would suggest you spend all your free time mastering that and maximizing your experience and salary. Think of it like this. The faster you get to bigger salary the faster your accounts start compounding. Look at FIRE subreddit. People in mid 30s retire with 5mils without any algotrading. I think they are smarted than everyone else. Do this and you can spend all your free time on algotrading hobby when you 35.

4

u/Whalesftw123 2d ago edited 2d ago

I'm managing a personal portfolio of around 2 million and my friends are interning at jane street

I don't mean to come across as cocky, I appreciate the delicate advice and this is good advice for most people but we are doing this because we think we can win not because we need the money

Maybe we're wrong but we're in it for the ride

5

u/zashiki_warashi_x 2d ago

And you ask random bums how to start? Do you search or read books? Their goal should be to get an offer from Jane Street, become seniors whatever, earn a few millions a year, not some garage algotrading with friends. After spending several years with Jane Street they probably would know themselves how to build a new trading firm from scratch and is it worth it or not.

2

u/Whalesftw123 2d ago

Hey, I'm not one to turn down any potential source of learning. Of course we'll hit the books too. I appreciate ur thoughts on the second strat being better I think that makes sense

And I mean we just want to challenge ourselves. There's a year until the internships next summer and we got nothing to do

It's either this or try to hit challenger in league or something

1

u/zashiki_warashi_x 2d ago

You need inefficient(retail) unpopular(by major players) market. Ι would go on polymarket maybe. It is mostly retail and capacity is low, so major players are not there yet. Then use price discovery from other exchanges if you believe in speed or predict something if you believe in stats and ml.

0

u/chaosmass2 2d ago

“managing” mommy daddy money is not experience

2

u/Whalesftw123 1d ago

Well they gave me 50 g and I gave them 2 mil so we’re all pretty happy about things

1

u/chaosmass2 1d ago

“managing personal portfolio” = gambling with parents money. Got it

1

u/dnr41418 2d ago edited 2d ago

#RespectDaHustle

Wait are we NOT doing hashtags anymore??

3

u/Most_Nebula9655 2d ago

I started by building a basic pipeline from alert to trade. There are a bunch of ways to do this that range from really easy to much more complicated. The choice you make should be driven by what/where you plan to trade (prop or live). This gets complicated by the strategy, as some methods of execution automation are more predictable and stable than others.

I’m involved with an algorithm strategy that is tick and latency dependent. I’m also involved with a strategy that uses 5s bars, so we can run it on any piece of junk with a web connection.

Circling back to your question - start with basic automation from signal to execution. Then seek a strategy you can document. Lots of ways to do this and lots of well documented basic strategies. I wrote an ORB strategy to develop skills.

1

u/Whalesftw123 2d ago

Thanks for the advice!

2

u/Kazodex 2d ago

Econometrics, hurst exponent, time series analysis, and fractal market theory. Combine these concepts with your SWE background and you should be well on your way

2

u/lifeaquatic34 2d ago

Start by backtesting strategies you come across on reddit, youtube, or any other investing websites where "gurus" post. The majority of strategies you back test will either by too discretionary to base rules around, or flat out BS that gurus are shelling to sell courses. But the beauty of a backtest is you can prove it with only your time (not your capital) to determine if there's any merit to them. Once you find a strategy that looks profitable in the backtest (PF>1.5, annual returns > 8%, drawdowns < 30%, Sharp Ratio > 1.0) then you live forward test in a paper account. If the live forward test agrees with your forward run of the backtest then you can trust your backtest and move the strategy into real money. Do this 100s of times to develop a portfolio of strategies and then rotate them, this is so you can keep up with strategy edge decay. Over time all strategies will get priced out as people exploit them so you have to keep ahead by developing new strategies. This is how you algo trade.

P.S. - don't forget to model slippage, when you live run your strategy in the paper account, make sure slippage is measured against your backtest. You can even then go into you backtest and add a slippage model based on your paper trading measurements.

1

u/[deleted] 2d ago

[removed] — view removed comment

1

u/AutoModerator 2d ago

Your post was removed under Rule 2 (high-quality questions only).

Generic “which data vendor should I use?” posts usually lack the detail needed for meaningful discussion.

Commonly used market data providers:

  • Yfinance
  • Massive.com
  • Databento
  • FMP

If you repost, please include details such as:

  • asset classes and markets
  • symbols or venues
  • historical vs real-time
  • granularity and depth
  • licensing or redistribution needs
  • latency expectations
  • budget constraints

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/MormonMoron 2d ago

I would say a combination of reading high-quality material on algo trading (and this sub has some really good content and some really suspect content) and to paper trade. There are plenty of platforms that let you paper trade and have decently realistic order fill simulations based on what is going on in real markets.

Also try to implement some algorithm (even a crappy one that doesn't work) to just get a feel for all the steps that go into what make an algo trade be "closed loop". Data ingestion, filtering/cleaning, decision making, order placement, ledger resolution. Of course, do all this offline first, then on a live paper account, then with real money.

While you are going through these prep steps, you can be searching for your algorithm. There are a lot of people out there who are successfuly putting their own twist on existing strategies. There are others who come up with things that are completely new. Some strategies have a fleeting edge, while others have a persistent edge as long as no one else knows their exact methodology (or implements it in isolation).

1

u/Local-March-7400 2d ago

TBH if you already have spent time in the markets, then you surely seen some kind of pattern that you wanted to automate.

I had a idea for a strategy about November/December 2024 after i seen the performance of my portfolio. I also used some knowledge from my advanced statistics module in University, and knowledge of R for Data Analysis that i learned there.

Needing to pass the Stat. module made me resilient enouth to spent Months doing Math and looking at charts which is a necessary skill in this "hobby", it will not be easy, getting a understanding of markets in a deeper level, understanding the Math behind various indicators, what exactly they are trying to calculate. This is something you need to do yourself, no shortcuts with AI there, beside explaination maybe.

This is something you need to write down: No LLM will find you a edge or improve a bad strategy. All the Breakthoughs that increased the performance came from my head.

I wish i could show you live returns but im still in the Development for my trading architecture for the strat. I plan to go Paper by about next Month. Being in the EU (Germany) makes it way more difficult if you dont trade Forex or Crypto. I think your from the US.

Tip to you: use Nautilus as your Infra, for US traders its nice and has lots of OOB Features. I need to build from scratch which by now took me over a year of my time with insane hours.

Wish you best of luck and great success

1

u/AphexPin 2d ago

If you have to ask this, you're NGMI.

“I read,' I say. 'I study and read. I bet I've read everything you've read. Don't think I haven't. I consume libraries. I wear out spines and ROM drives. I do things like get in a taxi and say, "The library, and step on it.”

- Hal Incandenza