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

[amibroker] Re: Accuracy of weekly ema calculation



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxx> 
wrote:
> Michael,
> do you use the same formula for other softwares?

No the script shown is only applicable to AB,  The other software is 
Quotes Plus Scan, MetaStock, and Excel S/S.  The Quotes Plus Scan 
allows you to specify daily and weekly modes within a scan and you 
don't need any extra coding to derive weekly data from a daily data 
set in order to calculate, say, a weekly EMA. I just used MS and 
Excel as cross checks for calculated values.

> How do you compare EMA values ?

Just taking a specific week ending date and comparing the values from 
the various sources for that date.

> Have you used directly the weekly mode to obtain weekly EMA values, 

Yes - it appears to calculating the EMA correctly.

> instead of a non accurate daily formula ?
> Just curious...
> DT
> PS. Amibroker calculations are accurate, AFAIK.
> --- In amibroker@xxxxxxxxxxxxxxx, "Michael Orlyk" <bmwrider@xxxx> 
> wrote:
> > Out of curiosity I decided to compare the accuracy of weekly EMA 
> > calculations against other programs.  I had a niggling feeling 
that 
> I 
> > would find a disagreement.  Not to my surprise the EMA values 
> > produced by AB did not agree with the values produced by three 
> other 
> > programs.
> > 
> > The other three programs produced EMA values that agreed with 
each 
> > other but not with AB's results.  I am now trying to find an 
> > explanation for the discrepency.
> > 
> > Below,is the script I am using in AB to get weekly EMA values 
doing 
> > an explore on selected equities.  For this test I am calculating 
a 
> 30-
> > week EMA.
> > 
> > Filter = 1;
> >  
> > ws = DayOfWeek() < Ref( DayOfWeek(), -1 );
> > we = DayOfWeek() > Ref( DayOfWeek(),1);
> > 
> > WCl = ValueWhen(we, Close);
> > wv = ValueWhen(we, Sum(V,5));
> > 
> > AddColumn(WCl, "Close");
> > AddColumn(EMA(WCl,150), "EMA");
> > AddColumn(Cross(WCl, EMA(WCl,150)), "Cross");
> > 
> > Do I have an error in the above?  Is there an inherent error in 
the 
> > process that I am unaware of?  After I discovered this problem, I 
> no 
> > longer trust AB's results in so far as weekly calculations are 
> > concerned.  Note that what I am doing involves processing in both 
> > weekly and daily timeframes so setting AB's periodicity to weekly 
> is 
> > not an option. Any comments would be appreiated.
> > 
> > Mike O.


Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/