Live data from Hacker News

Using Reinforcement Learning in the Algorithmic Trading Problem

arxiv.org

91–100 of 139 posts

Re: Using Reinforcement Learning in the Algorithmic Trading Problem

#91

Earlier quoted context omitted.

Why is mean reversion difficult to trade?

High turnover, high costs. You flip your position too often

If the market flips against me, I just double my bet on the next play.

Re: Using Reinforcement Learning in the Algorithmic Trading Problem

#92
post #78
post #2

As someone who has written about this previously [0], worked briefly in HFT before, and read dozens of papers on the subject, I can say with very high confidence that the results are not to be trusted. This paper, just like pretty much any academic paper on the subject, ends with a backtest on historical data, not a real system. Not only is it (very!) easy to overfit backtests (especially with so little data they are…

I have your post saved and have gone through it many times, thanks for writing it - big fan! As a student who is looking to get started with trading and enjoys the mathematical/analysis part of it, do you have advice of where to begin? I find very few resources in this area and its very hard to get on this career path - my experience is on the ML side if things and I want to transition into trading. Any advice will b…

you might find the books I linked in this post helpful:

https://news.ycombinator.com/item?id=16929156

There are a few different types of roles in the quant world, and number of different types of funds:

alph/signal research: apply quantitative methods to come up with profitable trading ideas and strategies. This is kind of like "Data Science" coming from tech - finding the insight in the data

quant development: build the infrastructure for the data and strategies. This is kind of like "Data Engineering" coming from tech - a lot of ETL and general development work.

portfolio analytics/execution: figure out how to combine different alpha ideals into a portfolio that can be traded. Involves trading and monitoring the live portfolios.

risk management: Thinks of all the possible "risks" the portfolio can be exposed to and ensure they're properly addressed/hedged/accounted for.

This is a broad generalization which can vary greatly from place to place. Typically the smaller funds will have more blurred lines and lots of roles that involve doing multiple of the listed above. At the larger funds, the roles will typically be more well defined and segmented.

Lot's of quant funds are happy to hire people with no finance/trading background if they're strong enough in other key areas. A lot of the "finance" specific stuff can be picked up on the job. Also ML is quite in demand right now.

Re: Using Reinforcement Learning in the Algorithmic Trading Problem

#93

This is just fitting on noise. The vast majority of movements are random and no more predictable than a coin flip. Before training, your job is to extract that extremely weak signal, then train. Try generating a time series in Excel with Brownian noise, watch as it is indistinguishable from price charts.

What if someone did find a pattern in Brownian noise...

Re: Using Reinforcement Learning in the Algorithmic Trading Problem

#95
post #90
post #80

Earlier quoted context omitted.

There are some ML problems where it is fundamentally impossible to use historical data to make accurate forward looking predictions as its not IID. These fields require you very carefully capture data on sub-optimal choices. In the case of trading this means making explicitly bad trading decisions some portion of the time, and teams that have done this at any scale are unlikely to share the data. In the case of tradi…

I don't get it - if you have accurate historical data, how is this different from having access to current real-time data? Why can't you pretend you live 20 years in the past and use the data you have as if it were real-time?

For 1 because your trading existence in that universe would change the future which you can't account for. Your activity influences decisions of other HFTs in real time whereas with a static history you're claiming to be able to trade without perturbing the markets.

Re: Using Reinforcement Learning in the Algorithmic Trading Problem

#96
post #46

Earlier quoted context omitted.

> In addition to that, people who are actually "good" at trading don't publish papers, they silently make money. Well, that is mostly true. But never discount anything. There are people like me who used to love the data analysis and prediction part in these markets. I got hooked to the markets because of it. I was not interested in making money and naively thought my average pay was good enough. When I first built (o…

You make a good point. I've also gotten into trading because I enjoy the algorithmic and mathematical aspects, and I would love to share more of what has been working for me and write extensively about it. And there are probably more people like that out there. However, trading has such a bad reputation and uncertain future that I am not sure that's a good career move. I'm torn. You're right that there are probably s…

Have you tried quantpedia? https://quantpedia.com/

It's expensive but I find it a really good source for ideas.

Re: Using Reinforcement Learning in the Algorithmic Trading Problem

#97

Earlier quoted context omitted.

High turnover, high costs. You flip your position too often

If the market flips against me, I just double my bet on the next play.

That's a great way to go broke very quickly.

Re: Using Reinforcement Learning in the Algorithmic Trading Problem

#98

Earlier quoted context omitted.

Would you kindly give me a fair idea as to what’s a good amount of money to be made in this field?

As with most industries, it depends. But junior people typically make in the 200-500K range. Then as you gain experience, develop your own ideas/strategies and are able to manage risk appropriately, the sky is the limit. The closer you are to managing money that's being invested the more you make. If you can run a 1.5 - 2 Sharpe strategy and never dip below a ~5% drawdown, i.e. probably have substantial positive skew…

Is 200-500k still true? It used to be, but I think it has decreased significantly over the last decade. I'd say most junior people in this field are making about the same or less than software engineers these days.

But like you said, the range here is incredibly wide and largely depends on how well your strategies do and if you have your own desk/fund.

Re: Using Reinforcement Learning in the Algorithmic Trading Problem

#99

Earlier quoted context omitted.

Would you kindly give me a fair idea as to what’s a good amount of money to be made in this field?

As with most industries, it depends. But junior people typically make in the 200-500K range. Then as you gain experience, develop your own ideas/strategies and are able to manage risk appropriately, the sky is the limit. The closer you are to managing money that's being invested the more you make. If you can run a 1.5 - 2 Sharpe strategy and never dip below a ~5% drawdown, i.e. probably have substantial positive skew…

I wonder if this isn't the cause of lack of progress in science. - Why create wealth for all when you can acquire currency for yourself by managing other people's money?

It seems to me like those tragic stories of genuises who died young. What could have been if their ideas had reached the world? But instead of dying the geniuses got sequestered into finance and secrecy, volunteering to make no mark at all on the world of their passing.

Re: Using Reinforcement Learning in the Algorithmic Trading Problem

#100
post #28

Earlier quoted context omitted.

i think it’s just because they want to publish, and as you say it’s not easy to find a really good publicly available dataset or simulator. I think if these were publicly available and there were a Python package, people would rapidly get interested in RL for trading. (if it even works for trading — i don’t know much about it but maybe simpler techniques work best, in which case there would be little chance of produc…

Ther are plenty of free datasets out there. You can get upward of 10 yrs of daily OHLC stock data on yahoo finance. The amazing thing is yf has S&P 500 index since 1927. Free! Quandl has many free, or low cost stock market/commodity datasets. I'm not sure what you mean by a "simulator". One of the greatest challenge applying RL to stock mkt is precisely that the market itself is not a MDP.

I don't think daily OHLCV data is a good data source. First of all, it's too little because of the data distribution shift over time. It's also driven significantly by outliers and events outside of the data (news, etc). There's way too much noise in daily prices that most of the signal is drowned out (longer time horizons = more uncertainty). I don't believe you can find any edge looking at daily data. This kind of data is would be equivalent to what MNIST is in ML. Nice for some playing around, but nobody who is serious would use it for production or benchmarking, at least not by itself.

There is a good reason trading firms pay a lot of money (sometimes millions) for fine-grained historical data from exchanges. It's not only about speed. For interesting experiments you IMO need L2 or L3 order book data, ideally somewhere on second or sub-second scales. That's not HFT (which is nano and micros), but somewhere in the "middle" - it's a different world than what you are talking about.

By simulators he means market simulators for L2/L3 data with a matching engine, latencies, queue positions, jitter, complex order types, etc. You can't simulate other market participants (at least not fully, but there are techniques to even estimate this based on live trading feedback), but there are still many things left that you can simulate in a realistic way during training and backtesting. Trading companies typically have their own high-performance simulators built in house. Some of these are incredibly complex. Good simulators can give you a huge edge and are absolutely necessary.

Post reply on HN