Quote from SpaceCuddle:
Thanks for your reply, bluematrix, and to others as well.
The reason I don't use lists is because I have a lot of historical data and I need to be able to access any part of it in a reasonably fast manner. A list would be very slow I would think unless I need all the data starting from element one, because a list has to iterative over itself to get to any element.
Additionally I never have to add or remove anything so I guess I'm doing things differently from what you have in mind.
About storing the data in a database. Originally I had thought that one would repeatedly ask the database for more data once it would be needed, but I now realize that would be incredibly stupid and slow. Of course one should (as I do) have internal storage for the data like in an array or list. One just loads the data in first via a database, which would be nice. So I might do that.
I'm not a fan of Python in the slightest. But I'm looking at R and I'm taking 2 Coursera classes on R and data analysis. It's just to get a feel for different industries to learn from their preferred methods.
Anyway I'm not sure where I'm going with this and I don't think I need more help. There is no magic solution, I'm just going to remove all error prone manual stuff and error prone code and implement something better that matches time frames for me.
Thanks everyone!
Database is not only small, it is also incredibly space wasting. Once you deal with real data amounts that is a serious difference.
For example I use Nanex tapes. A Day has about 1.5 gb data - sadly in SQL form it uses about 50gb. HUGH difference.
So we extract the tapes into files with the ata wen eed, using a highly compresssing and read speed optimized binary format (variable length, a trade can be down to one byte, that includes tick accurate timestamp, volume, price). Then run along the files in playback etc. Keep in memory only what is needed - especially when you do algo the need for historical access is close to zero (except loading data, but you never buffer it).