Registered: Jul 2011
05-25-12 10:47 AM
Uh, ok bill, thanks but no thanks. You have no idea what you're talking about. Same problem is present with end of day bars? Are you drunk right now? Maybe you didn't read my post.
I've had no need to implement stock split fixes until now because of the data I was using. I now changed data and increased volumes of it. I have had in place methods for dealing with stock splits on intra-day charts and manually inputting dates when they happened. The backtests are and always have been really robust, where I did simulate shares increasing/decreasing in quantity. The problem now is I'm dealing with data that goes back to the 70s, vs data that was mostly 1hour bars going back to the 90s. Those are big differences that require me to automate this process.
Yes it has a few simple solutions and all of them I am aware of, but you've probably never coded an app that needs to look at 1000s of stocks from a database and adjust a threaded backtester to work on each one and automatically detect not only splits but a bunch of other data. The differences in implementation are big, as you probably don't know. Also, the simple solutions you think about are probably not robust enough for my standards.
It's not just one stock that splits and changes quantity.It's relations, correlations, indicator and floating point values vs integer formats, etc, problems you'd need a dictionary for.
For example: the backtester can get one price data with splits. The indicators will need another where the prices are converted to floating points and divided back in time. Correlations need to be normalized again based on the splits. Three data sets vs one. Get it?
Another problem is, if you designate that you want the bot to trade 100 shares of today's value, how many shares will it have been trading in 1976? Right you need to go back in splits and divide. But then how do you simulate commissions accurately, etc? I've implemented all of this already.
I was asking for your opinions on my solutions, not asking what solutions you use. The discussion could have turned to what happens when we convert from using 1/8ths to 0.01s? If you need atomic precission you will re-code your backtester to work with 1/8ths when needed and put in a database that knows when to do it. That's what I'm doing.
I see I didn't mention the major implied complexities in my post, other than stock splits. I should have known it's not implied, so I see how you think i'm a newbie. You were wrong though, so now maybe you will have something useful to contribute once you get your head around what the question really was.