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

AW: Numeric instabilities - a brief show-and-tell demonstration



PureBytes Links

Trading Reference Links


> you do not exactly use such calculations in a
> trading system.

Pierre, you like to misunderstand, don't you? This was an illustrative
example, to show the principle. Of course you do not use *exactly* this in
trading. But you do use iterations which come up quite often, and the same
danger is there.

> The test code that you propose is a fully recursive one,

If you look at the program code, you may realize that that code is iterative
(just a loop), not recursive, though it would be possible to program it that
way. I purposely did *not* use recursive programming to avoid any numerical
side-effects.

> where ALL the
> previous values are squared from one bare to the next, what explains the
> fast propagation of the error.

And this is another error. There are *many* ways for this kind of
instability to occur. Just a combination of multiplications and additions
will sometimes suffice to bring it about. And the introduction of new
information within the iteration process can be another source for the same
kind of distortions. Perhaps if you say "pleeease" I'll write another little
program to show this.

> Maybe with 1000 digits precision, this kind of calculus  will be
> of interest
> someday...

Didn't you see that this kind of thing came up after only 27 times through a
loop? I assure you this is a very real problem, but since you use
TradeStation to test TradeStation, you don't see it.

Michael Suesserott