This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PCA Analysis of Interest Rates Post Number 3 | |
# frozenquant.com | |
# 20160531 | |
library(quantmod) | |
library(PerformanceAnalytics) | |
library(ellipse) | |
library(rgl) | |
options(scipen = 20) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PCA Analysis of Interest Rates | |
# Post #2 | |
# FrozenQuant.com | |
require(quantmod) | |
require(PerformanceAnalytics) | |
options(scipen = 20) | |
############################################################## | |
# Get and Prepare data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# R plot of nominal GDP vs 10-year rate using data from FRED | |
# Frozenquant.com | |
# Thanks to KLR for his posts on charting with xtsExtra | |
require(quantmod) | |
require(PerformanceAnalytics) | |
require(xtsExtra) | |
require(RColorBrewer) | |
# Get data for chart -------------------------------------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Faber Strategy Monitor | |
======================================================== | |
This post was created in R using Markdown and posted directly to WordPress. It creates a table of data and a set of price charts for tracking funds used in Mebane Faber's trend following strategy. Data is gathered from Yahoo Finance using the API in the **quantmod** package, then rendered into a web page using RStudio and [***knitr***](http://yihui.name/knitr/), with the help of **googleVis** and **ggplot2**. | |
This particular implementation of the Faber strategy comes from his book *The Ivy Portfolio*. The program is to invest in a broad array of markets and buy individual ETFs when the price of the ETF exceeds its 10-month moving average and sell when it goes below. This particular example uses ten ETFs, two in each major category (as shown in Table 9.2 of *The Ivy Portfolio*). | |
The table shows some basic information about each ETF, the current price versus the 10-month SMA, and the same price/SMA data as of the prior m |