HN user

dunster

77 karma

Work at Quantopian. Live in Arlington, MA.

Posts2
Comments24
View on HN

Quantopian is home to 120,000 people learning algorithmic trading, including students, data scientists, academic researchers, developers, and finance professionals.

We provide a research platform, market simulation, and data for free. We also provide tutorials, community, and lectures to teach you how to get good at it. I recommend you take a look at the Getting Started Guide (https://www.quantopian.com/tutorials/getting-started) and then start going through the Lectures (https://www.quantopian.com/lectures). The lectures cover some important statistical topics, and they get into how to apply those concepts to algorithmic trading.

disclosure: I work for Quantopian.

Quantopian's revenue model is to build a hedge fund and charge the fund investors returns/management fees. The algorithms in the hedge fund come from the Quantopian community. We work with the best algorithm writers on our platform, negotiate compensation, and then put their code to work.

We would be crazy to charge people to use our platform. We need thousands of algorithms, and charging for the platform would be one of the faster ways to kill our business.

Yes, you can code to Interactive Broker's API. But where would you get your free minute historical data for backtesting? Or corporate fundamentals data? Or the free IPython research environment? Or the community of 60,000 quants giving each other mentoring and advice?

I work at Quantopian, so you can imagine my answer to all of those questions.

There's a slightly different methodology here, but one consistent with what you're looking for.

On one line, buy-and-hold the S&P 500. Re-invest all dividends. You are 100% in the market at all times.

On the other line, buy-and-hold all companies run by female CEOs, weighted by the number of companies. Rebalance your portfolio every time a company is added or removed. You are 100% in the market at all times.

I think that if you look at the IPython notebook that the Fortune article refers to you can find the details spelled out in code.

(FWIW, the calculations are done by a she, not a he! It's my colleague Karen.)

We work very hard to make our interests aligned with our community members' interests. We don't literally make money from the algorithms in the contest. What we're doing is encouraging hundreds and thousands of new people to write algorithms. The best ones will be invited to join our hedge fund, we'll negotiate compensation with them, and we'll take investment from pension funds and endowments and the like. In that sense - yes, when our customers win, we win too.

As for the judging, I think you'll find it be very transparent. There are 6 return and risk metrics calculated for both the backtest and the paper trading. The 6 metrics are weighted equally to generate an overall score. You can see the metrics for every contestant and the combined score on the leaderboard. You can verify it all by downloading the CSV. https://www.quantopian.com/leaderboard

It's both forward-testing and backward testing. The algos have been locked since submission - some were submitted as early as 1/15, all were submitted by 2/2. That makes it both an in-sample and out-of-sample test.

Yes, the Quantopian platform includes default commissions. It also includes default slippage. No model is perfect, of course, but this is a tool that's had a lot of development.

(I work at Quantopian)

I think you're looking at the trees, and you should step back and look at the forest.

The fraction of CEOs that are women is dramatically smaller than the fraction of the population that are women. There is no qualitative explanation as to why that should be true. So long as that remains true, it's worth looking into why it is true. The relative performance of the group is fair game for investigation.

We get this question at Quantopian periodically.

You retain ownership of the content you put in our system; everything you write is yours. Your intellectual property remains private and your own. You can read more about our policies in our terms and in our FAQ (https://www.quantopian.com/faq and https://www.quantopian.com/policies/terms)

Of course, there is no way that we can prove or guarantee that we're not peeking. Like anything else in the cloud, at some point it becomes a matter of trust. That's why we did our About page a bit differently (https://www.quantopian.com/about). We're all startup veterans with reputations in the industry. You can click the links there and find out who we know in LinkedIn, and see what they say about us. We hope that our good reputations make it easier for you to trust us. Of course, that is entirely up to you!

Another solution is to write the algorithm but avoid the hedge fund - lots of suits, and they take most of the money. You're better off if you trade it yourself.

People work for hedge funds because hedge funds provide mentorship and really powerful tools and lots of data to sift through. We're trying to provide all of those things, for free, at Quantopian. https://www.quantopian.com/ Check out our community (for mentorship), our backtester (very powerful, and open source), and our 11-years of minute-bar data - all for free.

Very neat story. Thanks for writing it up. The nuts and bolts of this kind of operation are fascinating. I know a lot of people out there have trading ideas, but don't really know how to implement them.

If you just finished the post and you want to try coding up a trading algorithm for free, check out http://www.quantopian.com. It uses Python, not MQL, and provides free data and backtesting. (Yes, I work at Quantopian)

Aneth. . . . you're reading our mind. Come back to Quantopian on Thursday. I think you'll like what you see.

Yes, there are people who trade today and make money using algorithms. They are few and far between, mostly because the toolset is so hard to build. Data, backtester, trading platform, etc. all take a long time to build. We're trying to make it much easier by providing all the tools. You need an idea; we'll make the rest work for you.

Cash management is built already. We track how much you have, dividend payments, all that stuff. We've built many risk measurements, too: alpha, beta, Sortino, Information Ratio, etc.

Risk management is far more complex. Risk management is more a part of the algorithm itself than a feature that we can build. That said, we can add more risk tools. We're very open to suggestions, if you have some in mind.

Yeah. This algo is highly leveraged - like 15X. It's possible to really lose your shirt if you trade this algo exactly.

Taibo's algo is interesting as a starting point. It's not one that that you just take off the shelf and start trading with. But, you can take it and learn from it and develop an alternative strategy. Presumably one with less risk!

There aren't a ton of hurdles left before we start offering "live trading" on Quantopian. We have all the pieces, we just need to stitch them together. A couple more months, I think.

In the beginning, at least, it will be leveraged through your existing brokerage account. You're going to integrate Quantopian with your brokerage, and Quantopian will place orders for you with your brokerage.

If we're as successful as we hope to be that will mean we're driving a lot of trading volume. If you start driving enough trading volume, the exchanges start to pay you rather than the other way around. It would be a pretty sweet day if we can offer trading for free to our members and fund the company on the exchange fees.

That's a very interesting system you've built.

The the thing about backtesting a strategy is that it is very easy to make a mistake in your backtester. Look ahead bias is the most common mistake.

Another challenge is the data. Are you testing against a history of stocks that includes bankruptcies? If not you have survivorship bias.

I suggest you take a look at my website, www.quantopian.com. Look at our open-sourced backtester, https://github.com/quantopian/zipline. Between the two we can help you get past those two sources of error.

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.

You might be interested in zipline, an open source backtester written in Python. Zipline, Quantopian's open source backtester (yes, I work at Quantopian).

The backtester is designed to also be a trading engine. You feed zipline data in "events" where each event is a point in time. Zipline doesn't care if the events are live or replayed from a database - it processes the data and executes any trades in the order book.

The tricky part here is that zipline is more aimed at implementing trading algorithms. You'd have to write a simple algorithm to implement the buy/sell orders coming in.

https://github.com/quantopian/zipline

We wrote a bunch, and used a bunch, so there is no straight answer. A short list: highcharts for charting, jquery and underscore for the glue, crossfilter for data filtering, bootstrap for components, codemirror for the IDE, handlebars for templates, markdown for markdown, prettifier for code highlighting, and the list goes on.

If you find Quantblocks interesting, you should also look at Quantopian. (www.quantopian.com)

We're geared a bit more towards programmers. Rather than use blocks, our members develop their algorithms in Python. We have an in-browser IDE with a lot of smart auto-completion.

A few of our nifty features: * free access to 10 years of by-minute historical data for all US stocks * the writer of the algorithm owns the algorithm * batteries included - all of your favorite Python math and science packages including Pandas and NumPy * a robust backtester that models slippage, commissions, risk metrics, and more

We also have a community of quants and programmers who like talking about this kind of stuff. People share code, give advice, ask questions, etc.

Full disclosure: I work for Quantopian!

Happy hacking,

Dan Dunn