Exercise

# Advanced moment estimates

`PortfolioAnalytics`

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

`"sample"`

: Basic sample estimate of first four moments.`"boudt"`

: The first four moments are estimated by fitting a statistical factor model based on the work of Boudt et al., 2014.`"black_litterman"`

: The first two moments are estimated using the Black-Litterman framework.`"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.

Instructions

**100 XP**

- 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`