Live data from Hacker News

Building AI Trading Systems

dennybritz.com

51–60 of 109 posts

Re: Building AI Trading Systems

#51

Earlier quoted context omitted.

It sounds like a lot of fun! I love the idea that there’s one metric ($) to measure the effectiveness of your strategy/code. Any recommendations or hints on where to get started (assuming I’m decent with python/pandas etc)?

Yes! 1. I would start in the numerai tournament, I did this for 3 years after the first two years of me by myself on the market. It's useful because they provide ml ready data, and you can iterate very quickly. If you do not have ML experience numerai will teach you about many different types of overfitting and the many correct and incorrect ways to deal with them. An example would be some ML people always apply drop…

I see you posted you are at break even since 2012. Most people wipe out in 3 years so good job.

I recommend trading manually to feel and listen to the market so that you can adapt your code to it. Also, maybe you are overthinking your strategy so don't hesitate to remove parameters.

My discord is open you can join it and see my trades and look to find any insights from what I enter.

Re: Building AI Trading Systems

#52
post #9

I tried doing some forecasting with various neural network models after assembling what I thought was a good amount of forex data. The neural net (I tried various architectures) couldn't do any better than chance. After playing around with it and trying to double-check everything, that was as far as I could get. This puts me ahead of most traders, since most of them lose money, then quit. This makes me wonder what ki…

In a literal market, you can find alpha in tomato trading by:

(1) monitoring other people’s tomato transactions in as much detail as possible;

(2) spying on people who are about to buy tomatoes and rapidly make changes behind the scenes just before they make a purchase; or

(3) pointing voice analysis at The Food Network looking out for recipes that call for fresh tomatoes, tracking tomato tankers in major sea lanes, monitoring storm tracks in the top tomato growing zones, etc, and adjusting your position appropriately.

It sounds like you are trying (1) when (3) might be better, or even (2) if you are not jail-averse (or your local jurisdiction has institutionalized high speed market fiddling to the point of being legal.)

Re: Building AI Trading Systems

#53
post #6

Earlier quoted context omitted.

Probably not very good. Voleon does all ML-based trading and what I've seen of their returns does not give me any confidence in ML-based trading having alpha. I would estimate that at best in a good year returns would be like 5% y/y in the long term, much less than the sustained ~7% that index funds offer especially when adjusting for risk. Just speculation but there's a lot of firms with much more capital, better to…

I think you're comparing apples to oranges here. These funds manage billions of dollars of client money, which forces them into highly liquid markets with scalable strategies. That's quite different from how individuals or smaller prop funds can operate, trading off capacity for higher returns by trading in less liquid markets or with strategies that are "not worth it" for large hedge funds. If you must manage billio…

>These funds manage billions of dollars of client money, which forces them into highly liquid markets with scalable strategies.

Obviously this is true, but I think you're missing the point. Trading with ML on price data is a strategy that literally anyone can reproduce and, as is evident by reading the comments in this thread, is something that many people have tried to replicate. In that context, everyone using that strategy is effectively acting as a large fund. Further, a large fund or prop shop can deploy small-scale strategies, I think the limiting factor really tends to be leverage. But if they are just trying to make 5% returns for example, they can deploy a lot of small strategies that make ~5% returns. And that's not mentioning the countless tiny shops operating under the radar trading Remember that you are trading during one of the longest bull markets in history. It's not hard to make good returns, but it is hard to analyze risk. There are a million and one ways to make 100% y/y, but a fraction of a percent of those will continue to work in the long-term. With a black-box model you cannot properly assess risk. Even with well-understood models, this is something that real industry players struggle with: backtrading alpha != simulation alpha != profitable alpha != long-term alpha.

Re: Building AI Trading Systems

#54
post #16

Earlier quoted context omitted.

I think you're comparing apples to oranges here. These funds manage billions of dollars of client money, which forces them into highly liquid markets with scalable strategies. That's quite different from how individuals or smaller prop funds can operate, trading off capacity for higher returns by trading in less liquid markets or with strategies that are "not worth it" for large hedge funds. If you must manage billio…

Agreed. Many smaller, yet successful Hedge Funds limit the capital they manage for this very reason. Some strategies just don't work at certain scale.

If the above is true, why would a fund not just allocate a small amount of resources to trade on OP's strategies. Either:

(1) OP's strategy performs worse than the alternative (2) They already do this, and have resources that allow them to outperform OP at their own strategy

If the returns are really meaningful, i.e. better Sharpe ratio than just holding $SPY or some dead simple strategy like that, then (2) must be true at least _somewhere_.

Re: Building AI Trading Systems

#55
post #6

Earlier quoted context omitted.

Probably not very good. Voleon does all ML-based trading and what I've seen of their returns does not give me any confidence in ML-based trading having alpha. I would estimate that at best in a good year returns would be like 5% y/y in the long term, much less than the sustained ~7% that index funds offer especially when adjusting for risk. Just speculation but there's a lot of firms with much more capital, better to…

I think you're comparing apples to oranges here. These funds manage billions of dollars of client money, which forces them into highly liquid markets with scalable strategies. That's quite different from how individuals or smaller prop funds can operate, trading off capacity for higher returns by trading in less liquid markets or with strategies that are "not worth it" for large hedge funds. If you must manage billio…

Also considering you're the OP & are trying to argue in favor of this type of trading, it would be very informative to disclose what kinds of returns you actually made. It's hard to expect people to listen to your opinion in a game where everyone successful is motivated towards secrecy.

Re: Building AI Trading Systems

#56
post #49
post #46

Earlier quoted context omitted.

You're arguing on HN that you have a long-term strategy that can reliably beat the market. Such a strategy would be worth billions of dollars. You probably don't have such a strategy. Good luck with that though.

There are a number of persistent factors. They are well known in academia and to financial practitioners. There are structural reasons for their existence. We are talking about value, fama french size, etc. These are classic factors that everyone knows about. https://www.aqr.com/Insights/Research/Journal-Article/Bettin... https://en.wikipedia.org/wiki/Low-volatility_anomaly I think your attitude of dismissing decades…

> Also I don't think you understand what "risk-adjusted" means.

You might be right; why don't you try explaining it for me? I suspect it is going to look a lot like a justification for why your strategy is fantastic even though it makes sub-par returns.

Re: Building AI Trading Systems

#57
post #8

I've never tried the AI trading path but I imagine that you can't get huge gains with public data, unless you find a way to extract "hidden" information by processing real time news. I wonder nevertheless if there's a sweet spot where you can build a simple AI trading algorithm and get modest earnings from it.

I think the answer is yes & no. If you come up with a sufficiently clever strategy using public data that other people haven't thought to use it's definitely doable. For example, someone with a good understanding of meteorology would've had a significant advantage a few decades ago (though trading firms have since caught on). You wouldn't need a perfect data set if the strategy isn't being used.

In terms of strategies based purely on market data, you are definitely correct. Any publicly (freely/cheaply) available market data is low resolution, lacking the full data from any point in time, and generally based on poor approximations of the actual data (elsewhere in this thread someone mentions that IEX's data is based on trades that get routed through the IEX exchange, which obviously misses any data you could get from the markets that make up 99% of the volume, dark pools, etc.).

I think the "sweet spot" is simply coming up with a strategy that nobody else has thought about, or else executing a better-known strategy more effectively than other market participants. Both are hard, but somewhat in the realm of possibility. The problem is that many people think there's free money to be made without either of these.

Re: Building AI Trading Systems

#58

Just curious to know do financial firms have implemented something similar to this

Modern finance is built on top of this type of technology. There are hundreds if not thousands of firms participating in "quantitative finance," attempting to use computers/statistics to predict markets. The vast majority of trades go through major practitioners of this exact idea.

Re: Building AI Trading Systems

#59
post #36
post #23

Earlier quoted context omitted.

+1 for indexes. This is the route most successful traders seem to take - alternating between indexes and bonds. You won't see Warren Buffet buying stocks on Robinhood.

Warren Buffett doesn't buy stocks on Robinhood because they couldn't handle his volume. I saw him quoted somewhere not long ago saying that if he was working with a "small portfolio", a few hundred thousand dollars or maybe it was even a few million, that he was quite certain he could return in excess of 100% annually. But yes, picking stocks is probably not as effective for most people as buying an index fund.

He could probably use BH to manipulate the market so his mini-portfolio would have crazy returns. This is one of the theories behind the infamous Medallion fund.

I doubt he could without using or BH insider info.

Re: Building AI Trading Systems

#60
post #27
post #9

I tried doing some forecasting with various neural network models after assembling what I thought was a good amount of forex data. The neural net (I tried various architectures) couldn't do any better than chance. After playing around with it and trying to double-check everything, that was as far as I could get. This puts me ahead of most traders, since most of them lose money, then quit. This makes me wonder what ki…

The most popular kind of quant trading is using a factor model. The first step is developing some alpha factor, a number that is predictive of how much money you'll make from each stock. So let's say my alpha factor is "companies with good earnings per share will go up." So I first take the EPS for all the stocks in my universe and maybe rank, then zscore. Now I have some positive numbers and some negative numbers. T…

That's the ideal described in quantopian tutorials, but I doubt it often works out that way.
Post reply on HN