11 ms·
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 confidenc
by traK6Dcm 6y ago
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 using here), but backtests are nothing like the real world. In the real world there are HFT traders front-running you, latency, jitter, fees, hidden order types, slippage, and a lot of other complexities that don't fit into a short HN post. Whenever you see a paper ending with a backtest you can already assume it's BS.
It's similar to training a robot in an extremely simplified 2D simulation environment without physics or other interactions, and then claiming one has built a real robot. A mistake many people make is believing that trading is all about AI. But in reality, the model often matters less than infrastructure/latency/system/data issues.
In addition to that, people who are actually "good" at trading don't publish papers, they silently make money. Papers are typically published by academics or students who have never built anything profitable but would like to put a paper on their resume. I have yet to see a single good academic paper about trading.
[0] https://www.tradientblog.com/2019/11/lessons-learned-building-an-ml-trading-system-that-turned-5k-into-200k/ https://www.tradientblog.com/2019/11/lessons-learned-buildin...
- jawns 6y ago> people who are actually "good" at trading don't publish papers, they silently make money I've long understood that this was true. It makes intuitive sense. But are there any cases where it is not true? Is it possible to "spread the wealth" when it comes to trading, or any money-making endeavor? Or does it always reduce down to "I win only because you lose"?
- traK6Dcm 6y agoI don't think it necessarily has to be true. I also built a profitable system and wrote about it, but I didn't share all the details. Not even close. There are just too many small details that must be "just right" that they would fill a whole book. It's kind of like building an operating system from scratch. It's not something you can put into a single post or paper. There isn't one "trick" that suddenly makes it all profitable - it's a combination of so many small details. Then there is the cultural aspect. People who are working in trading are just not used to sharing openly. They don't write online, or anywhere. They are not even allowed to write due to their employers. And people who work in academia are naturally not working on "production" systems - their only job is to write, not to build. So you almost never see people in the intersection of: writes-online & understands-trading & is-not-in-academia
- amiga_500 6y ago> Or does it always reduce down to "I win only because you lose"? It is a zero sum game. Nobody is producing anything, therefore for one to win another must lose.
- solotronics 6y agothis would only be true if it was a closed system. the central banks essentially magic money into existence and put it into the market through convoluted methods.
- whymauri 6y agoMy understanding is that while all markets are not zero-sum, that high-frequency trade amongst trading firms approaches zero-sum.
- traderthrow454 6y agoI think thats an overly simplistic view of things. The market is big and many participants trade at different frequencies. Large pension funds need liquidity to move big blocks of stock for their quarterly and monthly rebalances, and the big medium term statistical arbitrage traders provide liquidity for them to do so. HFT players provide liquidity for the stat arb players. The classes of participants with different frequencies actually help one another, while there is competition for alpha within strategies with similar holding periods. Overall the system creates an extremely efficient and liquid system for valuing and exchanging equity - the very system that empowers YCombinator and other Venture investors to make VC investments knowing that their winners will eventually IPO or be bought by public companies.
- amiga_500 6y agoI knew someone would come in with "liquidity". Many HFT jump out when things get volatile, when liquidity is actually required. Ultimately HFT is doing nothing of societal value, the race down to zero is never-ending and we are wasting huge amounts of resources on a totally pointless march towards zero. Exchanges should introduce random delays to allow market participants who really want to hedge / buy / sell, then we can shift some of the resources to the real world. The costs required to compete at the lowest latencies are large, and forcing small/medium players out the game, as the investment cost is large, which is also bad. The system is hugely inefficient. The costs as latencies get lower are ever higher, for an extremely similar end result. The law of diminishing returns.
- Qworg 6y agoTrading is inherently zero sum.
- nightski 6y agoThat's only true in the sense of opportunity cost. I may buy something at $10 and sell it at $15 making a $5 profit. Then it may go to $20. Did I lose $5/share? Sure. But in reality I wasn't a "loser". I find that in reality opportunity cost rarely matters.
- yorwba 6y agoIf you buy something at $10 and sell it at $15, where are the $5 profit coming from? From the other market participants, e.g. someone selling to you for $10 and later buying it back for $15, losing $5 in the process. Your profit and their loss sum to zero, which is what "zero-sum" means. It has absolutely nothing to do with opportunity cost, or whether you, personally, are a "loser". But if you're a "winner", someone else must be the "loser".
- traK6Dcm 6y agoIn this simple example, yes, but you are assuming that monetary value = utility. That's not always the case. People have all kinds of different incentives for participating in the markets. Let's say I am a market maker offering to buy Apple shares at $99 and sell them at $100. Let's take an ex-Apple employee who owns some shares. He just had a family emergency and wants to liquidate his shares to get cash, and he needs it quickly. He doesn't care about paying a few dollars extra in exchange for a quick trade because he needs to pay a bill tomorrow. I buy his shares for $99. He is happy because he immediately got his cash. On the other side, there is a a retail investor doing long-term investment and wants to add Apple to their portfolio. They also don't care about a few cents because they're holding the stock for a decade and love the new CEO. They buy my Apple shares from me for 100.0. They are happy because I can guarantee them a stable price for a decent number of shares. All participants are happy. I just made $1 from the spread for providing liquidity, the investor got the long-term investment they wanted, and the ex-Apple employee got his cash. Sure, both sides of the market could have made more optimal trades if they had put in more effort and "optimized" their trades with algos and somehow skipped the middle-man, but they would've sacrificed convenience and time, which may be worth more to them than the little bit of extra $ they paid. Aren't we all winners? When you go buy bananas in your grocery store you also don't complain about them taking a cut for providing liquidity. You don't say the farmer has "lost" money because the consumer paid more than what the farmer originally sold for to the grocery store. The farmer is happy because otherwise he may not have traded at all or his bananas may have gone bad (= needs to trade quickly). This is no different.
- nine_k 6y agoTo spread one's wealth, one can donate to charities. Opening up one's secrets of trading seems to only make sense if one has found deeper, more effective secrets, so that the old crop is not going to be seriously competitive, but a bit of good PR would come in handy.
- awesome_dude 6y agoA famous example of a strategy that was published, and shared, whilst still profitable is that of Benjamin Graham, several of his students went on to be incredibly successful traders (we all know about Buffett, right?) But that's an exception rather than a rule
- machinehermit 6y agoIt is an absurdity to believe there has never been a good trading strategy published in a paper. The real value though of publishing a trading strategy is in signaling to future employers. Ultimately, money is made by the ability to come up with new strategies. Any single strategy is only going to live for so long before it dies and it is no longer profitable.
- Reubend 6y agoThis is a really valuable opinion, especially because it's easy to be misled about these things for those of us who are novices in HFT.
- credit_guy 6y agoI share your skepticism. Now, since you appear to know about these things, among all the available papers/article/blogposts/books is there any that you would recommend as being less wrong than the rest? For example, a while ago I read this book [1], and it didn't seem so bad, but I'm not in the industry. Can you recommend anything, even with caveats? [1] https://www.amazon.com/gp/product/B00BZ9WAVW/ref=dbs_a_def_rwt_bibl_vppi_i0 https://www.amazon.com/gp/product/B00BZ9WAVW/ref=dbs_a_def_r...
- traK6Dcm 6y agoIn general, books are a much better source of information than papers or blog posts when it comes to trading. I haven't read the one you posted, but a few I can recommend: [0] is okay. I disagree with a lot in there, but it's pretty well written and one of the better books on the subject. [1] Is very old, but it's one of my favorites. It's very mathematical. The ideas still apply today. [2] Is a good introduction overview [0] https://www.amazon.com/Advances-Financial-Machine-Learning-Marcos-ebook/dp/B079KLDW21/ https://www.amazon.com/Advances-Financial-Machine-Learning-M... [1] https://www.amazon.com/Introduction-High-Frequency-Finance-Ramazan-Gen%C3%A7ay-ebook/dp/B008U1LLWC https://www.amazon.com/Introduction-High-Frequency-Finance-R... [2] https://www.amazon.com/Trading-Exchanges-Microstructure-Practitioners-Association-ebook/dp/B003ZSHIPE/ https://www.amazon.com/Trading-Exchanges-Microstructure-Prac...
- idohft 6y ago++ this. If they haven't tested this in actual trades and measured results, it's probably worthless. Even backtested strategies at actual firms observe decays (or don't work) when they get put live. And those are places where they invest in (and are incentivized to get right!) backtesting methodology.
- dchichkov 6y agoYes. To add to that, leakage of information is very hard to eliminate during back-testing. Even a fractional bit of information is already too much. In academic papers this is usually ignored.
- deehouie 6y agoWhile it's so easy to dismiss someone's work as flawed (sure, backtest is illusional but do you have anything better?), which I think it may be, I always read it and try to understand what they're up to. Sure, academic folks may have no clue about market microstructure and other complexities, but if they could solve, or make some way toward solving the difficult problems in stochastic processes, they're already worth my effort.
- traK6Dcm 6y agoI actually believe that trading is an interesting problem that should be studied more in Academia and Machine Learning. It has many aspects (sparse rewards, long-time horizons, simulation-to-real-world transfer, non-stationary data distributions, etc) that current ML algorithms struggle with. Unfortunately it seem like most ML people are not really interested in trading, perhaps because it has such a bad reputation (which is IMO unjustified) - so they work on games instead :)
- currymj 6y agoi 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 producing a publishable paper.)
- deehouie 6y agoTher 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.
- 6y ago
- traderthrow454 6y agoIf you want to read useful academic papers about trading there is one author in particular who is actually not bad - Zura Kakushadze. Most of his stuff is applicable to mid-frequency trading, not HFT. He worked at WorldQuant (reputable trading firm) and the founder of WQ, Igor Tulchinsky, is a coauthor on one of his papers. Example of a pretty interesting and accessible one - is "101 Formulaic Alphas" [0]. [0] - https://arxiv.org/pdf/1601.00991.pdf https://arxiv.org/pdf/1601.00991.pdf
- huac 6y agopicking a random one out of the pile: > Alpha#90: ((rank((close - ts_max(close, 4.66719)))^Ts_Rank(correlation(IndNeutralize(adv40, IndClass.subindustry), low, 5.38375), 3.21856)) * -1) I wonder how these magic numbers get picked (4.66719, 5.38375, etc) -- I guess there is some optimization solver which attempts to find the most profitable variables for a given alpha formulation, but isn't this approach also very vulnerable to overfit?
- traK6Dcm 6y agoYup, it's probably just the output of an optimizer and then tested on held-out future data. Not overfitting is the key here and what's really hard. You need to be careful about the number of parameters and the amount of validation data you have. These alphas will likely be only profitable for a short time period as long as the market data distribution (i.e. strategies of other market participants) doesn't change. So you would need to continually optimize and update them. The way I think about it is that you are essentially finding the right parameters to "exploit" the combination of algorithms of all other participants, where algorithm could also be a human looking at charts and following certain rules, with a lot of random noise from retail traders thrown in.
- laxatives 6y agoSeems kind of rudimentary. Namely > (sign(delta(volume, 1)) * (-1 * delta(close, 1))) That's crazy. Would be interesting to see WTF a "mega-alpha" actually does using these strategies.
- 6y ago
- solidasparagus 6y ago> "good" at trading don't publish papers I think this is a little unfair. I've seen high-quality papers from phD students who then get hired by financial firms and were apparently very successful. Every good real-world AI system requires both good engineering and good science and it's disingenuous to suggest that all science that isn't actively being applied yet is BS.
- traK6Dcm 6y agoI don't claim that all the science that isn't actively being applied yet is BS, but this kind of science typically happens within trading firms, tested on real-world data, and is not being published on arXiv. As a side note, what this specific paper here did is neither novel not innovative, so it's very fair to criticize it. A3C is 4 years old, and they just take it and run it on some data. It's like downloading a convnet and running it on MNIST. There have been hundreds of papers on RL + Trading. I see them in my arXiv emails every other day and they all do the same thing.
- solidasparagus 6y agoI was referring to these statements: > This paper, just like pretty much any academic paper on the subject, ends with a backtest on historical data, not a real system > Whenever you see a paper ending with a backtest you can already assume it's BS.
- fakedang 6y agoI guess he was referring to the fact that though the people may be great, their published content in that one paper need not be so.
- marktangotango 6y agoJohn von Neumann had a similar observation: https://www.johndcook.com/blog/2011/06/21/how-to-fit-an-elephant/ https://www.johndcook.com/blog/2011/06/21/how-to-fit-an-elep... Edit down voters care to elaborate?
- smdz 6y ago> 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 (or my machine built) a working strategy (in early 2008), live traded/tested it for a couple of months and told few colleagues about the details about the strategy - they did not take me seriously. This was even before I understood NNs or any of scikit-learn tooling. I knew I wanted to get into financial markets - went to a broker to sell the automated strategy and seeking a full time job as an algo-trader - they thought I was trying to scam them even after seeing the contract notes. Plus algotrading had not picked up back then. I found later about such scams. It took me 3 more years and a financial crisis to understand the value of making "much more than enough" money. And retrospectively I know those were just stupid attempts trying to convince others and attempting to give it away.
- traK6Dcm 6y agoYou 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 some gems and people writing up good posts and articles. However, 99% of what comes to my inbox, which is certain newsletters and arXiv subscriptions, is clearly BS. I'm particularly disappointed with arXiv/academia, because in other fields like biology and CS/ML/AI, published papers tend to be of higher quality than your average blog post. In trading the opposite seems to be true. Seeing a good trading paper on arXiv is incredibly rare. I would even go as far as saying that reddit is a significantly better source of information than arXiv for this field.
- p1esk 6y agoSo how should we evaluate the quality of a paper on trading AI? I mean the authors might not have access to real data, but their ideas might still be good.
- vmception 6y ago> Not only is it (very!) easy to overfit backtests (especially with so little data they are using here), but backtests are nothing like the real world. I know this, and I ran a company where people should know this, but so many people are so easily swayed by "authority" like, so and so made trading programs for Investment Bank Co 20 years ago so you know their trading algorithm has to have merit uh no, they are not retired, they are broke and can't even fund $10k into a trading account to try it at this point all I would say is just smile and nod.
- chnsh 6y agoI 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 be really helpful - thanks!
- imcoconut 6y agoyou might find the books I linked in this post helpful: https://news.ycombinator.com/item?id=16929156 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.
- godelmachine 6y agoAt the risk of digressing, might I ask if the dough to be minted is good in Quant/ HFT / Algorithmic trading?
- derriz 6y agoI also worked in HFT and have no idea what you mean when you say other HFT shops can front-run your orders? To front run someone’s order you need to have advance information of their order s? Normally this means the front runner is operating as a broker. I can’t imagine any HFTs using other HFTs as brokers to forward their orders to the exchange?
- Traster 6y agoThe distinction is between algorithmic traders - and HFT. HFT traders often find ways of making money from algorithmic traders. Especially if the algorthmic traders are doing things like VWAP.
- derriz 6y agoI don't understand your point or how it explains how HFT companies can "front-run" other HFT companies? Front-running is when someone with a fiduciary duty - typically a broker or dealer - takes an order from a client and then trades on their own book BEFORE executing the client's order knowing the effect of the clients order on the market and knowing that they can exploit this effect for their own benefit. I know of no HFTs which have such a relationship with rival HFTs and can't even imagine such a relationship existing never mind it being a frequent cause of why strategies perform poorly for HFTs. Front-running hasn't been a feature of markets for decades at least. Any sniff of front-running would have the SEC or CFTC fine your company into oblivion and possibly result in jail time or at the very least lifetime bans from the financial industry.
- Traster 6y agoOk, well let's say you're using an algorithm to trade, and an HFT firm identifies what your 'algorithm' is doing, they're going to front run you - whether that be using VWAP or flashing 10 lots every 30 seconds. And both of those absolutlely happen. They're not going to literally 'know' what you're going to do, but some algos are pretty obvious and somewhat exploitable.
- 6y ago