[GSoC-PortA] Factor Model Moment Estimates based on Boudt paper
Brian G. Peterson
brian at braverock.com
Thu May 29 18:16:42 CEST 2014
We should figure out a plan to put compiled higher moment functions into
PerformanceAnalytics.
I'll leave it to you and Josh to figure out whether Rcpp or R's native
.Call API make more sense.
- Brian
On 05/29/2014 11:13 AM, Ross Bennett wrote:
> All,
>
> Some parts of this were briefly discussed in a previous email thread,
> but I want to get the discussion started again.
>
> The code to compute the cokurtosis error matrix for multi factor and
> single factor models is written in C++ and uses the Rcpp package. The
> functions were sent to me by Kris Boudt and written by Joshua Ulrich.
> Joshua did state that the speed gains were very large and we do not want
> to write these in R.
>
> Do we want to re-write using R's C API or should we include "as is" and
> use Rcpp?
>
> This raised another discussion about computing the higher moments. Right
> now we use M3.MM <http://M3.MM> and M4.MM <http://M4.MM> from
> PerformanceAnalytics in set.portfolio.moments to compute the sample
> estimates. I re-wrote these using RcppArmadillo which was fairly
> straightforward because Armadillo has a function to compute the
> kronecker product. Joshua has profiled and optimized coskewness and
> cokurtosis functions written in R that are very fast. They use a
> different algorithm to avoid the kronecker product which results in a
> huge performance gain.
>
> What is the plan for M3.MM <http://M3.MM> and M4.MM <http://M4.MM> in
> PerformanceAnalytics?
>
> This potentially has a big impact on PortfolioAnalytics since the
> moments are computed at each rebalance period iteration.
>
> See attached for a benchmark (Processor: 2.9 GHz Intel Core i7; Memory:
> 8 GB).
>
> Let me know your thoughts and if you have any questions or comments.
>
> Thanks,
> Ross
>
>
> _______________________________________________
> 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
>
--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock
More information about the GSoC-PortA
mailing list