Three Important Functions for Plotting Data

1-chart.Histogram(returnVector, methods=c(“add.centered”, “add.rug”, “add.risk”)) #This gives the returns distributed in a Histogram,compared to the normal distribution and with the VaR provided.

Image

2-charts.PerformanceSummary(returnVector) #Very useful plot showing cumulative return, daily (or periodic) return and drawdown. Takes as input artihmetic returns under default settings. Change to log returns by setting geometric=F in the function call.

Image

3-chartSeries(priceVector) #I use this more for charting price movements than returns. This is a versatile and powerful function and can be used for all sorts of technical analysis. You can add a various technical indicators using the ‘TA=…’ parameter entry. Read up on it by entering ‘?chartSeries’

Image

Advertisements

Leave a comment

Filed under Finance

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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