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

Correlation (2)



PureBytes Links

Trading Reference Links


This one compute 
the cross-correlation function a stock and an index, or between 2 stocks, or 
between a stock and an indicator (depending what you define in the Y 
variable).
<SPAN 
class=446251315-13072002> 
<SPAN 
class=446251315-13072002>Waz
<SPAN 
class=446251315-13072002> 
<FONT 
color=#a52a00 size=2>
/* Cross-correlation function */<FONT color=#0000ff 
size=2>
// Select market index
Y = Foreign<FONT color=#0000ff 
size=2>("^NDX"<FONT color=#0000ff 
size=2>,"C"<FONT color=#0000ff 
size=2>);
// Logarithmic return
Y = log<FONT color=#0000ff 
size=2>(Y/Ref<FONT color=#0000ff 
size=2>(Y,-1<FONT color=#0000ff 
size=2>));
X = log<FONT color=#0000ff 
size=2>(C<FONT color=#0000ff 
size=2>/Ref<FONT color=#0000ff 
size=2>(C<FONT color=#0000ff 
size=2>,-1<FONT color=#0000ff 
size=2>));
// Means
MX = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(X)/Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>));
MY = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(Y)/Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>));
// Covariance
ACF0X = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(X-MX))/Cum<FONT 
color=#0000ff size=2>(1<FONT 
color=#0000ff size=2>));
ACF0Y = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((Y-MY)*(Y-MY))/Cum<FONT 
color=#0000ff size=2>(1<FONT 
color=#0000ff size=2>));
AC0 = Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)*((ACF0X*ACF0Y)^0.5<FONT 
color=#0000ff size=2>);
// Compute cross-correlation function for lag 1 to 40<FONT 
color=#0000ff size=2>
ACF0 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Y-MY))/AC0);
ACF1 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-1<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF2 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-2<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF3 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-3<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF4 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-4<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF5 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-5<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF6 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-6<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF7 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-7<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF8 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-8<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF9 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-9<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF10 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-10<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF11 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-11<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF12 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-12<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF13 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-13<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF14 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-14<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF15 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-15<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF16 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-16<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF17 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-17<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF18 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-18<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF19 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-19<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF20 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-20<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF21 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-21<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF22 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-22<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF23 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-23<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF24 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-24<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF25 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-25<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF26 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-26<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF27 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-27<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF28 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-28<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF29 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-29<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF30 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-30<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF31 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-31<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF32 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-32<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF33 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-33<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF34 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-34<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF35 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-35<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF36 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-36<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF37 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-37<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF38 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-38<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF39 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-39<FONT color=#0000ff 
size=2>)-MY))/AC0);
ACF40 = LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>((X-MX)*(Ref<FONT color=#0000ff 
size=2>(Y,-40<FONT color=#0000ff 
size=2>)-MY))/AC0);
// Store cross-correlation function in the 40 last bars<FONT 
color=#0000ff size=2>
ACF = 0<FONT color=#0000ff 
size=2>;
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)),ACF1,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-1<FONT color=#0000ff 
size=2>,ACF2,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-2<FONT color=#0000ff 
size=2>,ACF3,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-3<FONT color=#0000ff 
size=2>,ACF4,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-4<FONT color=#0000ff 
size=2>,ACF5,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-5<FONT color=#0000ff 
size=2>,ACF6,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-6<FONT color=#0000ff 
size=2>,ACF7,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-7<FONT color=#0000ff 
size=2>,ACF8,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-8<FONT color=#0000ff 
size=2>,ACF9,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-9<FONT color=#0000ff 
size=2>,ACF10,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-10<FONT color=#0000ff 
size=2>,ACF11,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-11<FONT color=#0000ff 
size=2>,ACF12,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-12<FONT color=#0000ff 
size=2>,ACF13,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-13<FONT color=#0000ff 
size=2>,ACF14,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-14<FONT color=#0000ff 
size=2>,ACF15,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-15<FONT color=#0000ff 
size=2>,ACF16,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-16<FONT color=#0000ff 
size=2>,ACF17,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-17<FONT color=#0000ff 
size=2>,ACF18,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-18<FONT color=#0000ff 
size=2>,ACF19,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-19<FONT color=#0000ff 
size=2>,ACF20,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-20<FONT color=#0000ff 
size=2>,ACF21,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-21<FONT color=#0000ff 
size=2>,ACF22,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-22<FONT color=#0000ff 
size=2>,ACF23,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-23<FONT color=#0000ff 
size=2>,ACF24,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-24<FONT color=#0000ff 
size=2>,ACF25,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-25<FONT color=#0000ff 
size=2>,ACF26,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-26<FONT color=#0000ff 
size=2>,ACF27,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-27<FONT color=#0000ff 
size=2>,ACF28,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-28<FONT color=#0000ff 
size=2>,ACF29,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-29<FONT color=#0000ff 
size=2>,ACF30,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-30<FONT color=#0000ff 
size=2>,ACF31,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-31<FONT color=#0000ff 
size=2>,ACF32,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-32<FONT color=#0000ff 
size=2>,ACF33,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-33<FONT color=#0000ff 
size=2>,ACF34,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-34<FONT color=#0000ff 
size=2>,ACF35,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-35<FONT color=#0000ff 
size=2>,ACF36,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-36<FONT color=#0000ff 
size=2>,ACF37,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-37<FONT color=#0000ff 
size=2>,ACF38,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-38<FONT color=#0000ff 
size=2>,ACF39,ACF);
ACF = IIf<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>)==LastValue<FONTcolor=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))-39<FONT color=#0000ff 
size=2>,ACF40,ACF);
ACF = 100<FONT color=#0000ff 
size=2>*ACF;
// Significance bands
Sigma = 100<FONT color=#0000ff 
size=2>*LastValue<FONT color=#0000ff 
size=2>(Cum<FONT color=#0000ff 
size=2>(1<FONT color=#0000ff 
size=2>))^(-0.5<FONT color=#0000ff 
size=2>);
GraphXSpace=<FONT color=#282828 
size=2>5;<FONT color=#ff0000 
size=2>
Graph0=ACF;<FONT color=#ff0000 
size=2>Graph0Style=<FONT color=#282828 
size=2>2+<FONT color=#282828 
size=2>4;<FONT color=#ff0000 
size=2>Graph0Color=<FONT color=#282828 
size=2>3;<FONT color=#ff0000 
size=2>
Graph1=<FONT color=#282828 
size=2>2*Sigma; <FONT color=#ff0000 
size=2>Graph1Style=<FONT color=#282828 
size=2>1; <FONT color=#ff0000 
size=2>Graph1Color=<FONT color=#282828 
size=2>2;<FONT color=#ff0000 
size=2>
Graph2=-<FONT color=#282828 
size=2>2*Sigma; <FONT color=#ff0000 
size=2>Graph2Style=<FONT color=#282828 
size=2>1; <FONT color=#ff0000 
size=2>Graph2Color=<FONT color=#282828 
size=2>2<FONT color=#0000ff 
size=2>;