[GSoC-PortA] GSoC Timeline/Kickoff
Joshua Ulrich
josh.m.ulrich at gmail.com
Mon May 19 17:56:26 CEST 2014
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 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.
> 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
More information about the GSoC-PortA
mailing list