Live data from Hacker News

The anatomy of an ML-powered stock picking engine

principiamundi.com

41–50 of 109 posts

Re: The anatomy of an ML-powered stock picking engine

#41

Earlier quoted context omitted.

Great question. If I beat the market by 20% (say SPY generated 0% for the year, very optimistic at this point), and I have allocated $100k to this, I make $20k before taxes. That's less than minimum wage. Meanwhile, allocators expect a track record of at least 3-5 years. Ideally, if I have an asset, I'd like to extract as much revenue as I can. Hope this makes sense.

Learn about hedging. Basically, for $100k, if your prediction could consistently beat some index, you don't just buy a stock, but you sell some other(short) stock/index at the same time. So you own 0 worth of stock but you get the difference in the increase as your profit. Obviously in real world, you would need some sort of deposit, but you could bet millions for $100k.

You're talking about both hedging and leverage and this is a very important difference.

Turning a long-only equity strategy into a long/short strategy or an "outperformance" strategy[1] with added leverage can seriously affect the volatility of returns and the risk of ruin so it's really important to understand well before embarking on this, because it will affect position sizing and a bunch of other things. You can indeed bet millions for $100k, but if your strategy has 10% volatility unlevered you can get completely wiped out in doing so whereas the risk of ruin of the unleveraged strategy is far lower.

[1] You could say long/short is where you long some things and short some other things generally whereas outperformance is where you long some things and specifically short an index. So in the latter case you are betting on the outperformance of your picks in particular and in the former you are just saying you have the ability to pick both things that go up and things that go down.

Re: The anatomy of an ML-powered stock picking engine

#44

Hi, fellow HN'ers! Author here, please let me know if you have any questions or thoughts!

I'm not at all interested in finance / stock picking but found this to be one of the best walkthroughs of an ML system end-to-end that I've ever read. I'm not in the field of ML but I'm interested in learning more and this was fantastic, thank you.

Re: The anatomy of an ML-powered stock picking engine

#45

Hi, fellow HN'ers! Author here, please let me know if you have any questions or thoughts!

I'm not at all interested in finance / stock picking but found this to be one of the best walkthroughs of an ML system end-to-end that I've ever read. I'm not in the field of ML but I'm interested in learning more and this was fantastic, thank you.

Thank you so much for your kind words! Your comment made my day! :)

Re: The anatomy of an ML-powered stock picking engine

#47

Someone asked about how difficult it is to get outside investment.... It's usually very difficult and it takes a lot of money to run a proper fund. Let's say you raise $50M. You can maybe charge 1 and 20,meaning you get 1% of assets each year for running the fund and 20% of profits. 1% of $50M( and keep in mind this is a large raise for someone without a track record on the sell side or inside another fund) give you…

Working in the industry, I can confirm that the above numbers are approximately correct except for the employee costs -- those are roughly double and up. You also need to hire a fund administrator, auditors and compliance firms (maybe $50k to $100k per year each) which add on even more costs. And you can't skip the lawyers, outside administrator, outside compliance, etc. as they are required by regulations/law.

Re: The anatomy of an ML-powered stock picking engine

#48

Nice report. How did you did risk management? Have you been leveraged? Have you paid for data? Kudos for a view from the trenches.

Thank you! >How did you did risk management? I put in a basic position management layer (1% fixed stop). Also, the market regime module would modulate participation, i.e. in really risky environments it would dial down the number of stock picks. I can definitely do much more on this front, but I wanted to nail down the stock picking first! :) >Have you been leveraged? No leverage. >Have you paid for data? Yes, my mon…

Have you looked into Kelly criterion?

Re: The anatomy of an ML-powered stock picking engine

#49

Earlier quoted context omitted.

Thank you! >How did you did risk management? I put in a basic position management layer (1% fixed stop). Also, the market regime module would modulate participation, i.e. in really risky environments it would dial down the number of stock picks. I can definitely do much more on this front, but I wanted to nail down the stock picking first! :) >Have you been leveraged? No leverage. >Have you paid for data? Yes, my mon…

Have you looked into Kelly criterion?

Yes! I use fractional Kelly extensively in my (separate) higher-frequency strategies (on MES/ES/NQ/VX futures).

I'm thinking of writing some follow-up posts on how to reason about ML-driven strategies in an intraday setting. Thanks to low-cost brokerages, there's a lot of alpha that can be captured by small league speculators such as myself.

Re: The anatomy of an ML-powered stock picking engine

#50

Someone asked about how difficult it is to get outside investment.... It's usually very difficult and it takes a lot of money to run a proper fund. Let's say you raise $50M. You can maybe charge 1 and 20,meaning you get 1% of assets each year for running the fund and 20% of profits. 1% of $50M( and keep in mind this is a large raise for someone without a track record on the sell side or inside another fund) give you…

This is actually way too optimistic.

Your first 1-2 seed investors will:

- Only pay 1 and 10 (1% fixed fee and 10% of PNL)

- They will also get ownership of the actual fund management firm and will get that in the form of 20% of REVENUE (not equity, revenue, think about that)

This is one reason new fund formation is way down. The economics are bad for years. Know a bunch of HF people that started vc-backed tech firms instead.

The other reason is 10+ year run where stocks, bonds, private firms and real estate just went up. No need for diversifying return streams.

Post reply on HN