The Average Investor's Blog

A software developer view on the markets

The Weekly Update

Posted by The Average Investor on Oct 15, 2011

The last week lifted most markets around the world substantially. The gain on the S&P 500 was extraordinary – 5.93%. This steep advance to the upside, moved the S&P above its 20-week MA (as of the close on Friday).

S&P 500 with 20-week MA

The above chart reveals an interesting fact – the surge up was sufficient to penetrate only the fast 20-week EMA (the blue line), but not the 20-week SMA (the red line). Is it another whipsaw or a turn around? Only the future will tell, but based on the current chart, the re-entry is at a better level than the exit.

I will end the post with the code to generate the chart:

> library(quantmod)
> getSymbols("^GSPC", from="1900-01-01")
> png("~/ttt/sp500.png", width=480, height=320)
> chartSeries( to.weekly(GSPC), type="candlesticks", subset="2010/", theme="beige", name="S&P 500", TA=c(addEMA(20), addSMA(20)))

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: