nautechsystems / nautilus_trader

A high-performance algorithmic trading platform and event-driven backtester
https://nautilustrader.io
GNU Lesser General Public License v3.0
1.92k stars 435 forks source link

Nautilus SQL schema and database connection #1332

Open filipmacek opened 9 months ago

filipmacek commented 9 months ago

Feature Request

roguespyder commented 2 months ago

Is this request for storing data in postgres instead of the parquet catalog? Maybe a beginner question, but does Nautilus have a data connector for databases such as snowflake, databricks, and most importantly postgres ( my need ) to read/write to/from?

cjdsellers commented 2 months ago

Hi @roguespyder

Thanks for your interest.

The short answer is, yes data is in scope for the SQL implementation of the cache database backing - but there will be an initial focus on the execution objects such as instruments, orders and positions etc. Parquet is serving its purpose well as a data store, but we'll potentially look at expanding to SQL in the future if it makes sense.

There are no cloud style connectors current and they're very likely to remain out of scope for the open-source project.

Hope that helps.

roguespyder commented 2 months ago

Thanks for the explanation. My 1.0 project with IBKR's API and full data is stored into postgres for 10k symbols. I look forward to this enhancement as I try to leverage this framework within my ecosystem. ( since I work with cloud dbs and new tech , i threw those in there :D )

muratbeser commented 1 month ago

I would suggest checking https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.to_sql.html