HOME FORUMS BROKERS SOFTWARE BOOKS CONTACT US
Elite Trader Your Account  •  Become a Member  •  Help  •  Search    
    Forums ›› Technically Speaking ›› Strategy (System) Design ›› Stock splits vs backtesting  


Post A Reply
    Page 1 of 4:   1  2  3  4  
braincell
 

Registered: Jul 2011
Posts: 539

 

05-24-12 07:18 PM

I'm sure some of you have encountered this problem when testing daily bars.

For example MSFT goes down to a value of around 0.01 per share by 1986 if you account all of the splits. Then the backtester gets confused since it's max tick value is 0.01, so it can only place orders at 0.00 or 0.02 for example. In reality, the price was around $20, and there would be no problems placing orders at 0.01 intervals (or 1/8ths) in reality. This means that the backtester can (in the case of MSFT in 1986) only place orders at +/- 100% of the stock price. That won't work.

The only realistic option I see is having the backtester detect stock splits via a separate database and know how to respond to it.

If we keep increasing future values (and not past like now) from the splits (ie MSFT would be around $8000 per share now), we get a different problem as the spread and everything else would have to be artificially inflated or something. It's not workable.

Questions:

What are your experiences when working with daily data that goes that far back?
Does anyone maybe convert the stock price to real dollar purchasing power or commodity index to smooth it out? What tricks could I use, short of forcing the backtester to detect the splits and react as it would in reality (which may be a lot of work)?

Note: I have coded my own backtester.

    Edit/Delete Quote Complain
intradaybill
 

Registered: Feb 2008
Posts: 2962

 

05-24-12 10:19 PM


Quote from braincell:

I'm sure some of you have encountered this problem when testing daily bars.



The same problem is present with intraday bars unless you exit at the end of the day.

Welcome to real backtesting...

Edit: you know what pisses me off the most with people like you? In other threads you appear like a heavy-duty expert about almost everything, from data-mining to spaceships for traders and now you suddenly ask a question that makes people like us who backtest many years wonder if you are for real. This problem has a few simple solutions. The fact that your are not familiar with them makes you a newbie to me. I will not help you here because you are not humble enough to deserve help. I hope you will understand.

    Edit/Delete Quote Complain
braincell
 

Registered: Jul 2011
Posts: 539

 

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.

    Edit/Delete Quote Complain
2rosy
 

Registered: May 2012
Posts: 336

 

05-25-12 02:28 PM

its called corporate actions. you adjust for them

    Edit/Delete Quote Complain
intradaybill
 

Registered: Feb 2008
Posts: 2962

 

05-25-12 02:35 PM

It seems that braincell cannot deal with data in a proper way. Yet, braincell is an expert. Sounds too much of a contradiction to me.

    Edit/Delete Quote Complain
Rationalize
 

Registered: Jan 2010
Posts: 774

 

05-25-12 04:25 PM

I'd be querying what your strategy's holding period will be, if you're using such a long time series .. then look at corporate actions, if you still have to.

    Edit/Delete Quote Complain
    Page 1 of 4:   1  2  3  4  
Post A Reply


Receive an email whenever a new post is added to this thread by subscribing to it.
 
Rate This Thread:

Forum Jump:
 

 

   Conduct Rules  -  Privacy Policy  -  Day Trader -  Day Trader Forum -  Best Trading Software -  Sitemap Copyright © 2013, Elite Trader. All rights reserved.    
 
WHILE YOU'RE HERE, TAKE A MINUTE TO VISIT SOME OF OUR SPONSORS:
Advantage Futures
Futures Brokerage & Clearing
AMP Global Clearing
Futures and FX Trading
Bright Trading
Professional Equities Trading
CTS
Futures Trading Software
DaytradingBias.com
Professional Trading Analytics
ECHOtrade
Professional Trading Firm
eSignal
Trading Software Provider
FXCM
Forex Trading Services
Global Futures
Futures, Options & FX Trading
Interactive Brokers
Pro Gateway to World Markets
JC Trading Group
Direct Access Trading
MB Trading
Direct Access Trading
MultiCharts
Trading Software Provider
NinjaTrader
Trading Software Provider
OANDA
Currency Trading
optionshouse
Option Trading & Education
Rithmic
Futures Trade Execution Platform
SpeedTrader
Direct Access Trading
SpreadProfessor
Spread Trading Instruction
thinkorswim by TD Ameritrade
Direct Access TradingAdvertisement
TradersStudio
System Building & Backtesting
Trading Technologies
Trading Software Provider
Trend Following
Trading Systems Provider