**Naught Not Knot**, and kindly contributed to R-bloggers)

## Description:

My explorations with the FRED (St Louis Financial Reserve Database) in R have yielded some interesting plots, charts and graphs**.*** And some questions…*

## Charts with Explanations:

Yes, I know, the axes are a mess, and the site’s style sheet doesn’t play well with the chart image. I’ll look into that “pretty-ing up” stuff later. Also note that I have not set x-limits or y-limits on these graphs. *Showing each time series to matching scale doesn’t show their correlation as well.*

The **blue** line is the DJIA. The **red** line is the result of multiplying the M1 MULT ratio by the DJIA. Feel free to comment why this would be wrong, or bad finance theory, but I thought it would be an interesting investigative study to see what kind of information the dollar multiplier can add to a financial market time series.

Something odd’s going on… The DJI*MULT appears to be loosely correlative to the market until the “crash” of 2008. Afterwards, peaks are followed, but there’s a definite de-coupling. I look back in history:

Now this is from 20010101-20110101. See how the DJIA*MULT is above the DJIA before the 2009 crash? *What’s going on there*? Also note the effects of Quantitative Easing in late 2008, and QE2, and so on.

It appears we’re not improving as well as we thought. Historically, the DJIA * MULT provided a timeline *above* the DJIA (even when using the same y-scale). Now, all of a sudden, the M1 Multiplier has inverted to DJIA to show that while, yes, the DJIA is rising, the M1 Multiplier value is adjusting the DJIA’s “real” value in dollars, essentially showing that we’re improving, but *nowhere near where it should be*.

## Summary:

I’m at a loss as to what the M1 Money Multiplier is doing to the market, but there’s clearly some funny business going on here. Would DJIA*MULT actually constitute as a health indicator for the DJIA? Could this be some sort of “real” indicator for how the market is truly doing?

## Source Code in R:

1: # DJI weighted against M1 dollar multiplier (MULT)

2: #

3: # Author: Jerold Haas

4: ###############################################################################

` 5: `

6: library("quantmod")

` 7: `

8: Range <- list(

9: Start = '2001-01-01',

10: End = '2011-01-01'

` 11: )`

` 12: `

13: # Get DJIA, SPY, and USD Multiplier (MULT)

` 14: getSymbols(`

15: c('SPY', '^DJI'),

` 16: from = Range$Start,`

` 17: to = Range$End,`

18: src = 'yahoo'

` 19: )`

` 20: `

` 21: getSymbols(`

22: c('MULT'),

` 23: from = Range$Start,`

` 24: to = Range$End,`

25: src = 'FRED'

` 26: )`

` 27: `

` 28: `

29: ###############################################################################

30: # Calculations

31: ###############################################################################

` 32: `

` 33: DJIxMULT <- reclass(DJI$DJI.Adjusted * MULT$MULT)`

34: names(DJIxMULT) <- c("Adjusted")

35: Plot <- list(

` 36: Max = max(DJIxMULT),`

` 37: Min = min(DJIxMULT)`

` 38: )`

` 39: `

` 40: `

41: ###############################################################################

42: # Charting

43: ###############################################################################

` 44: `

` 45: par(`

46: bg = "darkgrey",

47: col.axis = "lightgrey",

48: col.lab = "lightgrey",

49: col.main = "lightgrey",

50: cex.axis = "lightgrey",

51: fg = "lightgrey"

` 52: )`

` 53: `

` 54: plot(`

` 55: DJIxMULT,`

56: col = "red",

57: main = "",

58: xlab = "",

59: ylab = "",

` 60: xlim = c(`

61: as.POSIXct(Range$Start),

62: as.POSIXct(Range$End)

` 63: ),`

` 64: ylim = c(`

` 65: Plot$Min,`

` 66: Plot$Max`

` 67: ),`

` 68: major.ticks = F,`

` 69: minor.ticks = F,`

` 70: `

` 71: )`

` 72: `

73: par( new=T ) #plot over last plot

` 74: `

` 75: plot.xts(`

` 76: DJI$DJI.Adjusted,`

` 77: auto.grid = F,`

78: col = "blue",

79: main = "DJI (Adjusted) & DJI (Adjusted) * MULT)",

80: xlab = "",

81: ylab = "",

` 82: xlim = c(`

83: as.POSIXct(Range$Start),

84: as.POSIXct(Range$End)

` 85: ),`

` 86: ylim = c(`

` 87: Plot$Min,`

` 88: Plot$Max`

` 89: ),`

` 90: major.ticks = F,`

` 91: minor.ticks = F,`

` 92: axes = F`

` 93: )`

` 94: `

` 95: #layout(1:6)`

Code above is an R script relevant to article. Run in your favourite flavour of R.

**leave a comment**for the author, please follow the link and comment on their blog:

**Naught Not Knot**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...