Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
[Feature Request] Running SQL Queries on the Pricing Database from the Research Environment?

I don't know what database system Quantopian is using for its pricing data, but if it is an RDBMS it would be interesting to be able to run SQL queries on it directly, rather than having to load everything into memory before processing it.

For example, something as simple as that (returning the total number of daily bars per date) would become possible:

SELECT date, COUNT(*) AS count  
FROM daily_pricing  
GROUP BY date;  

Or creating 30-minute bars within the RDBMS instead of having to first get the 1-minute bars and process them in memory, etc.

What is the opinion of Quantopian on this?

1 response

I believe pandas lets you do operations on dataframes using a SQL-like DSL. Dunno if that's supported in Quantopian though.