Navigation: Backtest Engine Details >

Split Handling

 

 

 

When data is imported, RealTest assumes that prices are "as traded". If the data source has split-adjusted prices and a "real close" or split factor is provided (e.g. Norgate), RealTest will un-adjust all price and volume fields during import and also store the split factor (real / adjusted ratio) as a field within each bar. If the data is as-traded and includes an adjusted price field (e.g. Yahoo), RealTest simply keeps the prices as-is, and stores the split factor.

When evaluating any formula that refers to a single bar field, the correct "as-traded" price is always returned. For formulas that traverse a series of bars, the series is temporarily split-adjusted during evaluation to match the as-traded price of the most recent bar in the series.

In other words, the price and volume returned for any multi-bar function is automatically split-adjusted AS OF THE BAR’S DATE, as if you had been using a split-adjusted data source on that date.

This sounds complex, but it provides several advantages over any other method of splitting handling:

1.When you compare a price to a specific level (e.g. C > 10 and C < 80), the result will be TRUE for all stocks that actually traded within that price range on that date.

2.For stocks which have had several splits over time, you don’t have to worry about rounding errors (especially if the original data was in "as-traded" prices).

3.You never have to think about splits when building a strategy.

In my view, this is the only correct way to handle splits in a backtesting engine.

For a more detailed illustration of how this works in practice, see the last part of the (advanced) topic on self-referential data item formulas.

 

 

 

 

Copyright © 2020-2021 Systematic Solutions, LLC