13 ms·
This is just glorified gambling. I am not sure what special insight or advantage he had, other than his own model. Every trader has a model. It could have ea
by tarr11 14y ago
This is just glorified gambling. I am not sure what special insight or advantage he had, other than his own model. Every trader has a model.
It could have easily been called "how i lost 500k with machine learning". Like gambling, it's easy to manipulate statistics to show that you did well in some period of time.
I worked for a large investment bank about 10 years ago, writing trading programs for quant traders who were market makers. The quants called guys like him "retail" investors and they gleefully picked off all those trades. It's how they made all their money.
So, everyone else, beware of making this a case study in how to make lots of money really fast. You are more likely to lose money.
- marshallp 14y agoI don't get that. It would be true if he just made a few trades, but the author claimed to be making 2000 trades a day. Over a period of months winning that wouldn't qualify as blind luck.
- DanBC 14y ago>Over a period of months winning that wouldn't qualify as blind luck. Why not?
- marshallp 14y agoBy that definition you could start claiming everything as blind luck. Why bother doing anything at all, let luck do the work.
- crntaylor 14y agoIt's simple statistics. The author was up 4k/day over 120 days. He doesn't say what his daily volatility was, but let's assume 2k (which squares pretty well with his claim that his worst day was a 2k loss). With a quick bit of R code, we can simulate his PnL over 120 days multiple times, assuming he has no skill, and see what the probability of him being up 4k/day is. I'll use a t-distribution with 3 degrees of freedom, which allows big up and down swings (again, accentuating the effect of luck). > pnl <- c() > for (i in 1:1000) pnl[i] <- mean(2000 * rt(120, df=3)) > mean(pnl > 4000) 0.0 That is, there's a zero percent chance that he would have made those returns if he had no skill. And remember that this simulation is overestimating the effect of luck.
- tatsuke95 14y agoDefinitely not blind luck; but boosted by the fact that SPY was on a massive bull run at that time. This is really cool, any way you cut it.
- mgl 14y agoIt's more a risk management game, not particularly gambling, just look at EUR/AUD: http://stooq.com/q/?s=euraud&c=3y&t=l&a=ln&b=1 http://stooq.com/q/?s=euraud&c=3y&t=l&a=ln&b... Would you dare to "predict" the direction of this FX rate movement in the next month? Then it's a matter of calculating potential profit/loss factor and adjusting your trade value. And yes, as with any high risk investment, putting all your eggs in one bucket is not a brilliant idea. Just like taking all your savings to Vegas.
- washedup 14y agoI disagree. The point of the article was the show the steps required to develop a statistical advantage in the market place. If you develop a robust model and are very diligent in how it executes and learns, you can be successful. However, what you say about market structure is true. It goes through periods of stability, followed by abrupt changes. Any model that a trader has developed has been developed on such a short time-scale of market activity, that it can turn out to be a bad sample size. Depends on the scale of time and trades.
- jspaulding 14y agoI tried to address this concern at the start of my post. If you have some idea of how I manipulated the statistics I'd be happy to respond. Having said that I can agree that my case is pretty unusual and that everyone should beware of attempting to do something like this. Even for myself I couldn't do it now. (There is a reason I turned my program off.)
- 147 14y agoWhy couldn't you do it now?
- jspaulding 14y agoWell I could try. But it's not going to be any easier now than it was in 2010. For four months I tried everything I could think of to keep it profitable but in the end nothing worked so I had to shut it off.
- rekkal 14y agoI have two theories why it stopped working. I think the market sped up. Latencies are always getting lower and your strategy that worked at 10 ms didn't work with players that are at 1 ms. Also, you might have been gamed because your strategy was easily predictable or you were putting too many trades through the same broker/exchange/etc.
- tarr11 14y agoIe., if you made 500k in one period, but then lost 50k a year for the next 10 years, you've made a net profit of 0. All I know is that you had one good run, similar to how some mutual funds have a good run for a while. How much did you spend before you "tuned" it? How much did you spend afterwards? What were the tax consequences of your trades? Did you make exactly 500k? Have you traded at all since then? You mentioned that you occasionally "sat in" and took some large losing positions. Were these on purpose? Bugs? Was your exposure actually much higher than you thought? Was limiting contract size enough risk management?
- yajoe 14y agoThis. I love crazy projects and Show HN's until the cows come home, but this one is dangerous that I must repeat the warning to others. I cannot emphasize how important it is to understand that people who trade using price action (http://en.wikipedia.org/wiki/Price_action_trading http://en.wikipedia.org/wiki/Price_action_trading ) are just speculating based on where they expect the price to move. It's no different than people who play Texas Hold'em online and speculate what cards others have based on betting patterns. If you get good at spotting the patterns (like this guy did) you can go on a winning streak, but when the game changes (as it did for this individual after 2009) then you either go home or go broke. This guy found one edge in 2009. It won him 500k. Fantastic. More than any edge ever won me. But, the market has changed so much since then, with HFT becoming so prevalent (http://www.theverge.com/2012/8/7/3226187/high-frequency-trading-animated-gif http://www.theverge.com/2012/8/7/3226187/high-frequency-trad... ) that please be careful before you follow this course. His code is unlikely to be worth much today unmodified, and when you modify it you'll realize, as I have, that when the other players have access to the order books and can jump the line you have no chance in the game in 2012. One last nit: Please, please post recent data when you talk about projects like this. 2009-2010 is 3 years ago. Since then there was significant turmoil in the US, Asia, and the EU. How are these returns relevant for today?
- beagle3 14y agoThe Instagram guys found an edge. It won them 730m. Fantastic. More than any edge ever won by me. But the market has changed so much since then, please be careful before you follow this course. You are not wrong, but what you wrote here is applicable to any success story posted on HN. Caveat lector. Always.
- toomuchtodo 14y agoI think with the automated trading example, it makes it seem much easier for anyone to dip their cup in the stream. When you think Facebook/Instagram, you think "Damn, those guys got lucky as hell". When you think automated trading, you think, "Hey, it can't be that hard", and start firing up your IDE and rolling out code to talk to an easily provisioned API. Sure, it may take months to lose your shirt selling a photo service to Face/Goog/Apple. You can lose everything overnight with automated trading. My father used to trade commodities for a living in the pit at the CME many moons ago, and when I was growing up I would be his technical side when he was trading out of our suburban Chicago home (setting up FM receiver/satellite dish/etc for real time quote data, staying up late nights with him running through trading scenarios in Tradestation on Win3.1 with data downloaded in bulk from Knight Ridder, and so forth). Something very important I learned from him was: "The market can stay irrational longer than you can stay solvent." With a startup, you can hit bottom. In the right market, bottom is much further down than you can ever see.
- pja 14y agoIf you make that many trades and your total market exposure at any given moment is small yet you consistently make a net profit then you've found an edge. At which point it's not really gambling any more, it's just making money! If your net exposure is small, but that's only because you're offsetting various positions then you're probably picking up nickels in front of the volatility steamroller & if you stay in the market long enough you'll get squashed at some point.
- beagle3 14y agoIt is only gambling in the sense that any business is gambling: Your customers might stop coming tomorrow because the fad wore off, or a competitor provides a better/cheaper/hipper alternative. (And indeed, living is gambling. It's all just a matter of the risk/reward portfolie). But jspauld has apparently made $2/trade after fees on 250,000 trading, with a very small standard deviation (I would guess less than $2/trade) - which makes it one of the best businesses one could ever have. You can't live without gambling - by e.g. going to be a salaried employee for Yahoo rather than Google or that weird newfangled "TheFacebook" thingy back in 2004, was a gamble. jspauld, statistically speaking, has made less of a gamble there than almost anyone else posting on HN. > So, everyone else, beware of making this a case study in how to make lots of money really fast. You are more likely to lose money. True. But that's true for every single success story posted on HN, reddit, or USAToday.
- martinced 14y agoExactly. I've played millions (!) of real-money online poker hands and won some money in the process (not anywhere near what most people who've played that many hands did). Most people don't understand that, when you're able to recognize patterns, playing millions of hands while never exposing more than 1% of your bankroll on any deal is not "gambling" but "printing money" (a tiny amount of money in my case compared to consulting but that is not the point). At the same time the very fact that obviously (seen most of the posts here) most people don't understand basic bankroll management, risk management, standard deviation, expected value, variance, etc. means there are probably quite some opportunities out there to make money for those who do understand that ; )
- gabemart 14y agoI think the real problem (as with so many problems) is definitional. What does "gambling" actually mean? If I tried to kludge together a definition, I might come up with something like: >Risking the loss of something of value in exchange for the possibility of gaining something of greater value in a situation where the determining factor of losing value or gaining value is random chance The problem with a definition like this is that, as others have pointed out, it applies to vast realms of human endeavor, from founding a company to playing the lottery. It also includes no distinction between risks with a positive expected value and risks with a negative expected value. If a lottery has ten $1 tickets for sale and each ticket has an equal chance of winning, there is an obvious difference between the prize being $11 and $9, but buying a ticket at either price is just as much "gambling" in the common parlance. What we really need is a word that only refers to gambling in situations with an expected value less than or equal to zero.
- motters 14y agoCorrect. The far more common story is "how I lost $Xk on the stock market". Probably most people with programming/AI skills have tried their luck with the stock picking problem at one time or another. I have a few times, but only in simulation. Even using very elaborate machine learning methods and a lot of training data, making money from automated trades is a difficult problem, and my impression is that it's very much like betting on horses or football games.
- agilebyte 14y agoHow is it like horses and football games? Don't the latter have a lot more people playing with their emotion rather than utilizing an algorithm? Something that you can take advantage of?
- martinced 14y agoIt could have easily been called "how i lost 500k with machine learning". If you've really worked in that field than it's very surprising you've never heard about what professional poker players call bankroll management (and they "stole" the concept from professional traders). The whole point is that you can --either if you gain an edge or get lucky-- win big. Very big. But you're never exposing a large part of your funds in the process. Maybe OP had an overall "stop loss" at, say, $10K. Had he had five minus $2K days in a row at the start, he'd be out. He wouldn't be broke. He wouldn't be without a car and without a bank account. He just would have lost $10K. But there's no upper limit as to how much you can win. All you need is discipline and sound bankroll management. And, yes, I've won a five-digits figure (hence not anywhere near what OP did) real $$$ at online poker. Starting from $0.01/$0.02 small blind/big blind tables and then working my way up using bankroll management. It's assymetric. You're foolish if you think that succesful traders who won $x were as likely to lose $x. This is simply not how it works and it's very well explained in OP's article. He's detailing what his maximal daily exposure was and it was tiny compared to what he made.
- jspaulding 14y agoI have some friends that have made a lot of money playing poker. The analogy is very good. But, in poker you have to be willing to deal with much bigger ups and downs than what I had to deal with. You can hit a bad streak and it can hurt - even if you are in fact a really skilled player and do in fact have an edge. With my program I didn't really have bad streaks because my P&L was averaged out over thousands of trades per day.
- sejje 14y agoNot always true. There are plenty of ways to minimize risk. I played HUSNGs for a living for several years, and I could play three tables at a time (about 9 games per hour) with a 60% winrate. That's incredibly low variance--my graph over the long-term was better than a 45 degree incline.
- incision 14y agoWell put. Risk management is probably the single most important thing to understand in trading. Unfortunately, it's something that lots of people learn late, if ever. Folks get caught up in the romantic notion of betting it all and winning big, but end up losers. Meanwhile, the consistent winners they aspire to be are exposing perhaps 0.2% of their roll at a time.
- deleted 14y ago[deleted]
- hogu 14y agoUh, if you look at his daily pnl charts, it looks like gambling with some extremely great odds, he rarely looses any money. That pattern is typically associated with HFT, If you can do many small trades and your strategy really has positive expected value you'll get great returns. I don't expect it would work now though, the HFT market is much more competitive these days.
- downandout 14y ago"Glorified gambling" is a pretty accurate description of this. However, that isn't necessarily a bad thing. If you have a situation where you can gamble with a long-term positive edge, then the proper strategy is to play with as much money and for as long as possible. The determining factor here is whether or not the combination of a particular investor's strategy, algorithm, and ability to execute will give them a long-term edge over others in the market - not whether or not this may be a risky activity in the short-term.
- tomjen3 14y agoYou know, that is a really good argument. Except two things: 1) He didn't lose money, he made 500k. 2) If this worked reliably, you would be out of a job.
- cheeseprocedure 14y agoEr... it doesn't work reliably, and by definition, cannot work reliably. If market inefficiencies exist to be exploited, then someone is ultimately getting the short end of every stick.
- brianjyee 14y agoGambling can be done intelligently and profitably. Don't be so quick to label gambling as a pitfall to be avoided at all costs. I am not a financial expert, but as someone with a background in math/probability based gambling strategies, I can see similarities in the financial markets.
- ww2 14y agoNo. This is not. Not ONE gambling. It is thousands of thousands of gamblings with a consistent winning ratio. cannot be oversimplified to a symmetric chance of win or lose.
- HockeyPlayer 14y agoI run an HFT group, and what he describes isn't what we'd call "retail". He was doing a number of things that professional shops do, including making markets to avoid paying the spread and paying attention to queue position to predict execution With a bit of luck and a good partner, this guy could have built a sustainable business.
- marvin 14y agoThis is a very mean and unconstructive comment to someone who made the impressive achievement of building his own automated trading system and actually making money from it. I've started calling out comments like this one, because they cause a bad environment for useful discussion. The only argument in your comment that isn't your own unfounded opinion is that market makers make money from people who execute trades. But this is true by definition. The traders who "gleefully picked off all those trades" weren't outsmarting anyone, they were simply profiting from the difference in the asking and offering price in the market. This is the role of a market maker, and actually makes it cheaper for people like OP to execute a large number of trades. So even though this comment sounds like a sensible rebuttal of the linked article, it doesn't really say anything at all. Again, sorry for creating a negative reply and contributing to a bad tone, but I really the right thing is to call out these kinds of replies. They discourage honest sharing and discussion. yajoe's comment is an example of how to criticize a post like this in a useful way. http://news.ycombinator.com/item?id=4748989 http://news.ycombinator.com/item?id=4748989
- KingMob 14y agoWhile writing his own trading system is a decent accomplishment, due to things such as an overall rising market in the time period involved and survivorship bias, the original author is likely to be completely mistaken about the reason for his winnings. Given that he might convince other people to engage in high tech gambling in a less-favorable market than the one he operated in, strong words are called for in this case.
- marvin 14y agoYou could argue this, but in that case your arguments have to hold water and not just be a cursory dismissal. Ref. yajoe's much more thorough reasoning.
- deleted 14y ago[deleted]
- lurkersmirker 14y agoI once worked for a software shop, and part of my job was writing trading code in a proprietary language for customers, who ranged from low end day traders to 8 figure annual revenue hedge funds. I had access to all kinds of tools, and saw many a varied strategy. There's quite a lot of money to be made selling solutions. I won't day trade.
- xanmas 14y agoWhat kind of solutions?
- throwaway1979 14y agoI'm a pretty risk averse guy and my typical reaction is to figure out why something won't work. One of my pet excuses is that assuming markets are efficient, someone must have already figured this out/ come up with a better exploit, etc. Most of the time I'm right. What troubles me is encapsulated in the following parable: A UChicago economist and graduate student are walking across campus. The student says ... hey ... there is a hundred dollar bill on the ground! The economist scoffs and says no there isn't ... if there was one, someone must have picked it up already. Sometimes I catch myself thinking this way. I have to remind myself that (a) markets aren't perfect, and (b) the real world has huge asymmetries in information, ideas, and perhaps willpower (by this, I mean while 100 people might think of a great idea, not all will attempt to implement it; even then, people will differ in execution). That said, you're likely right. This trading strategy will likely lose money today :-p
- jspaulding 14y agoIt's easy to fall into that mindset. And in fact, that mindset is right back where I am now. The only reason I had the gall to attempt this in the first place was the the simple fact that I was making money at the time (in 2008) 'manually' day trading the Russell 2000. I thought this 'should not be possible' so I figured there's no reason not to try an automated program.
- genwin 14y agoPeople will tell you that you were just a lucky monkey. But you could have run your algorithm on past data, for hundreds or thousands of fake portfolios, to tell, statistically, what the odds of your algorithm being simply lucky are. In early 2000s I wrote a machine learning algorithm that beat the S&P 100 with over 1 trillion to 1 odds against it being luck. It predicted a full trading day in advance. But that was all on paper at trading firms' puny costs; unlike you I couldn't beat retail costs. It's amazing that you could do that. For that reason alone I think it's highly likely that you were a skilled monkey. Also like you, nobody in the industry was interested in my code, even after an industry magazine watched it for 3 months and found it gave "stellar" performance. The few people I was able to discuss it with told me point blank that it was impossible to do it skillfully (efficient market theory), so they assumed it was a hoax or the algorithm was just lucky.
- ScottBurson 14y agoThere's a sentence in this article that is critical and yet very easy to overlook: the author had 2 years experience daytrading manually. That already gave him a lot of knowledge of how the markets work and where an edge might be found. I think that if someone is a good programmer and has some mathematical chops and has that kind of experience daytrading, taking a shot at automated trading is probably a reasonable thing for them to do. Without all of that background, you're right, they're almost certain to lose money.
- ishaanc90 14y agoI don't get you haters. sure the title is a bit misleading because he never really discusses what his alphas were. But its a pretty good high level description of the architecture of a hft system. I was a quant at GS and these are not the retail investors you pick off. You have your own set of alphas and most of them are meant to pick on mom and pops clicking away at home. This guy didn't reveal his strategy but nevertheless the graph shows his strategy had a significant edge. The lifetime of a strategy also looks like that. It is another thing that his title for the post is kind of off.