• C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

Database for storing and updating trading positions

Joined
5/16/11
Messages
38
Points
18
Hi all,

Which database would be best for storing and updating trading positions and why?

Thanks a lot,
Chris.
 
I would say a regular relational database such as MySQL, Oracle, Postgres should be fine. You can store positions in many ways, the question is how to most efficiently design the data structures to enable quick updating and querying of positions.
 
I believe the performance of relational DBs is not that great when it comes to hold trade positions which require high throughput and low latency.

I was thinking more of either NoSQL DBs or Time Series DBs.

Anyone has any experience with these? If Java was to be used for development, which DB would you choose and why?
 
I believe the performance of relational DBs is not that great when it comes to hold trade positions which require high throughput and low latency.

I was thinking more of either NoSQL DBs or Time Series DBs.

Believe? until you profile your code/application you won't know anything about performance.

http://c2.com/cgi/wiki?PrematureOptimization

NoSQL is no panacea. Try a relational database first. You can always switch.
 
I believe the performance of relational DBs is not that great when it comes to hold trade positions which require high throughput and low latency.

I was thinking more of either NoSQL DBs or Time Series DBs.

Anyone has any experience with these? If Java was to be used for development, which DB would you choose and why?

Relational DBs can have extremely high throughput and low latency with the right schema design.
 
I will rephrase then since for some weird reason you are stuck to relational DBs, which btw IKNOW (and don't believe) are slower than time series DBs when it comes to tick data for example, and NoSQL DBs are faster for trade positions.

If the development environment is in Java, do you have experience with a NoSQL or timeseries DB? If yes, which one would you recommend and why?
 
I will rephrase then since for some weird reason you are stuck to relational DBs, which btw IKNOW (and don't believe) are slower than time series DBs when it comes to tick data for example, and NoSQL DBs are faster for trade positions.

If the development environment is in Java, do you have experience with a NoSQL or timeseries DB? If yes, which one would you recommend and why?
Since you want to do NoSQL, here we go. I used BDB and Tokyo Cabinet and they were really fast but it was a headache to do anything. They are just bare bones. Just keep that in mind and allocate time accordingly. You will spend a lot of time in plumbing.

It seems that Tokyo Cabinet is being phased out for Kyoto Cabinet.
 
I will rephrase then since for some weird reason you are stuck to relational DBs, which btw IKNOW (and don't believe) are slower than time series DBs when it comes to tick data for example, and NoSQL DBs are faster for trade positions.

If the development environment is in Java, do you have experience with a NoSQL or timeseries DB? If yes, which one would you recommend and why?
I didn't answer originally because this is a loaded question.

The real question is how low of latency/high throughput do you need? For some things, no DB is not fast enough - you will need to keep everything in memory in the main trading thread.
 
For some reason, this thread reminds me of this video:

// Disclaimer: and I actually like MongoDB.

OP: go with /dev/null, "It's fast as hell."
 
I will rephrase then since for some weird reason you are stuck to relational DBs, which btw IKNOW (and don't believe) are slower than time series DBs when it comes to tick data for example, and NoSQL DBs are faster for trade positions.

how did you know this? Could you post some examples from your application?
 
Back
Top