Hacker News new | past | comments | ask | show | jobs | submit login
Quantopian Brings Algorithmic Trading To The Masses (forbes.com/sites/tomiogeron)
95 points by fawce on Jan 24, 2013 | hide | past | favorite | 60 comments



Call me cynical but this is a bad idea, and not for Quantopian either. It is well known that only a small fraction of traders ever end up making money consistently.

Effectively Quantopian get a vast and relatively cheap set of researchers/traders to develop strategies and they can simply cherry pick and front run the most successful. This means that the actual developers of the successful strategy will quickly be muscled out.

Of course Quantopian would deny they would ever do this but they have full access to all your code and results and can do what they like with it. You really think a "Wall Street" company is going to be happy with your $nn a month subscription fee when they can see you are running a strategy that when scaled up a bit could make so much more?


This argument applies to any brokerage, and is why brokerages are highly regulated and subject to extreme SEC scrutiny. Once Quantopian offers you a way to trade (either by becoming or partnering with a brokerage), they will certainly be subject to the same rules.

Incidentally, "cherry pick...the most successful" is not that easy. In a universe of many traders, a few will succeed solely by random chance.


Regulated by the SEC does not mean much at all. All the major trading scandals have occurred in institutions regulated by the SEC. Trading institutions can do pretty much what they want - even today there is a huge amount of insider trading and market manipulation despite all the regulation. For example the latest LIBOR scandal.

Not sure I agree with your second point either. It is the same point made by Nassim Nicholas Taleb in his book Fooled by Randomness. That theory works fine if you think markets are random. They are are not, they are just hard to understand. Having said that I agree that in the very short term it is impossible to separate a strategy making money randomly from one that is fundamentally sound.


It's 8 guys hacking in a small office in Boston. Hardly a "Wall Street" company. (disclosure: I've worked with half the team before... and they're all the best devs I've ever worked with. I do not work for Quantopian.)


Many hedge funds have about 8 employees and are located in Boston. Does this mean they're hardly "Wall Street" companies too?


They are being backed by GETCO, which most definitely is a "Wall Street" company...


There are all sorts of reasons why GETCO might have chosen to back us (I work for Quantopian), but I can say with certainty that "Steal algorithms from the people who wrote them" wasn't one of them.

GETCO really doesn't need to steal other people's algorithms.


I may well be maligning you but on the other hand I have over 20 years experience working as a trader/researcher and developer in the finance industry for tier1 investment banks as well as hedge funds and have seen a lot. You are not doing this for "the greater good" you are doing this to make money, as is GETCO et al. Stealing algorithms and protection of algorithms are fundamental issues in the industry.

I would suggest you guys try to assuage fears about this by doing as much as possible to prove your true intentions.


You are not doing this for "the greater good" you are doing this to make money, as is GETCO et al.

Yes, we're doing this to make money. However, making money and doing good in the world are not mutually exclusive, and making money and stealing are not inextricably linked.

We believe we can make money at this, or we wouldn't be doing it. We intend to make money in an ethical way, giving our users the tools they want and respecting and protecting the privacy of their intellectual property.

Stealing algorithms and protection of algorithms are fundamental issues in the industry.

I entirely agree, but it does not follow that everyone doing algorithmic trading is a thief or that the only way to make money from algorithmic trading is to be a thief.


Quantopian suffers from a few problems (not unlike Access or the other 4GLs):

1) platforms like thinkorswim get you 90% there (and have an associated brokerage so you can also run it). You can write powerful trading scripts using a wide variety of signals, but for the last 10% you will need something more powerful like C or matlab or excel.

2) terms of service are always shaky -- if you have alpha, you want to guard that like a first born child.

3) other people (http://tradingphysics.com/) offer market data at very low prices, which is far better than trusting a third party with your code

4) oftentimes strategies don't directly translate to production profits, and to a great extent they depend on simulator assumptions (let's say that there are 10K shares offered at the best selling price what happens when you try to buy all of them? What happens if you are stopped due to RegNMS or some other oddity? What happens if the quote is fake or will be canceled by the time your order reaches the exchange -- a common tactic of Chicago firms like GETCO?) for which you have no control. But now, given that they don't have a BD license, you need to go through someone else (adding another layer and process that potentially could cause problems later on -- I've seen a similar situation happen where a person leaves one company to join another, only to find out his trading strategies don't work in the new place )

Tl;dr: there are better platforms for getting your feet wet, and if they aren't good enough you are better off going with a real solution.


What happens if the quote is fake or will be canceled by the time your order reaches the exchange -- a common tactic of Chicago firms like GETCO?)

I'm curious - which FIX command is used to send a fake quote? And which exchanges support this feature?

Also, how does GETCO cancel an order before your order reaches the exchange? I.e., how does GETCO know to send it the exact instant before you send yours?


...but for the last 10% you will need something more powerful like C or matlab or excel.

Pandas can stand up to any of those. And you make the (incorrect) assumption that the features that Quantopian is offering now are the same features we (I work for Quantopian) will be offering in six months or a year. The product will grow. We will give users what they want and need to be successful.

oftentimes strategies don't directly translate to production profits, and to a great extent they depend on simulator assumptions...

No more or less true of Quantopian than of any other platform, off-the-shelf or home-grown, for quantative trading.


If you have alpha your broker will reverse engineer it until their last breath...


Both the sites you list seem to be US based. Are there any UK based solutions?


www.timetotrade.eu


It's an interesting idea, but most successful retail algo traders probably won't trust their bread-and-butter algos to a cloud-type solution. I've been algorithmically trading for a few years now, and I've invested money into Ninjatrader, where I program my algos and run things from my own computer.

If anyone had their own algos, they would probably be too paranoid that Quantopian would run backtesting on every single algo, and cherry pick the best ones for themselves. Whether or not it's true doesn't matter, it's most likely the common thought process that any successful algo trader would have.

That would leave only the inexperienced and beginning traders that would be more apt to fail, since algo trading is very, very, very hard.


Trust is essential (http://blog.quantopian.com/on-trust/). We see trust as something we earn over time with transparency and openness. We even open sourced our core intellectual property, the backtester itself: https://github.com/quantopian/zipline

We also believe setting our own incentives to match our members' needs is key to sustainable trust. That's why Quantopian doesn't invest its own capital - we want to be purely focused on and motivated by serving quants.

Being a successful quant takes many things - talent, mentorship, access to data, great systems, discipline. We started with backtesting because many aspiring quants end up skipping rigorous backtesting because of the time necessary to develop the test harness. We focused on community from the start to help connect new talent with mentors.

If you're not ready to trust us with your algorithms, I hope you'll trust us with a bit of your time. Come share some of what you've learned over the years with our community.


Keep in mind that Getco is one of their investors. That is serious conflict of interest! These unsophisticated retail users are going to be eaten alive.


Getco is, by all accounts, a money machine. I don't think they're gonna throw it all away by doing something pointlessly illegal like front-running hobbyists. Or maybe I don't know what you're getting at.


I saw this as a way to dig into the order flow business, but it seems they don't have their ducks in a row -- I would have waited for the production trading setup first (which I presume GETCO would provide via OCTEG LLC) before getting PR coverage


Do you have any book recommendations? Technical analysis? Quantitative analysis?

What makes it so hard--trying to come up with a good model?


I'd argue that a lot of the hard parts of algo writing are solved by Quantopian. Hard:

* Data. You need to test your idea. Most historical stock data (like Yahoo) excludes companies that went bankrupt or were bought or otherwise disappeared. That's called survivorship bias. If you run a backtest on the finance industry and you don't include things like Lehman, you're going to get the wrong answer. Add in things like Hurricane Sandy, MLK Day, 9/11, mergers, acquisitions, stock splits, etc. and data is very painful to put together. * A backtester. Once you have you data, what do you put it into? How do you calculate commissions? How do you calculate slippage (your order affects the price, remember)? How do you avoid look-ahead-bias and other bugs that plague backtesters?

Coming up with an idea to trade is hard, but it's only a part of the problem. I'd say it's the most fun part of the problem, but it's only a part. Quantopian is trying to remove all of the hard parts and let you do the easy parts. We have tens of thousands of lines of code (backtester, IDE, etc.) and we're leaving the most exciting 100 lines of code to our members.

On the other question about books. I'd recommend a couple: * Ernie Chan's book is a great place to start http://www.amazon.com/Quantitative-Trading-Build-Algorithmic... * More advanced: http://www.amazon.com/gp/product/0470128011/

I work at Quantopian.


I would describe data collection/mangling/processing as more annoying and tedious than "hard". I'd seen the Quantopian github account before, and appreciate what ya'll have done. I didn't know there was a business model behind it, but I get it now.

You said it solves "the hard parts of algo writing". I guess that's true if speaking of algos in a general sense, it makes it easier to get started. But if the goal is to write profitable algorithms, then its much less true. I just looked again at the API, and using it to create a profitable strategy would actually be more difficult (and less profitable) than it would be to trade elsewhere.

The main reason is because the function to make a trade will only place market orders. Its well known (in the financial literature) that an algorithm which trades with limit orders will almost always outperform one which trades with market orders (pretty much obviously true since the limit order is the better price). That's because where a passive trading (market making) algorithm is earning the spread, with market orders you have to beat the spread just to break even.

Of course, that's why many brokers only allow market orders (they collect the spread as their trading fee).

Also, I don't see how the backtester avoids look-ahead bias. Backtesting like that just encourages Data Dredging[1] an algorithm overfitted to the test set. It would be better to backtest on random subsets of the data (cross-validation and all that). But I can understand why that isn't done (would be harder for users to create should-be-profitable algorithms and start trading with them).

1. http://en.wikipedia.org/wiki/Data_dredging


The main reason is because the function to make a trade will only place market orders.

We (I work for Quantopian) will surely support other order types when we support live trading.

Also, I don't see how the backtester avoids look-ahead bias.

We provide over ten years of historical minute bar data for U.S. equities, with no survivorship bias. This means two things:

1. The amount of data we provide is sufficiently large that if you test your algorithm against a bunch of stocks over that entire period of time and it performs reasonably well, it's unlikely that it's overfitted to the data in a way that is going to bite you on the ass in live trading.

2. But just to be even more paranoid, the smart algorithm writer will do just what you describe -- divide the available data into lots of subsets, randomly pick which subsets of the data to test again each time you backtest, and don't start live trading an algorithm until you've confirmed that it performs well on random subsets of data that you haven't previously tested it on. Right now on Quantopian you'd have to do all that data segmentation and selection by hand, but I suspect that we will eventually add features to make it easier to do automatically.


> We (I work for Quantopian) will surely support other order types when we support live trading.

I suspect they won't be true limit orders, but stop orders (true limit orders wouldn't slip). Also, for a passive trading algorithm its important to have level II data (the order book), or the algorithm is flying blind.

Re 1, its not the size of the data set which prevents overfitting (larger data sets actually make it more likely), but the use of it when developing/training the algorithm. Repeated testing and tweaking the algorithm will overfit, unless one is careful to maintain the complexity of the algorithm.

Anyway, best of luck to your users! But they should be warned that active trading on signals (price prediction) is the hard way to algorithmic profit. That's why market making and arbitrage is the bread and butter of the pros, not signal trading.[1]

1. said as much here somewhere in the first 20:00 http://www.youtube.com/watch?v=hKcOkWzj0_s


In that video the quotes to which I guess you are referring are "[investing] is almost entirely a non-professional role" (08:40), "[Market-making] is a highly professionalized role" (09:13), and "[an arbitrageur is a] highly professional role" (11:22).

I thought the video had something in support of your "price prediction is the hard way to algorithmic profit" statement, but I can't find anything very explicitly in support of that (what I thought was your implication). He kind of implies something like that at 15:00 when he says "we have no idea how [price prediction] works [at longer then a few days in the future", but that's not really very strong.

When you said "active trading on signals [...] is the hard way", did you mean active trading at minute-to-day or greater holding periods? That seems a) right :); but b) slightly at odds with your "it's important to have level II data", since I would have thought that is less important at a hourly-to-day or greater holding period.


Backtesting is only 1/2 to 1/3 of the actual task of algorithmic trading. When it comes to actually trading money, if you're not careful and cover every corner case, you really could lose your shirt. I can't believe that 100 lines of code is all that you would need to cover all the edge and failure cases that could lose yourself a lot of money.

What happens if the network drops while you're in a trade, or in the middle of executing an order? What if you have a partial fill, and you have a partial buy order hanging around and a full sell order out there? What if you have a stop limit order to exit a trade, and it blows through your limit? Do you have a backup stop order just in case? There are a lot of issues that you can't backtest that can only be learned once you start trading real money. I've had situations where I ran my algos on the DAX overnight, and I woke up to find that the exit order never executed, and I was 1000 euros away from where I should have gotten out. Luckily, this trade was in my favor, but it scared the shit out of me because it could have easily gone the other way. I've also had my internet connection drop overnight, and I had to scramble to figure out how to get out of a trade I was in.

The other issue is interpreting backtesting data, and knowing the difference between over-optimized data (ie. curve fitting) vs something with an actual edge. You can make almost any algo profitable if you curve-fit, even a simple MA cross-over can show extremely profitable results, if you over-optimize the data. But it won't work in real life. So being able to sift between falsely good algos and actually profitable algos is very, very hard, and takes experience. This is the biggest problem with trying to find an actual algo with an edge, it's very very hard.

I wrote my own backtester and I download my own data nightly, and that definitely takes a lot of time and effort, but the hardest part is the actual trading, by far. The psychology involved with trading is an order of magnitude harder than coding, and the hardest thing I've ever done in my life. I blew through a shitload of money, just to learn the ropes.

In terms of algo trading books, I really don't have any recommendations. I found most of the algo trading books are similar, telling you to watch out for curve fitting, etc. Where they lack is helping you come up with actual trades. My recommendation is a book called "Mastering the Trade" by John Carter. He gives out trade setups that he actually used. They may no longer be profitable, but it's the closest thing you can get to actually learning various day trading techniques, and you can implement those to get an idea, and then work your way from there.

I'm not hating on Quantopian, it looks pretty nicely done, and hopefully it takes off. But from experience, I know that algorithmic trading is by far the hardest thing I've done. If inexperienced traders jump in, they'll spend a lot of money on "tuition" for sure.


What service do you use to download your market data?


I use IQFeed. I pay about $80/month for it to download tick data for futures and stocks.


Try the paper "The Winners and Losers of the Zero-Sum Game" by Lawrence Harris. I found it most enlightening. I'm paying it forward, since it was here that I saw it recommended (hat tip to tptacek iirc).

What makes a zero-sum game so hard? Competition. Read Nate Silver's book chapter on Poker for a great explanation of that. In summary: he won a lot of money playing online poker when the services were growing and there was a large supply of fishy players (losers). When the growth of new poker players stopped, and the fish had mostly left (after losing their money), then he started losing.


I just read this book last night, it is pretty good:

http://www.amazon.com/gp/product/1118410858/ref=oh_details_o...


Reading books won't get you anywhere. You have to work in the industry to know the tricks. There are a lot of smoke screen mirrors in this industry.


Do you mind sharing your broker? Is it available for non US residents?


This is not a good idea. People can barely invest in regulated securities doing a dipshit buy and hold strategy.

For professionals - brokerage houses already do most of the hard work and provide decent APIs - so they don't need it either.

Algo trading is cool - but it's most definitely NOT for the masses.


I'm happy for Quantoplan making steps to improve the user experience around algorithmic trading, however armchair traders and many hedge funds have been using platforms like Tradestation (and dozens of others) to back-test and develop algorithmic strategy for well over a decade.

I spent a year working as a researcher for a now-failed hedge fund (failed due to regulatory issues, not performance, we were doing 20% year over year on commodity futures). As an engineer/math guy, it was an incredibly interesting experience because it opened my mind to all sorts of theoretical possibilities and explorations of pattern matching, noise filtering, exotic concepts like wavelets and more.

However, I quickly learned a few things from experienced traders and from seeing my work move from testing to prod. What I learned makes me extremely hesitant to employ automated trading systems on my own money:

1. Historical back-testing is a great way to curve fit. You can hyper optimize your algorithm looking for arbitrage opportunities, trends, whatever. You'll get performance reports that make it seem like you're ready to print money. Then you get out and trade and discover that your system can't keep up with market movements because the indicators that you relied upon may have exhibited correlation but not causation.

2. The boon of algorithmic trading is that it attempts to remove emotion from the trading process, not that it is a better predictor. Listening to a machine should help alleviate the symptoms of "fear and greed" that lead to abrupt, incorrect decision making. Think about that for a minute, some hedge funds advocate algorithms not because of predictive power but as guarantees of rational decision making.

3. Conversely, while developing and testing a system, a smart person will almost inevitably try to bring in exotic concepts into price prediction, order sizing and trend following functions. Given enough time, complexity will increase until it becomes challenging to understand the rationale behind a system's output. Trading this way is scary because real money is being moved without an understanding of fundamental and macro-factors.

4. You will very likely lose money. Even at the size of our fund (1B under management) we were sometimes at the mercy of market makers who gave us crap prices on trades or seemingly manipulated prices to hit our stop orders and cause us to exit positions too early.

I love seeing the ideas behind algorithmic trading popularized, however I want to make sure that anyone embarking on it understands the market as a system and not just as a time series to be modelled. It's composed of real human beings, with emotions running wild. If you decide to play, then play, but do so wisely and carefully and remember to keep it simple.


There's a lot of criticism here, but as someone who has never done algorithmic trading before - it's very exciting. I don't believe Quantopian's intention was to target veterans, since I'm sure you vets have your own system for testing and trading already worked out.

As a newbies with no experience in the field at all, it is unlikely that I would've even tried without a platform such as this. If Quantopian's intention is to bring more people into the field and get them exposure, even now, it's quite an impressive stepping stone.


> As a newbies with no experience in the field at all, it is unlikely that I would've even tried without a platform such as this. If Quantopian's intention is to bring more people into the field and get them exposure, even now, it's quite an impressive stepping stone.

This assumes that people with an inability to get experience should get into a field where one can lose one's shirt in less than 24 hours whilst competing against some of the smartest people on Wall Street.

There are barriers to entry to various things for a reason - e.g. driving, steel milling etc.

It's to stop newbies getting shot.


You can lose all your money in so many ways; a reasonable expectation is that players will use caution, and hedge their risks.

Applications aren't meant to teach common sense.


beat me to it, working on something similar... with a twist. btw they're on github : https://github.com/quantopian


Hi undrcvr, I work at Quantopian. We'd love to hear your thoughts on our open-sourced Zipline backtester: https://github.com/quantopian/zipline and learn more about what you're building - there are lots of interesting challenges in this space.


Indeed there is lots that can still be done. Not going to share anything here, but don't worry, I don't believe in backtesting so I'm not implementing it =)


How do you guy handle situations where there may not be a trade that day. For example: with OTCBBs. Also, how would you handle unexpected market closures [such as the flash crash?]

I've been developing my own back tester for quite a while [in Java] and I must say: You guys are doing some interesting stuff and its a challenging area.


Our backtester is event driven. During any closure, there are no events, so we simply "fast forward" through the closure and send your algorithm the next available event.

We provide a facility for working with trailing windows as pandas dataframes, which are updated by the events. You can control whether those trailing windows have NaN values for missing bars, or if values are filled forward. You'd keep the NaNs if you want your algo to be aware of empty bars (stock is held, thinly traded, etc). You keep the fill forward if you want to avoid coding guards on NaNs :).


I will be releasing my own algo trading system open source in Feb, if anyone is interested. I'll do a post on HN once it's released.


would you share a twitter link so we can be alerted when you release?


I'm @hitechnomad on twitter. I'll tweet once it's on github. The system I'm open sourcing is my own system for trading on my Interactive Brokers account. It should be able to handle any FIX-based exchange/brokerages. Currently finishing a contract at a bank, and I can't trade on my personal account while I am doing this contract, which is why I am waiting until Feb to post it.


I use IB too. What language is the framework in ? Java ?


c++


Wouldn't you need a broker account with minimal spread and very low broker fees for this to work?

The banks who are already doing high frequency trading don't have to worry about this, they can profit off a trade after its gone up a fraction of a point or so and close the trade, your average trader has to make up for the transaction fees or spread which are sometimes 10 to 100 times what a bigger firm has to cover.


I'm a bit surprised about the amount of people afraid of trading in HN. Or rather afraid that others would trade en-masse.


Is algorithmic trading a force for good in the world? If not, is it a good idea to increase the number of people using it?


Algorithmic trading is a force in the world; whether it is good or not depends on the people wielding it. I think the danger isn't the technology itself, but the small number of people who understand, develop, and control it. I believe having more quants will give algo trading/quant investing a better chance of being a force for good.

(I work for Quantopian)


HFT isn't.

We're not doing HFT. We're doing algorithmic investing. There's a big difference.

(I work for Quantopian.)


Great job. Surprised at the amount of negativity for an app that is meant to help people.

This is one of those disruptor-style apps that pierces the veil of an industry and brings professional level tools to the masses.

I sat up from my chair after seeing this and said "wow". Have not done that for an app in a long time.


This will be cool if/when it has:

- options

- futures

- fundamental company data

Until then, it's matlab.

edit: Ok, this is a bit harsh. It's already pretty cool.


Which broker-dealer do you use to route your orders to the exchanges?

Do your orders flow through Getco's infrastructre at all?


We don't use GETCO's infrastructure at all. They help us with expertise in the field and advice on how to build software for traders.


We aren't routing at all yet, and we're actively researching alternatives.


Great stuff.


great work guys..




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: