[R-SIG-Finance] fPortfolio, frontierSlider, weightsSlider

Brian G. Peterson brian at braverock.com
Fri Jul 31 19:01:57 CEST 2009


John P. Burkett wrote:
> The package fPortfolio, when I used it a year ago, included a function 
> frontierSlider, which worked well for me.  Judging by the April 20, 
> 2009 reference manual for fPortfolio, the old frontierSlider function 
> has been replaced by a new weightsSlider function.
>
> My attempt to follow the example on p. 57 of the reference manual goes 
> as follows:
> > Data = SMALLCAP.RET
> > Data = Data[, c("BKE", "GG", "GYMB", "KRON")]
> > frontier = portfolioFrontier(Data)
> > weightsSlider(frontier)
> Error in getTargetRisk(object)[, 1] : incorrect number of dimensions
>
> My attempts to use weightsSlider with my own data end with the same 
> error message.
>
> Can anyone diagnosis the error message and/or suggest how to produce 
> an interactive portfolio weights plot?
>
> -John
>
>

Here's how to diagnose the problem and gather more information to share 
with the list:

 >debug(weightsSlider)
 >weightsSlider(frontier)
 
step through the function,
examine what it is doing. 
Go all the way to the failure point once.
Do it again, but this time pay attention as you get close to the failure 
point. 
Collect data to share here on the data being passed into the bit 
(getTargetRisk) that fails.
Examine what the getTargetRisk function normally expects.

Cheers,

  - Brian

-- 

Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list