HN Books @HNBooksMonth

The best books of Hacker News.

Hacker News Comments on
Algorithmic and High-Frequency Trading (Mathematics, Finance and Risk)

Álvaro Cartea · 1 HN comments
HN Books has aggregated all Hacker News stories and comments that mention "Algorithmic and High-Frequency Trading (Mathematics, Finance and Risk)" by Álvaro Cartea.
View on Amazon [↗]
HN Books may receive an affiliate commission when you make purchases on sites after clicking through links on this page.
Amazon Summary
The design of trading algorithms requires sophisticated mathematical models backed up by reliable data. In this textbook, the authors develop models for algorithmic trading in contexts such as executing large orders, market making, targeting VWAP and other schedules, trading pairs or collection of assets, and executing in dark pools. These models are grounded on how the exchanges work, whether the algorithm is trading with better informed traders (adverse selection), and the type of information available to market participants at both ultra-high and low frequency. Algorithmic and High-Frequency Trading is the first book that combines sophisticated mathematical modelling, empirical facts and financial economics, taking the reader from basic ideas to cutting-edge research and practice. If you need to understand how modern electronic markets operate, what information provides a trading edge, and how other market participants may affect the profitability of the algorithms, then this is the book for you.
HN Books Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this book.
Good sources are very hard to find because most of it is absolute trash intended to appeal to a certain audience who think there's money to be made off of reverse Fibonacci patterns or other silly sounding technical indicators that once again, sound technical and fancy but are completely useless.

If you want to know what it's really like to be a quant, review stuff from the ARPM; everyone I hire goes through their 6 day bootcamp but they have other materials as well:

https://www.arpm.co/

And as for books, Algorithmic and High Frequency Trading covers the foundations:

https://www.amazon.com/Algorithmic-High-Frequency-Trading-%C...

Those are pretty good sources to get an overview of what actual quants at successful firms know.

Quantitative trading is technical, I don't want to give the impression that it's not technical... but it's not "fancy" technical. It's more along the lines of rigorous and iron clad instead of flashy and sophisticated. Every strategy is built up step by meticulous step in precise detail and every step needs to be rigorously justified and experimentally verified.

Generally the thought process starts from the assumption that there is no money to be made on the stock market, either due to perfect efficiency or things like fees eating up any potential profits... when we talk about models, the models we construct describe how the stock market would behave if it were perfectly efficient, ie. free of any arbitrage opportunity.

Then given our model of a perfectly efficient stock market, we simulate what we should expect to observe in such a perfectly efficient market... we then investigate empirically whether these observations happen in reality. Is the market genuinely efficient all day every day across every security.

For some phenomenon it really is, but sometimes the market deviates from the model, so our model is either incorrect or an arbitrage opportunity has presented itself. If an arbitrage opportunity presents itself, we investigate how feasible it is to capture it, things like engineering effort, risk factors, profitability etc...

If all of that works out, then we get to work constructing a state machine for an algorithm to capture that opportunity. We implement the state machine, write tests for it, run it through our backtester, then run it through our live simulator, and after everything checks out we deploy it live.

Every algorithm is treated like a person, it's given its own human-like name, has its own account, its own set of permissions, capital allocated to it, risk profile, and algorithms are evaluated on a daily basis to reallocate capital to them and modify their risk profile.

nradov
Fascinating. Could you describe how you deconflict your various named algorithms and prevent them from competing with each other?
sampo
The description says they already have a market simulator, which must be a significant piece of software to initially construct. Once you have that, you could just run simulations and observe empirically, if your algorithms end up competing against each others.

Not that I know, how they actually do it.

Kranar
We don't stop algos from competing with one another, that said it is illegal for us as a firm to be both sides of a trade, that is we are buying/selling to ourselves in what is referred to as a wash trade. This can happen if algo A is buying Microsoft at the same time that algo B is selling Microsoft.

We do prevent this by using a fairly standard component called an internalizer. Almost all of our orders go through such an internalizer and if it sees that two orders are matching one another, the internalizer will perform that match directly instead of having it go to the market.

This happens quite frequently in fact, and it's good to be able to catch it beforehand, avoids paying fees, having any kind of market impact, as well as obviously complying with regulations.

LittlePeter
Thank you for all this info! If you had a paid blog, I'd subscribe :-).
jedimind
Thank you so much for taking the time and sharing your knowledge, much appreciated!
mrjangles
Assuming one has an appropriate PhD in math/physics, what other kind of general knowledge questions would you be asking people in an interview? For example, I've read that one should learn modern portfolio theory before going for an interview. Is this sort of thing true, or would that be a waste of time?
Kranar
Every firm is different and I'm sure many hedge funds would definitely consider that an asset, but for us since we do not invest any capital, we are not a hedge fund, and we are not in anyway in the business of constructing portfolios for long term investing, we don't have much use of knowledge of finance, economics, or trading. When we hire people they all go through a fairly comprehensive 3 month ramp up period where we teach everything one has to know about those subjects from the absolute fundamentals and in a way that is tailored to how our business operates.

Our interview process involves data structures, algorithms, probability and statistics.

For example if I asked you to write an algorithm to generate 4 random uniformly distributed positive integers (that means excluding 0) that sum up to 100, could you do it? That question or a similar one like it will eliminate about 80% of applicants, including those with PhDs, who are unable to produce an even remotely viable solution even after considerable assistance is given. Then you have the remainder who can produce a competent solution but it's not exactly uniform, there's some small bias in the answer but it's good enough and I can usually walk them through it to work out the kinks, and then maybe 5% or less are able to work out a perfect solution.

Some other questions you should be able to handle confidently would be... how many times should I expect to flip a coin before I see heads 3 times in a row?

More challenging questions will be about Markov chains, optimal stopping, random walks. All questions can be solved either by writing an algorithm, or providing a mathematical solution.

Then just go over your resume and ask you technical questions about it... usually I will find something you worked on, you will describe it casually and then I will ask a technical question about some specific area you bring up that you seem interested in.

mrjangles
I'm glad I asked. It's been a very long time since I've done statistics. I'll definitely put more time into refreshing the basics.

Are these questions asked on a computer? As in do you allow the applicants to program it up and show you a working version, or do you have to perform it there on the spot on the blackboard?

Kranar
Whatever works for the person, especially with COVID all my interviews are done remotely over Zoom so people type it up on their computer or write it on paper and then hold it up to the webcam.
mrjangles
I see, you do two lots of two that add to 50 ;) That's very comforting. Thanks for your help.
HN Books is an independent project and is not operated by Y Combinator or Amazon.com.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.