15 ms·
Introduction to Algotrading (2011) [pdf]
- zygy 8y agoI enjoyed this, but I'm sure the strategies have evolved a lot. Anyone know of more recent resources like this?
- atemerev 8y agoThis excellent cheatsheet describes strategies building blocks, not actual strategies. Everything there is still quite relevant.
- mruts 8y agoThere’s a lot of finance papers on arxiv that describe various (academic) strategies. Most of them are pretty bad but they’re good for providing ideas for coming up with your own.
- jpovenden 8y agohttps://www.academic-quant-news.com https://www.academic-quant-news.com
- anonu 8y agoNobody is going to give you the keys to the castle. Trading strategies that are more recent probably still have some edge in them. These things are closely guarded secrets. Having said that, in addition to the other recommendations in this thread, lookup SEC settlements. The Athena trading one from a few years back regarding their "Gravy" on close strategy is particularly memorable. Edit: https://www.sec.gov/news/press-release/2014-229 https://www.sec.gov/news/press-release/2014-229 SEC order at the bottom of the press release
- HenryBemis 8y ago+1 A successful trader won't give out the thing that if replicated by 10.000 people will attract attention that may deem this inoperable any more. Part of my 'hobby' is to find EAs and put them to test in other pairs, timeframes, and try to optimise and get better configurations for the triad EA-pair-timeframe. When I get one, it goes straight to MY 'parking lot', NOT a blog :)
- anonu 8y agoWhat is EA?
- HenryBemis 8y ago"Expert Advistor", aka the softrware that stays online (running on a virtual-private-server preferrably) and has the capability to trade 24/5.
- Youden 8y agoI'll add since it isn't clear that this term is usually exclusive to Forex. I'll also add that the commercial market for them is about as scummy as it comes. You want to know how to game backtest metrics? Have a look at what they're doing with EAs.
- jmrobertson 8y agoThe issues with any algo trading strategy, is if it becomes known, then the trade gets crowded out and priced away. The logic really holds that if you know a shortcut to work that saves 60 minutes on a 2 hr commute, and then everyone else found about it and did it too, goodbye secret commute. This is why the strategy aspect of this gets kept very quiet by R-tech, JS, etc.
- Ragib_Zaman 8y agoThis document is amazing. I'm interested in working in quant trading when I graduate, and I can't believe I haven't found this before. Do you think if I wrote my own back tester and test strategy and put it onto GitHub it would be a positive in applications/interviews, or is that too basic to be seen as interesting/substantial?
- mruts 8y agoIt depends what kind of job you want. If you want to go into quant research you’re probably just going to be writing inefficient python code. So if you want to do that, just go straight to something like Quantopian where the infrastructure is already set up. If you want to be the guy who actually knows how to program (the guy translating the Python into C++), then I think a backtester would be a nice project. Look at the python libraries zipline and pyfolio and then try to create something yourself (ideally not in python).
- lordnacho 8y agoAlgo trader here. This document is fantastic. I think it's hard to show, but coding is of paramount importance. General skills like keeping things in version control, writing simple code, and making things modular. But also quite advanced specific topics like CRTP or cache optimization. Could be a whole book in itself without the financial parts.
- CoolGuySteve 8y agoWatch out, if you get too good at technology they’ll stick you in the back office and never let you trade, or even see what the pnl is.
- soVeryTired 8y agoBack office's job is trade reconciliation, pnl, and accounting.
- jmrobertson 8y agoYeah it's always worth remembering how heavily fundamental engineering work processes come into play. Knight Capital went down for a manual deployment error, of all things
- jrh206 8y agoThis is generally pretty great. I was taken aback by the 'work shall set you free' quote at the top of Section 2. That seemed in very poor taste.
- FabHK 8y agoOr ignorant. ("Arbeit macht frei" was posted at the entrances of many Nazi concentration camps.)
- jack_pp 8y agoDepends on your interpretation. I found it inspiring
- deleted 8y ago[deleted]
- JHonaker 8y agoIt’s a quote from the entrance of Auschwitz, and lots of other Nazi concentration camps.
- jack_pp 8y agoThey did not invent the saying, i just did a little googling and it seems they didn't even use it on all the camps. It was preserved from previous wars and it became a horrible sign in the context of the holocaust. I could see how that specific saying is tainted in German but I do not think it should be tainted for all of history and in all translations because of some unfortunate coincidence. I believe it has wisdom to share
- JHonaker 8y agoI mean they didn’t invent it, but the author of the book that did was a member of the German Nationalist movement that eventually (~75 years later) evolved into the Nazi party. It’s not like it was completely disassociated with Nazi history and then they decided to put it on their camps because it sounded cool. They literally wanted to work people to death, i.e. freedom.
- usgroup 8y agoThis is full of gems ; and a great compendium I wish I had 10 years ago. However, honest advise: if you actually really want to trade in this way, start with a solid course in mathematical finance. It’ll teach you how to model the space, think about arbitrage, portfolios, risk, factors and the sheer important of theory and hypothesis in real strategy. Building a backtester is exceptionally hard to do if you include scenario analysis, slippage, event risk, lag, multi hypothesis testing, data snooping, etc. Testing is a huge source of competitive advantage. In summary, if you’re starting out, go learn the basics like the back of your hand, and he basics are mathematical finance.
- logicchains 8y agoI work in HFT, and I'll be contrary and suggest that if you want the most value from your time, focus on learning as much maths and probability as possible. Once you have a strong maths background, learning most financial maths is relatively easy. Any of the financial models you find in textbooks are probably useless because if they work, everybody else who's read the textbook has also used them so there's unlikely to be any edge left, hence it's the ideas underneath them that matter, and understanding and extending these is much easier with a strong maths background. The key skill is developing and assessing new models, and the better one's maths, the easier this is (imagine if a market behaved like a complex aerodynamic system; only somebody with enough mathematical background to model a complex aerodynamic system would be able to create a very accurate model of that market). One of the most successful hedge funds, Renaissance Technologies, also takes this approach. Regarding its employees: "a third have PhDs, not in finance, but in fields like physics, mathematics and statistics. Renaissance has been called “the best physics and mathematics department in the world” and, according to Weatherall, “avoids hiring anyone with even the slightest whiff of Wall Street bona fides." (https://en.wikipedia.org/wiki/Renaissance_Technologies https://en.wikipedia.org/wiki/Renaissance_Technologies). Similarly some of the best HFT hires I've been have been people with a maths or science background. A quote sourced to Renaissance Technologies from https://www.quora.com/What-is-the-secret-behind-Renaissance-Technologies-Can-mathematics-really-be-used-to-bring-high-returns-to-investors/answer/Vladimir-Novakovski https://www.quora.com/What-is-the-secret-behind-Renaissance-...: "We have some Tier One mathematicians and a lot of Tier Two mathematicians. Other quants funds have mostly Tier Three mathematicians, and worse, they don’t even know that these tiers exist! Someone has to create the correlations in the markets." Aim to be one of those Tier one mathematicians!
- w23j 8y agoLooks great. It's always interesting to learn more about how these things actually work. This XKCD is always a good reminder not to get to enthusiastic: https://xkcd.com/1570/ https://xkcd.com/1570/
- HenryBemis 8y agoPainfully true. Numbers is just one aspect, then we got 'the News' (and the specualator, the other EAs that are programmed to kill 'your' EAs), and then we got politicians twitting (I won't name names), and semi-democratic governments that have other agendas unrelated to financial prosperity, and so on, and so forth. Basically unless one is running algos with a target of more than 20% per annum, they should be losing sleep.
- polishrobotsguy 8y agoWhen did we move away from smart people sending humanity into space to smart people making billions on market inefficiencies (making everyone else collectively poorer)?
- elorant 8y agoWhen smart people realized that their scientific interests didn't align with those of any government so they'd better start their own projects. And to do that they'll first have to amass a few billions.
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- chrischattin 8y agoYou could just as easily say the best minds of our generation are occupied trying to get people to click on an ad.
- polishrobotsguy 8y agoI could, but clicking on ads usually happens on platforms providing heaps of societal value - sharing ideas, cherishing memories. Algo trading, on the other hand, literally rigs the markets. Money accrued by HF funds has to be sourced somewhere. Where do you think this is?
- throwawaymath 8y agoYou're rehashing a very old, very tired argument. I could respond by explaining that HFT facilitates liquidity and price discovery, making trading cheaper overall. I could also counter that adtech isn't any better than fintech, or that it's a fallacy to suppose every intelligent person needs to maximize their ethical production in a capitalist society. But I'm not going to engage in any of those rebuttals. Instead, why don't you take a look at the massive charitable work bankrolled and empowered by James Simons and David Shaw? Take a moment to read through the organizational mandates and scope of research for the Simons Foundation and DE Shaw Research (DESRES). These two men have poured billions of dollars from their personal wealth into making the world a better place in a variety of ways. Both of them explicitly cite cancer research as a core focus - what do you consider more ethical than that? While we're at it, let's circle back to your specific example. You're talking about sending rockets into space - that's great! I bet you're a fan of Elon Musk and SpaceX then? Are you aware that Elon Musk made his first fortune through PayPal? Do you consider payment processing to be a virtuous industry? Was Musk maximizing his ethical potential by working on PayPal?
- maxfdama 8y agoThanks for posting. I wrote this back in college and looking back a lot of it is outdated (Getco doesn't exist anymore), and some parts even cringeworthy... After writing that I joined Headlands, where I've been working for the past 8 years as we grew from a startup to a relatively large firm (trading is actually a very small industry). If you want a more up to date description of low-latency trading in particular, please see this more recent post: https://blog.headlandstech.com/2017/08/03/quantitative-trading-summary/ https://blog.headlandstech.com/2017/08/03/quantitative-tradi... Feel free to email me, my email address in the pdf is still valid.
- anonu 8y agoI remember reading that intro you wrote sometime after you wrote it.. . I was an algotrader at a big bank at the time. My biggest takeaway was just confirmation that really "many people are doing the same things" or looks at the market in very similar ways. One good way to get an edge is to think how would someone in a similar position approach the problem. Now iterate again and think of it differently. Its the game theory of trading.
- usgroup 8y agoGame theory itself has been applied to trading ad Infinitum . Indeed short squeezes, liquidity traps, algos that hunt algos, are all a common feature and motivated by a study of the competition. I’d venture to say that trading might just be the most competitive field in existence, with all the smart and cunning that goes with it.
- HenryBemis 8y agoAlso algo-trader since Jan2018. I got IT and FS background, I like to think algo-trading as a computer game, where the 'monsters' have their own AI and different levels of aggression. I am also closely following the MQL5 market studying who the retail thinks. I see how the waves of people gather one strategy/signal/EA that seems to be having a good streak, and then jump to the next one once the previous one 'just' failed. There is great ignorance in the space, it feel like 80% of the people I talk to in retail haven't even read a book and/or never heard of Kathy Lien or monitor the news on BB or Reuters. I will definitely absorb those 57 pages and will stary monitoring HT blog.
- shivekkhurana 8y ago> In many countries such as Russia, corruption is a better career path. ROFL
- quickben 8y agoI used to work for one of the HFT companies listed there out of university. What are the salaries now-days for a BackOffice Technology (C++ and everything else related)?
- webmascon 8y agoIt is not about algotrading. It is about quantitative automated trading
- FabHK 8y agoThe distinction between algo trading vs automated trading is referred to as New York vs Chicago "style" algo trading in the document: > The phrase “algorithmic trading” has a different meaning depending on if you are in Chicago or New York. In Chicago it will mean using a computer to place trades to try to make a profit. In New York it means to use a computer to work client orders to try to minimize impact.
- CoolGuySteve 8y agoI’ve worked in the industry in NY for 10 years and only an investment banker might make that distinction. Everyone else uses the terms synonymously.
- webmascon 8y agoI've been working in the industry in Tokyo for 15 years. And why should we care how everyone else uses the terms if we are professionals? Even the document's title says Automated trading.
- mywrathacademia 8y agoHow would someone who enjoys algorithms but without a trading background get into the Tokyo HFT/Algorithmic trading industry? For example, do I need to be fluent in Japanese?
- webmascon 8y agoIt depends on your employer. International banks are present in all major cities. So English is mainstream. And you do not need to be in Tokyo for that. The most important thing is where your trading computers are. Plus mind that hft and algorithmic trading are not the same things. Hft is proptrading which is now mostly forbidden for large international banks by Volker rule.
- jmrobertson 8y agohttps://meanderful.blogspot.com/2018/01/the-accidental-hft-firm.html https://meanderful.blogspot.com/2018/01/the-accidental-hft-f... My all time favorite article related to this topic, I always try to promote it Guys like the author started this whole rodeo through some really ingenious hardware/software/networking jerryrigging.
- myaccount80 8y agoKind of unrelated but I would like to have HN opinion: what is the actual point in working as a trader ? At the end of the day you just made more money or lost money. But you’re not contributing in anything for the world. I really don’t understand why people are happy to say they are trader when at the end it seems that the only do it for money. In 40 years when I look back I don’t personally want to see that I worked for 20 years for a company just to make money, rather I would like to say for example: I built this product which helped some people
- SeanAppleby 8y agoI'm not saying that everyone trading has idealistic, altruistic reasons for doing so, but products are built on the back of capital markets. At least ideally, successful trading makes markets more efficient, and making markets more efficient ripples out making it easier for many people to make many products that create value for their users. Even if all of that is true though, it's an unnatural framing for people to work with and is much harder to find existential meaning in abstract changes to the system that make people's lives better in complex and hard to trace ways than it is to find meaning in a direct value proposition to your users.
- h3ctic 8y agoGood question. I am asking this myself as I will finish University soon. Maybe someone has an opinion on it
- phponpcp 8y agoBecause being rich is awesome. And if you're rich, you can do whatever you want, including helping overs if that's your prerogative.
- lordnacho 8y agoBecause you like to know something that other people don't know and won't publish. Or you don't worry about contributing to the world. Or you enjoy intellectual entertainment above what you might add to society. For some reason this type of comment comes up quite often on algo trading threads. Keep in mind most people are not deciding on their careers based on what they contribute to the world.
- deehouie 8y agoI cringe when I see so much goes to building the IT infrastructure and so little to modeling and validating algorithms. Someone points out that most quant funds fail. Key reason is their ML models are badly overfitted. By fitting enough models, you'd always find one with a good looking Sharpe Ratio. This is the classic multiple hypothesis testing problem. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3274354 https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3274354
- hash872 8y agoHere's my question I've always wanted ask re:trading. How do EMH & profitable trading (especially by institutions) coexist? I already understand EMH & 'active management'. Do trading profits consistently exceed a market benchmark like the S&P 500's return for the year? (I'm assuming so). If so- doesn't this completely disprove EMH? And if so, further- why does any institution do active management when they could just actively trade assets for profit instead? Where is really the line between active management and trading? Sorry for the dumb questions- I have genuinely spent significant time Googling and could never find the answers, thought I'd use the opportunity to ask here. I am obviously not a market professional, just one guy with most of his assets in index funds. I can rephrase questions if necessary
- 1e-9 8y agoThe efficient-market hypothesis is a useful theoretical ideal that is never perfectly achieved in reality. Good trading drives the markets towards efficiency with the work of the traders being compensated by capturing a portion of the inefficiency that they remove. Traders who are above average at removing inefficiency will be compensated above average and the less capable traders will tend to drop out due to losses. This competition allows markets to converge towards efficiency over time. If the markets were perfectly efficient, there would be no trading firms as they would have no way to get compensation for providing their service. If there were no trading firms, then the markets would be less efficient because of the erratic appearance of buyers and sellers as well as the loss of many trading experts evaluating risk and value. So, you see, there is a nice negative feedback loop at the heart of the markets that drives them closer to efficiency over time as traders are motivated to improve and advancements in technology and theory allow better determination of pricing. Investing in equity markets is very different from trading. Corporations pay you dividends and capital gains in return for the capital you provide them. That's why long term investments in passive index funds are typically the best bet for someone who is not a finance professional. Rather than trying to beat the professionals at pricing assets, you get to sit back and enjoy the compensation from a mix of companies working hard to increase the value of their stock and/or generate dividends. You just need to ensure you don't take on excessive risk. Stay away from margin at all costs.
- malhotra_chetan 8y agoThis is pretty good. I had a quick glance and surprisingly did find some parts that are generally missing from 'Intro to Algo Trading' literature especially in the execution part. Anyway, I work at this company where we are a product that makes production systems for trading algorithms into a PaaS. We also have a library LibKLoudTrader(http://docs.kloudtrader.com http://docs.kloudtrader.com) that incorporates pretty much every thing one needs to start with algorithmic trading.
- 2038AD 8y agoMinor point but the following isn't a Korean proverb: >When you laugh, the world laughs with you. When you cry, you cry alone. It was in the film Oldboy but it's actually from an English-language poem. Ella Wheeler's Solitude: Laugh, and the world laughs with you; Weep, and you weep alone. For the sad old earth must borrow its mirth But has trouble enough of its own