300 search results for "quantmod"

R/Finance 2013 Is Coming Quickly…

May 5, 2013
By
R/Finance 2013 Is Coming Quickly…

There is about two weeks remaining until R/Finance 2013 - being held on May 17th and 18th at UIC in Chicago.  Make sure you register beforehand to ensure you have a spot, and – yes - you do want to come to the conference dinner on Friday.   I am particularly excited about the lineup of keynotes

Read more »

The Financial Crisis on Tape Part II

April 26, 2013
By
The Financial Crisis on Tape Part II

First, I would like to welcome all of you reading this via R-Bloggers. I have been a user of this superb resource for years and I'm proud that I now have the opportunity to contribute!In The Financial Crisis on Tape Part I I demonst...

Read more »

FasteR! HigheR! StongeR! – A Guide to Speeding Up R Code for Busy People

April 25, 2013
By
FasteR! HigheR! StongeR! – A Guide to Speeding Up R Code for Busy People

This is an overview of tools for speeding up your R code that I wrote for the Davis R Users’ Group.

First, Ask “Why?”

It’s customary to quote Donald Knuth at this point, but instead I’ll quote my twitter buddy Ted Hart to illustrate a point:

I’m just going to say it.I like for loops in #Rstats,...

Read more »

R and Dropbox

April 15, 2013
By

When you woRk, you probably have a set of useful functions/packages you constantly use. For example, I often use the excellent quantmod package, and the nice multi.sapply function. You want your tools loaded when R session fires. In order to … Continue reading

Read more »

Subtraction Is Crazy

April 4, 2013
By
Subtraction Is Crazy

I was re-reading Michael Murray’s explanation of cointegration:

and marvelling at the calculus.

Calculus blows my mind sometimes. Like, hey guess how much we can do with subtraction.

— protëa(@isomorphisms) March 28, 2013

Of course it’s not any subtraction. It’s subtracting a function from a shifted version of itself. Still doesn’t sound like a universal revolution.

(But of course the...

Read more »

Automatic ARMA/GARCH selection in parallel

March 24, 2013
By

In the original ARMA/GARCH post I outlined the implementation of the garchSearch function. There have been a few requests for the code so … here it is. Quite easy to use too: After the last code line above, fit contains the best (according to the AIC statistic) model, which is the return value of garchFit.

Read more »

Maximum Sharpe Portfolio

March 21, 2013
By
Maximum Sharpe Portfolio

Maximum Sharpe Portfolio or Tangency Portfolio is a portfolio on the efficient frontier at the point where line drawn from the point (0, risk-free rate) is tangent to the efficient frontier. There is a great discussion about Maximum Sharpe Portfolio or Tangency Portfolio at quadprog optimization question. In general case, finding the Maximum Sharpe Portfolio

Read more »

Calender Heatmap with Google Analytics Data

March 15, 2013
By
Calender Heatmap with Google Analytics Data

As data analytics consulting firm, we think we are fortunate that we keep finding problems to find. Recently my team mate found a glaring problem of not having any connector for R with Google. With the inspiration from Michael, Ajay O, it soon become a worth problem to solve. With RGoogleAnalytics package now, we have

Read more »

Calender Heatmap with Google Analytics Data

March 15, 2013
By
Calender Heatmap with Google Analytics Data

As data analytics consulting firm, we think we are fortunate that we keep finding problems to find. Recently my team mate found a glaring problem of not having any connector for R with Google. With the inspiration from Michael, Ajay O, it soon become a worth problem to solve. With RGoogleAnalytics package now, we have

Read more »

Cluster Risk Parity back-test

March 4, 2013
By
Cluster Risk Parity back-test

In the Cluster Portfolio Allocation post, I have outlined the 3 steps to construct Cluster Risk Parity portfolio. At each rebalancing period: Create Clusters Allocate funds within each Cluster using Risk Parity Allocate funds across all Clusters using Risk Parity I created a helper function distribute.weights() function in strategy.r at github to automate these steps.

Read more »