[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re[2]: interesting TS phenomenon



PureBytes Links

Trading Reference Links

> > Omega's single-precision math is pretty bad, but it shouldn't be
> > off by 4.8%.
> 
> It depends on the calculation. If the result depends on differences
> between large numbers, for example, it can be waaaayyy off. I once had
> a digital filter that was OK in double precision, but it was so far
> off it crashed TS4 with a math overflow - a LOT more than 4.8%. :-)

Sure, it's easy to get single-precision off by a lot.  For that 
matter it's easy to get DOUBLE precision off by a lot, too, though 
you have to try a bit harder.

But Colin was just adding together 30 numbers in the range 0-200 or 
so with 5 or less digits of precision, and dividing once.  Single-
precision is plenty accurate for that.  The divisor has 8 digits so 
it'll round a bit at the end, but that would be an error on the order 
of 10^-6 or so, not 4.8%.

Colin wrote:
> FWIW, I found the problem. The divisor that Dow Jones publishes isn't
> a valid factor for back testing purposes. It's only good from the time
> its published, even though it's supposed to reflect the Dow's history
> of stock changes, splits, and so on.

Aha.  Yes, the divisor changes when stocks split, when stocks are 
added or removed from the Dow 30, etc.  If you use the wrong divisor, 
for sure your result will be wrong.  (But weren't you using the same 
divisor on the same data in Excel??)

See http://averages.dowjones.com/divis_ia.html for a history of the 
recent values of the divisor.  

Gary