Hi Daniel.a,
Instead of a database, I keep historical data in CSV files. The file structure looks like this:
Historical Data
--DTN
----DAILY
------A
--------A.csv
----------RequestID,2020-06-19T02:07:46,89.7900,87.7600,89.4100,88.7300,1784741,0, ----------RequestID,2020-06-18T02:07:46,88.5000,87.2600,87.4300,88.2100,1491515,0,
----------RequestID,2020-06-17T02:07:46,88.7500,87.4600,87.8500,87.9200,900794,0,
--------ANN.csv
--------AAP.csv
--------AAPL.csv
--------etc
------B
------etc
----MINUTE
------A
------B
------etc
--Other Data Provider would be separate
----DAILY
----etc
This makes so many things easier. I find a database an annoyance and completely useless.
I write the data exactly as it comes from IQFeed.
After downloading the data, I plug the holes. ie; There are days where there are no trades and IQFeed does not download data for that day. Same with minutes. Most of the day there may not be any trades so I fill in the missing days and minutes.
- If for some reason you need the data in a database, just write a program to read the files and put it in the database. It should only take a minute to load when you need it.
- point in time data for index constituents for equities. IQFeed has this.
- I have some day-trading systems that close out a few minutes before the market close. I backtest these with daily data. Works fine. Averages out.
That said I will soon be back-testing with minute data. The reason for this is that daily data from IQFeed, and other data providers that I’ve checked with, is incorrect. Daily data has trades that did not occur in the tick data and therefore could not be traded on. Think large blocks traded between funds/brokers, etc. and reported later. These trades can take place well outside of the daily range, but there they are in the daily data. This problem can often be seen as very long tails on a chart. Minute data from DTN is not corrected, and therefore correct. Backtests will be more accurate.
As ValeryN inferred, data maintenance is a big project by itself.
Instead of a database, I keep historical data in CSV files. The file structure looks like this:
Historical Data
--DTN
----DAILY
------A
--------A.csv
----------RequestID,2020-06-19T02:07:46,89.7900,87.7600,89.4100,88.7300,1784741,0, ----------RequestID,2020-06-18T02:07:46,88.5000,87.2600,87.4300,88.2100,1491515,0,
----------RequestID,2020-06-17T02:07:46,88.7500,87.4600,87.8500,87.9200,900794,0,
--------ANN.csv
--------AAP.csv
--------AAPL.csv
--------etc
------B
------etc
----MINUTE
------A
------B
------etc
--Other Data Provider would be separate
----DAILY
----etc
This makes so many things easier. I find a database an annoyance and completely useless.
I write the data exactly as it comes from IQFeed.
After downloading the data, I plug the holes. ie; There are days where there are no trades and IQFeed does not download data for that day. Same with minutes. Most of the day there may not be any trades so I fill in the missing days and minutes.
- If for some reason you need the data in a database, just write a program to read the files and put it in the database. It should only take a minute to load when you need it.
- point in time data for index constituents for equities. IQFeed has this.
- I have some day-trading systems that close out a few minutes before the market close. I backtest these with daily data. Works fine. Averages out.
That said I will soon be back-testing with minute data. The reason for this is that daily data from IQFeed, and other data providers that I’ve checked with, is incorrect. Daily data has trades that did not occur in the tick data and therefore could not be traded on. Think large blocks traded between funds/brokers, etc. and reported later. These trades can take place well outside of the daily range, but there they are in the daily data. This problem can often be seen as very long tails on a chart. Minute data from DTN is not corrected, and therefore correct. Backtests will be more accurate.
As ValeryN inferred, data maintenance is a big project by itself.
..