LoslegenKostenlos loslegen

Advanced moment estimates

PortfolioAnalytics supports the "sample" method as well as three more advanced methods for estimating portfolio moments.

  1. "sample": Basic sample estimate of first four moments.
  2. "boudt": The first four moments are estimated by fitting a statistical factor model based on the work of Boudt et al., 2014.
  3. "black_litterman": The first two moments are estimated using the Black-Litterman framework.
  4. "Meucci": The first two moments are estimated using the Fully Flexible Views framework.

In this exercise, you will estimate the second moment using the "boudt" method. A portfolio specification object named port_spec with a "StdDev" objective has already been created.

Diese Übung ist Teil des Kurses

Intermediate Portfolio Analysis in R

Kurs anzeigen

Anleitung zur Übung

  • Print the portfolio specification object.
  • Fit a statistical factor model with 3 factors to the asset returns. Assign to a variable named fit
  • Estimate the portfolio moments using the "boudt" method with 3 factors. Assign to a variable named moments_boudt.
  • Use extractCovariance() to get the estimated variance-covariance matrix from fit and check if it is equal to the estimate in moments_boudt

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Print the portfolio specification object


# Fit a statistical factor model to the asset returns
fit <- statistical.factor.model(R = ___, k = ___)

# Estimate the portfolio moments using the "boudt" method with 3 factors
moments_boudt <- set.portfolio.moments(R = ___, portfolio = ___, method = ___, k = ___)

# Check if the covariance matrix extracted from the model fit is equal to the estimate in `moments_boudt`
moments_boudt$___ == extractCovariance(___)
Code bearbeiten und ausführen