How to control Intraday database size (Solved)

#1
To start with, ive been looking for a way to delete earliest intraday data to reduce the size of my intraday database. Found none, stopped looking...

However, Amibroker has an inbuilt method of restricting the size of your database, and it works like magic.

Heres how :
Tools > Preferences > 'Data' tab.
Check and populate the field : "Limit number of saved quotations"


NOTE : BACKUP YOUR DATABASE BEFORE YOU START CHECKING WHATS GOOD FOR YOU, IF YOU ENTER A VERY SMALL NUMBER, AMIBROKER WILL DELETE EARLIER DATA TO REDUCE THE NUMBER OF QUOTATIONS TO THE SET NUMBER, THERE IS NO CONFIRMATION BEFORE AMIBROKER DELETES DATA.

To backup your database :
1. With Amibroker closed, copy your database Folder to another location.
2. Play with the 'quotes limit' to see if you are left with enough quotes / Reasonable database size
3. If you messed up and deleted too much data by filling in a very small number
a. Set a higher number (else your restored data will be down-sized too)
b. Close Amibroker
c. Copy back your database folder and overwrite the one thats there.
d. Start amibroker and play around with the limit again.


You restrict the number of quotes Amibroker stores and it will keep the latest and discard older quotes automatically.

Number of quotes Vs. Size :
--------------------------
68,000 quotes limit for about 156 securities gives me a size limit of about 410 MB for my (IEOD) database.

The number of days for which you store data would really depend on your data-rate, this is about the only disadvantage of higher tick-rate for intraday data. The faster you recv intraday data (more quotes per day) lesser number of days you can hold for a given 'quotes' limit.

eg.. i recv about 6200 ticks per day, ie an average refresh rate of 3.6 seconds for 156 scripts :


if i slow down my data-rate to one tick in 5 seconds, i would most likely hold intraday day data for more days.

Hope this helps.
 
Last edited: