Agreed. The notbook/IDE arrangement on Quantopian is not ideal. I gather that there are some fundamental reasons why we have the current set up, versus a more conventional one, akin to a desktop development environment. Security issues are near the top of the list, I would imagine. There is also an element of surveillance in the Quantopian business model, with the consent of its users (no different from all the other "free" web offerings). The idea is that you launch a full backtest and then Quantopian gets to assess it into the future. So, a snapshot of your code needs to be captured, so effectively, any files you pull in to your algo would need to be captured, as well, and "frozen" such that the backtest can't be changed by your changing one of the files (I'm not sure how Quantopian manages the modules that are imported...I gather that for any algos that are of critical importance, they may do a before/after comparison, to see the effect of changes). So, a simple solution is to just require users to copy and paste into the IDE, versus allowing
import my_module
for example. Supposing my_module
import were supported, then for every backtest, users would need to be able to access the frozen copy of the my_module
. It basically makes the idea of a user code library very cumbersome to implement. There's probably a solution, but copy-and-paste is simple and works for now, as ugly as it is.
Note that there are some current efforts to improve the IDE:
https://www.quantopian.com/posts/improved-backtest-list-interface-significant-changes-coming