Quantopian is the first algorithmic trading platform in your browser. Write (or clone) an algorithm; test it against 11 years of US stock data; paper trade it against live data; and then trade the algorithm through your brokerage account. Quantopian also hosts a community where members can ask for help, share ideas, discuss code, and share data. Members can learn from each other and work collaboratively.
There are more answers about Quantopian in the About Quantopian section below.
Quantopian's community and backtester is free for everyone to use. There will be a charge for connecting your algorithm to your brokerage. Pricing isn't finalized, but we're considering a flat monthly fee.
You own your algorithms. Everything you write is yours. Quantopian does not own your algorithms; you do.
Your algorithms are kept secret. We are committed to protecting your intellectual property and keeping it safe. Ideas are some of the most valuable assets anyone has. We take this responsibility to our members extremely seriously.
If you choose to do so, you can share your algorithm so that others can see it. If you choose to share an algorithm, it is still owned by you, but it is obviously no longer a secret. A shared algorithm can be used and adapted by others.
- Click here to see a basic algorithm.
- Click the 'Clone Algorithm' button.
- Click the 'Build Algorithm' button. You'll see the backtest running in the right-hand panel. Now customize your algorithm!
- In the algorithm, see how it says 'sid(24)' - that's Apple. Delete the '(24)' and type your favorite company name. See the auto-complete? Again, it's easy!
- Click the 'Build' button. You've just tested your own, customized algorithm!
We currently provide minute-level bar data of all US stocks from January 2002 through the previous trading day for backtesting. The previous day's data is uploaded every night.
Minute-level bar data consists of the high, low, open, close, and volume for each minute that a stock is traded.
The data includes all companies that were traded, including companies that have subsequently gone out of business. This is very important in order to avoid survivor bias. Without this complete data set, your algorithms would be be blind to the possibility of bankruptcy and the resulting losses.
For paper trading and real-money trading, we get a realtime feed of trades from Nanex's NxCore product. Those trades are bundled into one-minute bars and fed to the trading algorithms. Paper trading data is provided on a 15-minute delay. Real-money trading is processed without delay.
At this time, no. The only data we have is US stocks.
We plan on adding more data sources in the future. Please give us feedback and let us know what data you are looking for.
We also plan on making it easy for our members to add and share their own data sources. We'd like to see what data ideas the community can come up with.
If you haven't seen it yet, How Do I Get Started has the basic steps. For more information, see this short overview of how to clone and edit algorithms easily. See this longer, 4-minute video if you would rather write your first algorithm from scratch.
Our Quantopian documentation goes into great detail about what functions are available. Between the functions and the examples, you should have enough to get started.
We don't have any Python resources ourselves, though we're thinking about ways to help our community be better Python programmers. Until then, you should take a look at Python tutorial, Dive into Python, and Learn Python.
Our best advice is to go to the community and see what they've done, and innovate on top of someone else's idea. If you're still stuck, write a new post in the forums - you might find someone with an idea who would like to collaborate with you.
Only specific, whitelisted Python modules can be imported. If you need a module that isn't on this list, please let us know.
Unfortunately, no, you can't. We're only supporting Python and we have no plans to support another language at this time. The good news is that Python is reasonably simple and very powerful. You won't have much difficulty porting your work into Python. If you get stuck, ask the community for help. You'll find them very happy to help.
You can use any IDE that you'd like, but in the end you need to paste the code into our IDE to run a backtest. Give our IDE a try, though, and we think you'll like it. There are many smart auto-complete features that make writing a backtest easier. We've done a lot of work to put in smart error messages that will help you debug. And you can't beat the feedback loop. Press the build button (or just control-B on your keyboard) and you'll see a quick backtest run immediately - you can't get that in your IDE.
If your heart is set on using your own development environment, take a look at Zipline. Zipline is our backtester, and we have open sourced the code. If you want, you can connect Zipline to a data source and use your own development environment.
Unfortunately, we cannot do that. We license the data from a third-party vendor. Our license permits you to use the data, but it does not permit us to give you a copy of it.
In minutely mode, our backtester runs an event loop (handle_data()) once per historical minute. Every run of the loop loads the data for that minute and executes your algorithm. If the algorithm calls for a buy or a sell, that order is placed. If there are any open orders, the backtester attempts to fill them. (Note, an order that is placed in one event loop is not filled in that loop; it is filled in the next loop. That prevents any look-ahead bias from leaking into your algorithm.)
You can choose to run at minute or daily level of granularity. The only difference is that in daily mode, the backtest runs one event for every day of available data. Daily level data is simply the aggregation of the minute level data.
This is a very complex area, and there is no 'right' answer. It's impossible to say for sure what impact an order would have had in some alternate history where your algorithm was running.
Our backtester makes its best effort to calculate the realistic impact of your orders on the execution price you receive. When you place an order for a trade, your order affects the market. Your buy order drives prices up, and your sell order drives prices down; this is generally referred to as the 'price impact' of your trade. The size of the price impact is driven by how large your order is compared to the current trading volume. The backtester also evaluates if your order is simply too big: you can't trade more than market's volume, and generally you can't expect to trade more than a quarter of the volume in any minute. All of these concepts are wrapped into the backtester's slippage method.
You can control how this is applied within your algorithm. Learn more about this in our Quantopian documentation.
When you run a backtest your algorithm is compared to a benchmark. The benchmark is the price return of an ETF designed to match the S&P 500. In the future, we plan to make that benchmark configurable so you can choose the benchmark appropriate to your algorithm, including a value-return version of the S&P 500.
When you 'build' your code in the IDE, that runs a backtest. A full backtest is essentially the same, but it permits you to see a lot more detail - deeper risk metrics, position information, transactions, and more.
Yes, you can! Quantopian's backtester is released as an open source project called Zipline. If that's where your passion lies, you can clone our code and modify it as you see fit. If you make a change that you think others would like, we'd be delighted to have you pass the change back to us.
We adjust our data to take into account corporate actions. We use 'adjusted close prices.' That means that the effect of all stock splits and merger activity are applied to price and volume data. As an example: The stock you're looking at is trading at $100, and has a 2:1 split. The new price is $50, and all past price data is retroactively updated 2:1. In effect, that means you can ignore stock splits unless the stock you are looking at will split in the near future - as soon as it does, that will be applied retroactively to all data.
As an example, you can see this backtest using
Dividends are applied differently. On market close of the dividend ex-date, the value of the stock is marked down by the amount of the dividend. On the dividen's pay date your portfolio cash is increased by the amount of the dividend.
We take privacy and security extremely seriously. We will never access your algorithm unless we are helping you troubleshoot issues.
From a technical perspective, we have a number of security features in place. We never store your password in plaintext in our database. We require SSL encryption for the Quantopian application. We require secure websocket communication for all backtest data.
All trading algorithms in our database are protected by 256-bit, salted AES block-chaining encryption.
We never save the password of your brokerage account.
Currently, the use of Quantopian is free of charge. In the future we plan to charge for live trading, when you trade your algorithms through your brokerage account. It is our intent to keep the backtester and data free of charge.
Quantopian has received funding from Khosla Ventures, Spark Capital, GETCO, and angel investors. We're using that investment to build the backtester you see today, and we hope to turn it into a profitable business in the future.
Quantopian was founded by John 'Fawce' Fawcett and Jean Bredeche. Fawce previously founded Tamale, which was acquired by Advent Software. Jean has worked at several startups including Tamale, where he met Fawce, and HubSpot.
You can read more, including our LinkedIn profiles, social media accounts, and code repositories on our About Us page.
We're working on several aspects of the website. We continue to improve the backtester, improve the community, improve the IDE, and add new data sources. We have a pilot group of customers doing live trading today. We hope to have an open beta for live trading in early 2014.
No, it's not high-frequency trading. High-frequency traders are trying to shave milliseconds off order times and microseconds off of trade times. Quantopian is aimed at much more low-frequency trading. Our trading is on the minute level at the fastest, and most algorithms we test have position hold times for several days.
No, not yet. All of our support is done through email to firstname.lastname@example.org or through questions in our forums. When we get closer to a paid product offering (like live trading) then we will add paid support of some type.
Sorry, something went wrong. Try again or contact us by sending feedback.
Join Quantopian. It's free!
Once you join, you can: