[R-SIG-Finance] error in tangencyPortfolio when Short
Brian G. Peterson
brian at braverock.com
Sat Apr 18 01:34:06 CEST 2009
BearXu wrote:
> I also tried setSolver= “solveRshortExact”
>
> but fail too.
>
> 2009/4/17 BearXu <bearxu83 at gmail.com>
>
>
>> Oh, a typo.
>>
>> There is NO problem when I use "LongOnly"
>>
>> 2009/4/17 BearXu <bearxu83 at gmail.com>
>>
>>
>>> When I was forming a portfolio in fPortfolio.
>>>
>>> I set:
>>>
>>> Constraints=“Short”
>>>
>>> setSolver= “solveRquadprog”
>>>
>>> tg=tangencyPortfolio(tt, Spec, Constraints)
>>>
>>> then get an error:
>>>
>>> Error in .rquadprog(Dmat = args$Dmat, dvec = args$dvec, Amat = args$Amat,
>>> :
>>> NA/NaN/Inf in foreign function call (arg 8)
>>>
>>> If I use "LongOnly", there is NO problem?
>>>
>>> who can help me to fix it?thanks
>>>
>>>
>>>
You haven't provided a reproducible example per the posting guidelines.
While you provide your code, you have not provided the data set that
produces the error. Perhaps in the name of self-sufficiency you should
also learn to use the R "debug" command, so that you can report where in
the function it breaks.
Regards,
- Brian
--
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock
More information about the R-SIG-Finance
mailing list