NexusFi: Find Your Edge


Home Menu

 





Tick Database Storage


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one Big Mike with 10 posts (1 thanks)
    2. looks_two MXASJ with 7 posts (0 thanks)
    3. looks_3 phyzfer with 5 posts (0 thanks)
    4. looks_4 Trader.Jon with 2 posts (0 thanks)
      Best Posters
    1. looks_one gomi with 1 thanks per post
    2. looks_two samurai with 1 thanks per post
    3. looks_3 NetTecture with 1 thanks per post
    4. looks_4 Big Mike with 0.1 thanks per post
    1. trending_up 27,531 views
    2. thumb_up 6 thanks given
    3. group 18 followers
    1. forum 40 posts
    2. attach_file 3 attachments




 
Search this Thread

Tick Database Storage

  #31 (permalink)
 gomi 
Paris
Market Wizard
 
Experience: None
Platform: NinjaTrader
Posts: 1,270 since Oct 2009
Thanks Given: 282
Thanks Received: 4,505

Another idea is to use a NoSQL database. Cloud providers, Google, Amazon, Microsoft Azure, don't use SQL servers for their data, it's just too much overhead.

I might one day try to setup a tick database on my Azure account, could be fun

If you take a look how the Table service is organized (there's also a Blob and queue service) , it's
PartitionKey - RowKey - Object (max 64 kB, for more, use a link to a Blob object)

This strucuture is optimized to allow storage of billions of rows , actually your account can grow up to 100 TB of data, and if you never do a full scan and only query on PartitionKey -RowKey, performance is good.

So if you set up PartitionKey= instrument name, and RowKey = tick timestamp, you can easily build a database that wil store billions of ticks, and that on which you can run very speedy queries like "give me all the ticks on instrument xyz and between startdate and enddate".

I'm pretty sure there are also desktop implementations of NoSQL data servers, you can check NOSQL Databases

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Exit Strategy
NinjaTrader
REcommedations for programming help
Sierra Chart
NexusFi Journal Challenge - May 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
48 thanks
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Bigger Wins or Fewer Losses?
24 thanks
Tao te Trade: way of the WLD
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
  #32 (permalink)
sayfuji
Kiev
 
Posts: 6 since Mar 2011
Thanks Given: 0
Thanks Received: 0

Please, trust my skills. For using tick history the better way is to use SQL. One time me and my guys created system, which needs to analyse historical tick data. SQL for our deals was the best (even better then Oracle).

Reply With Quote
  #33 (permalink)
MichaelE
Germany
 
Posts: 2 since Aug 2011
Thanks Given: 0
Thanks Received: 0


I'm a software developer and found this forum entry via google and would like to share my knowledge and hope getting also information about other tick database systems or best practices. I'm currently developing a system which should be commercial. So the plan is to buy the streams as well as history data from stock data vendors and pay license and service fees. My knowledge base is currently very low in context of handling stock data in IT systems. But my knowledge is very high in software architectures (also with normal relational database use cases).

Current plan:
Using a relational database for all. The table is splitted into two separate tables. One key table and one table for the tick data. The key table contains references to other tables and provides a unique id which is referenced from the tick table. The key table contains ids like stock id, stock exchange id, currency id. The tick table contains the price, bid, ask and the time. The PK is the reference to the key table and the time field. The key table is only to reduce the amout of fields and so also the needed storage per tick (5NF).

All the analyses should be made on time frames like 1m, 5m, 1h, 1 day, and so on - not on a tick base. For performance improvements end of day jobs aggregate the data and stores this aggregated data into separate tables. Views are used to combine the day data and the data from the history time frame tables. The tick table is cleaned during the end of day job (runs when the referenced stock closes) and the data are stored as blobs. I think this would improve the performance a lot and keep the table space as less as possible without implementing blob handling for analyzes.

For the stream handling I would buffer the incoming ticks. The buffer is inserted if 500 - or 5000 ticks are reached or 500ms are bygone. This will reduce the transaction effort.

@Mike
Don't use a ID per tick. I think the performence is very very low with this strategy because the key generation effort is to high and after years (or weeks) you must override the keys because the limit is reached. By the way it is also unnecessary.

I would be deeply grateful for feedback from experienced users or developers.

Reply With Quote
  #34 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,446 since Jun 2009
Thanks Given: 33,217
Thanks Received: 101,610


MichaelE View Post
All the analyses should be made on time frames like 1m, 5m, 1h, 1 day, and so on - not on a tick base.

.
.
.

Don't use a ID per tick. I think the performence is very very low with this strategy because the key generation effort is to high and after years (or weeks) you must override the keys because the limit is reached. By the way it is also unnecessary.

Tick based analysis is a requirement. The system needs to be good enough to capture the live data from the market, which is tick increment + bid/ask size.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #35 (permalink)
MichaelE
Germany
 
Posts: 2 since Aug 2011
Thanks Given: 0
Thanks Received: 0


Big Mike View Post
Tick based analysis is a requirement. The system needs to be good enough to capture the live data from the market, which is tick increment + bid/ask size.

I guess there is a misunderstanding. Why you need an increment? It is unnecessary because the time, as well as the stock, stock exchange and currency should be the PK. Also the total volume is unneccessary because it could be easily calculated using the quote size. (All my comments refer to your last screenshot).

Ok, if tick base analysis is your requirement (tick analyses are't mine), you must handle this with a big system. But to reduce the needed storage and improve the performance I would increase the level of normalization and would also work with blobs for historic data.

Reply With Quote
  #36 (permalink)
Kostagr33k
Manhattan NY usa
 
Posts: 3 since Nov 2011
Thanks Given: 0
Thanks Received: 0

BigMike,

Out of curiousity did you get this working? If not I may have time Next week to talk about options.

Thanks

Kosta

Reply With Quote
  #37 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,446 since Jun 2009
Thanks Given: 33,217
Thanks Received: 101,610


Kostagr33k View Post
BigMike,

Out of curiousity did you get this working? If not I may have time Next week to talk about options.

Thanks

Kosta

I had it working over 2 years ago with NinjaTrader. I posted the code somewhere on the NT forums, but it was long ago and probably easier to start over.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #38 (permalink)
Kostagr33k
Manhattan NY usa
 
Posts: 3 since Nov 2011
Thanks Given: 0
Thanks Received: 0

Mike,

What I was trying to ask is if you still were trying to figure out a more performance related solution that would scale, or if you decided not to move forward with the project full scale?


kosta

Reply With Quote
  #39 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,446 since Jun 2009
Thanks Given: 33,217
Thanks Received: 101,610


Kostagr33k View Post
Mike,

What I was trying to ask is if you still were trying to figure out a more performance related solution that would scale, or if you decided not to move forward with the project full scale?


kosta

It is in the back of my mind, but not something I am working on.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #40 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,446 since Jun 2009
Thanks Given: 33,217
Thanks Received: 101,610


Have documented entire process here, ongoing:



Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:




Last Updated on July 20, 2012


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts