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

Warning about accuracy of Array functions in TS2000i



PureBytes Links

Trading Reference Links

	The following email was sent by me to OR tech support and their
reply is found below.  Anyone using Standard Deviation, Variance, Covariance
etc. array functions must be extremely careful when using them due to the
limitations of single-precision in TS2000i.  The bottom line is they will
only work on prices that have no more than 3, maybe 4, significant figures
in them. i.e. 6.25 which probably limits their use to low-priced stocks and
some futures.  In order to use them on other prices, as OR says below, you
must get an Omega Research Solution Provider to write you a DLL that uses
double-precision variables.

	Why Omega wouldn't offer to have their own programmers write the
necessary DLL's to fix this is beyond me.  I know that this problem is
driving many TS users to search for alternatives like TraderWare and
TradeLab.  I don't believe they can afford to wait for the next version of
TS to correct this.  At the very least, they should warn users about this in
their on-line manuals.

Regards,

Mark.

P.S. Please excuse the rich text format but it was the only way I could
preserve the superscript formatting necessary for the math formulas below.



>  -----Original Message-----
> From: 	marQ [mailto:mcerar@xxxxxxxxx] 
> Sent:	Monday, March 13, 2000 1:14 PM
> To:	Omega Research
> Subject:	FW: Accuracy of Array functions in TS2000i
> 
> I would like to know if Omega Research has tested the array functions in
> TS2000i for accuracy and if there are any limitations to this accuracy
> what are they?
> 
> The specific issue I'm referring to is math operations where each element
> of the Array has to be squared:
> 
> Var(X) = ( X12 + ... + XN2 ) / (N - (Mean(X))2)
> 
> or, alternatively where the difference between each element and the Mean
> of the array has to be squared:
> 
> Var(X) = ( (X1 - Mean(X))2 + ... + (XN - Mean(X))2 ) / N
> 
> The latter formula is the one I believe TS uses.  This is an issue with
> respect to Standard Deviation, Variance, Covariance, Correlation etc.
> 
> The problem arises when squaring larger numbers say in the 5 or more
> significant figure range as you would be doing for the DJIA or the larger
> Index values.  According to my back of the envelop calculations, squaring
> 5 significant figure numbers (or greater) results in values that have 10
> or more significant figures.  When each individual element of the array is
> squared (or when the difference between each element and the Mean of the
> array is squared) using single precision, 3 or more decimal places can get
> rounded off.  Each squared, intermediate value then introduces a
> rounding-error that is compounded as they are summed up over the length of
> the array.
> 
> The larger the values used in the array (or the larger the difference
> between individual array values and the mean of the array) and the larger
> the number of elements in the array, the greater the potential error.  I
> would like to know if you have specifically tested the limits of these
> array functions within which the final result has an acceptable margin of
> error - say in the 1-3% range?  If you have, what are the limits both in
> terms of maximum number of significant figures in the time-series data and
> the maximum number of elements in the array?
> 
> Or, if you have a way around this problem that I am unaware of I would
> appreciate knowing how to do it so that I can trust the accuracy of the
> array functions.  
> 
> Regards,
> 
> Mark.
> 
> 
> 
> 
 ----- Reply-----


Thank you for taking the time to send us your inquiry.

At the present time we have a precision limitation of 7 place holders within
the standard EasyLanguage. The only way to bypass this limitation is to pass
the required data to an external DLL and performing the desired calculation
within the DLL. For additional assistance using external DLLs to perform
these types of calculations, please contact one of the EasyLanguage Solution
Providers listed on our website.

 A complete list of Omega Research Solution Providers can be seen at
http://www.omegaresearch.com/solutionproviders/.

Thank you for choosing Omega Research, Inc.

Sergio Sotolongo
EasyLanguage Department
Omega Research, Inc.