Dear guRus

A very simple issue that I thought I will bring to your notice.

I have a dataframe called testdata:
str(testdata)
'data.frame': 748 obs. of  5 variables:
 $ Date : Date, format: "2009-07-13" "2009-07-14" ...
 $ Open : num  750 760 793 810 794 ...
 $ High : num  764 802 811 832 821 ...
 $ Low  : num  725 760 792 786 790 ...
 $ Close: num  758 790 807 795 811 ...

When I calculate MACD using the TTR on the closes I get a value which is
different from what I get when I convert the same object into XTS. (-2.33
when a simple dataframe and 4.82 for xts). I am using percent=FALSE in both
cases.
To get to the root of the issue I tried an excel run of the same and to my
surprise my MACD using Excel is different.

Wondering which is the truth! Intuitively I think the xts result is
correct. I even tried doing an EMA12-EMA26 on the non-xts and still got the
different answer of -2.33.

I was thinking I will attach the excel here but not sure if its an
allowable conduct in a large forum.

Thx for looking
Raghu

	[[alternative HTML version deleted]]

