Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Is there any way to do expensive computations?

Hi! I'm trying to train a deep neural network offline before using it in my algorithm. After architecting it I'd feed it the chosen inputs from Quantipian's data, let it run (preferably on a GPU) for several minutes to hours, then import the training parameters into my algorithm for trading and backtesting.

From what I can tell there are a few major roadblocks to this:

  1. There are no deep learning libraries supported by Quantopian. Scikit doesn't allow for flexible deep architectures and doesn't support GPU training, both are needed for interesting work. I can work around this by implementing them by hand, but then I run into the next issue.

  2. Quantopian doesn't allow for GPU training, and doesn't publicize the specs or allowed CPU time. Can I just churn indefinitely on a notebook? That could work, but it would be hundreds of times slower than using a GPU and tens of times slower than using a dedicated CPU.

  3. Assuming I get past the other barriers, I'd need to export up to tens of thousands of parameters from the notebook and into my algorithm. Is there a way to do this?

  4. If I decide to work offline with Zipline, I'd need to find a good data source. This isn't easy, one of the major perks of using Quantopian is their data. Also, it's unlikely that data trained from a different source would respond correctly to Quantopian data. Unless I'm missing something, this is likely a non starter.

Any ideas on the best way to approach this? Anything I'm missing? From what I can tell this use case is neglected right now.

4 responses
  1. Q doesn't allow for a lot of things. (this is actually #2)

  2. it seems that the only way to get data persistency is to paste it in. (this is actually #3)

this use case is neglected, but probably by design.

  1. hm, the plat form renumbered item 2 to 1
  2. hm. the plat renumbered item 3 to 2.

@ Mark,

The research environment/platform has ~ 4 GB of RAM (across all running notebooks). I've run code for many hours and I'm not aware of any time limit. As far as getting parameters over to the backtesting/trading platform, copy & paste is the only way. If you have tens of thousands of parameters, I think it'll be impractical (and there are constraints on the amount of data you can output to the screen, anyway).

@Grant, thanks for the reply. I guess I'll give this a shot!