Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return.clean() for method="boudt" runs covMcd() on a single column #15

Open
sdittmar opened this issue May 3, 2019 · 1 comment
Open

Comments

@sdittmar
Copy link

sdittmar commented May 3, 2019

The Return.clean() function in PortfolioAnalytics_1.1.0 hands single columns of the xts time series in a for loop to the clean.boudt() function, which than runs the covMcd() robust location and scatter estimation on a univariate time series.

Maybe the covMcd() function does have a univariate case, but it does seem either erroneous or inefficient.

@sdittmar sdittmar changed the title Return.clean() for method="boudt" runs covMcd() on a single columns Return.clean() for method="boudt" runs covMcd() on a single column May 3, 2019
@sdittmar
Copy link
Author

The univariate case seems to be fully supported by the covMcd function and the FOR-loop is actually faster by a factor of 26x vs the multivariate covMcd in a small 2864 x 227 size xts example I tested.
However, the $raw.center and $raw.cov results of the covMcd function are different between the univariate and the multivariate case. But since the results only flow into the calculation of the Mahalanobis distance and are not used elsewhere, I assume that speed was the reason for that "design choice"!?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant