# Lattice Explore Bonds

**Timely Portfolio**, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Since my fifth most popular post has been Bond Market as a Casino Game Part 1, I thought I would use Vanguard Total US Bond Market mutual fund (VBMFX) monthly returns to build our skills in the lattice R package and help visualize the unbelievable run of U.S. bonds (Calmar Ratio 1.37 over the past 20 years).

Although I have primarily graphed with R base graphics, PerformanceAnalytics charts, and ggplot, the lattice package provides an extremely powerful set of charting tools.

We can start with a basic qqplot of the entire set of monthly returns.

From TimelyPortfolio |

Then, we can group by year.

From TimelyPortfolio |

Or, we can also very easily split each year into its own panel.

From TimelyPortfolio |

Here is a little different look with a density plot.

From TimelyPortfolio |

Now let’s build boxplots and dotplots.

From TimelyPortfolio |

Add an annual dotplot to a boxplot for the entire period.

From TimelyPortfolio |

Or we can add a boxplot for each year.

From TimelyPortfolio |

See http://timelyportfolio.blogspot.com/search/label/bonds for all my posts on bonds.

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

**Timely Portfolio**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.