Download Portfolio Probe User`s Manual
Transcript
112 CHAPTER 8. GENERAL USE advanced The treatment of missing values can have a material impact on the optimization, and it can be beneficial to specialize the estimation to your particular application. An easy way to do this is to return the factor model representation: > varfac <- factor.model.stat(retmat, out="factor") When the output argument is set to "factor", the result is a list with components named loadings, uniquenesses and sdev. You can modify these to correspond to an approach appropriate for you. Then you can create the variance matrix from the object: > varian <- fitted(varfac) This works because the result of factor.model.stat when it returns the factor representation—varfac in this case—has a class, and that class has a method for the fitted generic function. The result of this function is the variance matrix that is represented by the factor model. Adding a Benchmark to the Variance Perhaps you have a variance matrix of the individual assets, but the benchmark is not included in the variance. You can add the benchmark to the variance matrix if you have the weights for the constituents of the benchmark and all of the constituents are in your variance matrix. Merely use the var.add.benchmark function from BurStFin: > varian <- var.add.benchmark(varian.assets, spx.weights, + "spx") This function takes three arguments—a variance matrix, a vector of weights (that should sum to 1), and a character string giving the name for the benchmark. The weight vector needs to have names which are (some of) the asset names on the variance matrix. The computation performed by this function is the preferred method of introducing a benchmark into a variance matrix for optimization. See [Burns, 2003a] for a study on approaches to incorporating benchmarks into the variance matrix for optimization. 8.2 The Random Generation or Optimization The optimization process itself is covered in other chapters. The basics are covered in chapters that depend on what you are doing: • Random portfolio generation: Chapter 3. • Long-only portfolio optimization (active, passive or utility-free): Chapter 6. • Long-short portfolio optimization: Chapter 7.