Replicating Druckenmiller 2nd derivative Rate of Change

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();

Maybe something like this?

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(), colorRed, styleLine  );

r1 = ROC(P, periodsA);
r2 = Remap(r1, Lowest(r1), Highest(r1), 0, Highest(r1) - Lowest(r1));
r3 = r2 - Ref( r2, -periodsB );

Plot( r3, _DEFAULT_NAME(), colorBlue, styleLine | styleOwnScale);

From a signal processing perspective, Beware that taking the derivative of a signal (price, oscillator, what ever) is the equivalent of high pass filtering. That means that the resulting signal will inherently tend toward looking noisy. Taking the derivative of a derivative ( rate of change) , is the equivalent of a second order high pass filter, (even noisier).

It helps then , that if you are trying to find teh turning point of a graph, try doing it on an already smoothed plot ( such as an Oscillator). Think of a simple oscillator - as a smoother price with the DC component removed. In other words your looking at the envelope modulation of the price. If you want to follow up on these concepts (standard signal processing) try any of the books by John Ehlers - excellent

Hope this helps
George

_SECTION_BEGIN("druckenmiller-2nd-derivative-rate-of");

// 11/03/2026 georgerai@gmail.com

// Replicating Druckenmiller 2nd derivative Rate of Change - #2 by awilson

GraphXSpace = 25;
SetChartBkGradientFill( colorWhite, colorLavender );
SetChartOptions(0, chartShowDates | chartShowArrows | chartLogarithmic | chartWrapTitle );
SetBarsRequired( 10000, 0 );

P = ParamField( "Price field" );
periodsA = Param("1st Deriv Period", 200, 100, 250, 10 );
periodsB = Param("2nd Deriv Period", 50, 10, 50, 1 );

// Smoothing to reduce inherint noisyness of derivate functions (high pass filters)
// the more smoothing you introduce, the cleaner the response, at the expense of a delayed signal
smoothing = Param( "Smoothing", 6, 1, 30);

PROCA = P - ref( P, -periodsA );
PROCB = PROCA - Ref( PROCA, -periodsB );

RedX = PROCB / p ;

RedX_smoothed = EMA(RedX, smoothing);

Plot( RedX_smoothed , _DEFAULT_NAME(), colorRed, stylethick );

r1 = ROC(P, periodsA);
r2 = Remap(r1, Lowest(r1), Highest(r1), 0, Highest(r1) - Lowest(r1));
r3 = r2 - Ref( r2, -periodsB );

r3_smoothed = EMA(r3, smoothing);

Plot( r3_smoothed, _DEFAULT_NAME(), colorblue, stylethick | styleOwnScale);

_SECTION_END();