Articles by rbresearch

Shiny with PerformanceAnalytics Example

March 4, 2013 | rbresearch

The folks at Rstudio have done some amazing work with the shiny package. From the shiny homepage, “Shiny makes it super simple for R users like you to turn analyses into interactive web applications that anyone can use.” Developing web applications has always appealed to me, but hosting, learning javascript, ... [Read more...]

Momentum in R: Part 4 with Quantstrat

February 19, 2013 | rbresearch

The past few posts on momentum with R focused on a relatively simple way to backtest momentum strategies. In part 4, I use the quantstrat framework to backtest a momentum strategy. Using quantstrat opens the door to several features and options as well as an order book to check the trades ... [Read more...]

Momentum in R: Part 3

November 18, 2012 | rbresearch

In the previous post, I demonstrated simple backtests for trading a number of assets ranked based on their 3, 6, 9, or 12 (i.e lookback periods) month simple returns. While it was not an exhaustive backtest, the results showed that when trading the top 8 ranked assets, the ranking based 3, 6, 9, and 12 … Continue reading → [Read more...]

Momentum in R: Part 2

October 20, 2012 | rbresearch

Many of the sites I linked to in the previous post have articles or papers on momentum investing that investigate the typical ranking factors; 3, 6, 9, and 12 month returns. Most (not all) of the articles seek to find which is the “best” look-back period to rank the assets. Say that the outcome ... [Read more...]

Momentum with R: Part 1

August 23, 2012 | rbresearch

Time really flies… it is hard to believe that it has been over a month since my last post. Work and life in general have consumed much of my time lately and left little time for research and blog posts. Anyway, on to the post! This post will be the ... [Read more...]

Alternative to Monte Carlo Testing

July 4, 2012 | rbresearch

When we backtest a strategy on a portfolio, it is a simple analysis of a single period in time. There are ways to “stress test” a strategy such as monte carlo, random portfolios, or shuffling the returns in a random order. I could never really wrap my head around monte ... [Read more...]

Fun with the googleVis Package for R

June 30, 2012 | rbresearch

Using packages such as ggplot and lattice can produce some great charts and visualization, but googleVis is tough to beat for interactive charts to share on the web. Click on the image below to open up the html page. This was all done in R! I will warn you that ... [Read more...]

Strategy Diversification in R – follow up

June 25, 2012 | rbresearch

The strategies used in Strategy Diversification in R were labeled as Strategy1 and Strategy2. Strategy1 Indicator: 52 week Simple Moving Average Entry Rule: Buy 1000 shares when price crosses and closes above 52 week Simple Moving Average Exit Rule: Exit all positions when prices crosses and closes below 52 week Simple Moving Average Classification: ... [Read more...]

Quick View on Correlations of Different Instruments

May 24, 2012 | rbresearch

In this post, I will demonstrate how to quickly visualize correlations using the PerformanceAnalytics package. Thanks to the package creators, it is really easy correlation and many other performance metrics. The first chart looks at the rolling 252 day correlation of nine sector ETFs using SPY as the benchmark. As expected ... [Read more...]

Simple Moving Average Strategy with a Volatility Filter

April 18, 2012 | rbresearch

I would describe my trading approach as systematic long term trend following. A trend following strategy can be difficult mentally to trade after experiencing multiple consecutive losses when a trade reverses due to a volatility spike or the trend reverses. Volatility tends to increase when prices fall. This is not ...
[Read more...]

Low Volatility with R

April 12, 2012 | rbresearch

Low volatility and minimum variance strategies have been getting a lot of attention lately due to their outperformance in recent years. Let’s take a look at how we can incorporate this low volatility effect into a monthly rotational strategy with a basket of ETFs. Performance Summary from Low Volatility ... [Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)