[GSoC-PortA] GSoC Timeline/Kickoff

Ross Bennett rossbennett34 at gmail.com
Mon May 19 18:27:35 CEST 2014


On Mon, May 19, 2014 at 8:56 AM, Joshua Ulrich <josh.m.ulrich at gmail.com>wrote:

> On Mon, May 19, 2014 at 10:20 AM, Ross Bennett <rossbennett34 at gmail.com>
> wrote:
> > Mentors (and others on the list),
> >
> <snip>
>
> > Factor Models to Estimate Moments
> >
> > I reached out to Kris Boudt a few weeks ago and he shared some of the
> code
> > he used for his paper. I put together a small package as a prototype. One
> > thing to note is that Kris sent me C++ code (using Rcpp) for computing
> the
> > cokurtosis error matrix. I would prefer not to rewrite the code in R, but
> > this does mean introducing a dependency on Rcpp.  Along these same
> lines, we
> > could also write functions to compute the 3rd and 4th moments in C++. The
> > Armadillo library has a kron() function to compute the kronecker product
> > making the higher moments an easy computation using RcppArmadillo. We
> could
> > do this as a prototype in PortfolioAnalytics and eventually move to
> > PerformanceAnalytics so M3.MM and M4.MM are compiled code. Thoughts?
> >
> I did the initial coskew/cokurt port from R to Rcpp.  The code I wrote
> looks similar to what's in the residualcokurtosis*F.cpp files. They're
> not complicated functions.  If adding a dependency on Rcpp is a big
> deal, the code would be easy to re-write using R's regular C API.  You
> don't want to write these in R.  I don't remember what the speed gains
> were, but they were very large.
>

I used the residualcokurtosis*F.cpp files that Kris sent me without making
any changes so these are the exact functions you wrote.


>
> I have profiled and improved R versions of M3.MM and M4.MM. I'm not
> sure how they compare to the new Rcpp versions though.
>

You can install the moment estimation package with
devtools::install_bitbucket("MomentEstimation", "rossbennett34")

Here is a link to the script I have in the prototype package to test the
Rcpp versions of M3.MM and M4.MM with PerformanceAnalytics.
https://bitbucket.org/rossbennett34/momentestimation/src/e4ecc303a15e2b4175aab38b6e416e03f168893a/sandbox/momentBench.R?at=master
It would be interesting to see the performance comparison of your improved
R versions.


>
> > Here is the source code of the prototype package for moment estimates.
> >
> > https://bitbucket.org/rossbennett34/momentestimation/src
> >
> >
> > Best,
> >
> > Ross
> >
>
> Best,
> --
> Joshua Ulrich  |  about.me/joshuaulrich
> FOSS Trading  |  www.fosstrading.com
> _______________________________________________
> GSoC-PortA mailing list
> GSoC-PortA at lists.r-forge.r-project.org
> http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/gsoc-porta/attachments/20140519/79889fe0/attachment.html>


More information about the GSoC-PortA mailing list