[R] how to use solve.QP

2005-01-13 Thread roger bos
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

Re: [R] how to use solve.QP

2005-01-13 Thread Achim Zeileis
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

Re: [R] how to use solve.QP

2005-01-13 Thread roger bos
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

Re: [R] how to use solve.QP

2005-01-13 Thread Achim Zeileis
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

Re: [R] how to use solve.QP

2005-01-13 Thread Spencer Graves
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

Re: [R] how to use solve.QP [SOLVED - ANSWER AVAIL]

2005-01-13 Thread roger bos
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,