We strive to make the Quantopian platform safe, stable, predictable, and quiet. We want you all to be able to run your algorithms at any time and get exactly what you expect. That means live trading that performs like backtests, the same backtest every day get the same backtest result every time, and so on. We want you to worry about writing brilliant algorithms and us to worry about almost everything else.
To achieve that, we do a lot of testing. Virtually every platform change gets a dry run with real, production algorithms in a staging harness before the change ships. We ship new code almost every day. The fact that you don't notice that is something that we're proud of.
As a practical matter, though, some platform upgrades are harder. This is particularly true where we are taking advantage of some relatively cutting-edge open source software. These packages move quickly, they're close to the core of what we do, and they don't always upgrade easily. Tonight is one of those nights.
We've been testing this set of software updates for weeks. We've been in email correspondence with dozens of our community members, letting them know that their algorithms are going to be affected. We've helped them update their algos so they'll run just fine. We're confident that we've found everything that affects any real-money algorithms and contest algorithms. However, we haven't used the same rigor on non-contest algorithms, and we are quite certain that some existing backtested algorithms will break. We're sorry for the inconvenience.
The biggest change we've seen is in pandas. If anywhere in your code you use this pattern:
dataframe = history(...)
if dataframe: # This will break
# do things
That's not going to work anymore. pandas changed the "truthiness" of the dataframe result. The good news is that it's trivial to change your code in a backwards compatible way. The new code is required to be more explicit and could look like either of these options:
if dataframe is None: # valid, check for existence of a dataframe
or
if all(pd.notnull(dataframe)) # valid, check that no entry contains nan
For the detail oriented, these are the big package upgrades tonight:
package | old version | new |
---|---|---|
numpy | 1.8.1 | 1.8.2 |
pandas | 0.12.0 | 0.15.2 |
pytz | 2014.4 | 2014.10 |
scipy | 0.12.0 | 0.15.1 |
statsmodels | 0.5.0 | 0.6.1 |