I'd love to hear ideas about how to do this. I'll share my work thus far and hopefully people can weigh in with their own thoughts.
Druckenmiller (one of the best performing fund managers, ever) has said that he uses the 2nd derivative to spot turning points. Not the rate of change of the price, but the change in the rate of change. According to Druckenmiller, doing this on a daily price chart allows one to spot turning points 8-20 days in advance. Doing this with weekly price charts is good for identifying turning points 8-20 weeks in advance. And doing this with monthly price charts is good for identifying turning points 8-20 points in advance.
In trying to implement this, the first problem is that taking the ROC of the ROC creates confusing charts. The problem is that the ROC formula can create a negative value, which messes up the 2nd ROC calculation.
My solution is to look at the $ rate of change instead of the percentage; and the deflate the 2nd derivative by the stock price (code has been pasted below).
I'd love to hear feedback from experienced Amibroker users.
- Has anyone tried this before?
- What parameters might be ideal?
- etc.
_SECTION_BEGIN("PROC2");
P = ParamField( "Price field" );
periodsA = Param("1st Deriv Period", 200, 100, 250, 10 );
periodsB = Param("2nd Deriv Period", 50, 10, 50, 1 );
PROCA = P - ref( P, -periodsA );
PROCB = PROCA - Ref( PROCA, -periodsB );
Plot( PROCB / p, _DEFAULT_NAME(), ParamColor( "Color", colorCycle ), ParamStyle("Style") );
_SECTION_END();