Open ivegner opened 7 years ago
Does the pandas-based method match up with TA-Lib's method for calculating MACD?
You might find some information here about that TA-Lib's "unstable period":
http://www.ta-lib.org/d_api/ta_setunstableperiod.html
And you might find more information by looking at the implementation of TA_MACD
:
https://sourceforge.net/p/ta-lib/code/HEAD/tree/trunk/ta-lib/c/src/ta_func/ta_MACD.c
The "unstable period" was linked from a discussion on this bug report:
Here are the inputs:
I've been playing around, and have made 2 ways to calculate MACD on a dataset: Way 1:
Way 2 (the standard way to do MACD):
My algorithm gives infinitely better predictions with Way 1 over Way 2. Upon further digging, I found that in the beginning, the results given by the two methods are very dissimilar, but over time (a couple hundred data points) converge to approximately close values. What gives?
PS. Is there some kind of backwards rebalancing or adjustment going on in TA-Lib on its EMAs? Could it be that my algorithm is just seeing the future (with the rebalances, it knows what's ahead) and that's why it's so good?
Thanks in advance.