You can use the chart.TimeSeries() function in the package
PerformanceAnalytics to do this very easily. See the examples in the help
file for adding shading to user defined event times.
ez

  _____  

From: r-sig-finance-bounces@stat.math.ethz.ch
[mailto:r-sig-finance-bounces@stat.math.ethz.ch] On Behalf Of Brian Lee Yung
Rowe
Sent: Thursday, November 27, 2008 9:19 AM
To: r-sig-finance@stat.math.ethz.ch
Subject: [R-SIG-Finance] Shaded regions as an indicator in quantmod


Hi,

I want to produce charts using quantmod similar to the ones available from
FRED. Specifically, FRED has this handy feature of rendering the
NBER-defined recession periods under the displayed time series.

It seems like calling newTA with the appropriate function handle could
produce the output necessary to define the shading bars, but I'm not sure if
any of the existing charting types can generate the correct look and feel.
Anybody have suggestions?

Thanks,
Brian 

	[[alternative HTML version deleted]]

