At the risk of ridicule for my deficient linear algebra skills, I ask
for help using the solve.QP function to do portfolio optimization. I
am trying to following a textbook example and need help converting the
problem into the format required by solve.QP. Below is my sample code
if anyone is
On Thu, 13 Jan 2005 13:44:58 -0500 roger bos wrote:
At the risk of ridicule for my deficient linear algebra skills, I ask
for help using the solve.QP function to do portfolio optimization. I
am trying to following a textbook example and need help converting the
problem into the format
Zeileis,
Thanks, I didn't know about portfolio.optim. I wanted to see how it
works, but when I try showMethods, it doesn't show it to me. Does
that mean I am not allowed to see the inner workings?
Thanks,
Roger
showMethods(portfolio.optim)
Function portfolio.optim:
not a generic function
On Thu, 13 Jan 2005 14:07:29 -0500 roger bos wrote:
Zeileis,
Thanks, I didn't know about portfolio.optim. I wanted to see how it
works, but when I try showMethods, it doesn't show it to me. Does
that mean I am not allowed to see the inner workings?
1. All of this is open source, so you
Also, ' methods(portfolio.optim)' revealed 2 functions for this
generic:
[1] portfolio.optim.default portfolio.optim.ts
Typing portfolio.optim.ts exposes the code for the second one.
If the class of the first argument x is ts, R dispatches
portfiolio.optim(x, ...) to
Thanks to Zeileis and Spencer for commenting. I case anyone wants to
see an example of portfolio optimization using solve.QP directly and
verify that the answer matches that of portfolio.optim, here is the
code:
library(quadprog, lib.loc=C:\\Program Files\\R\\tools)
library(MASS,