After much searching I found the solution.

getWeights now takes the following as input - getWeights(name@portfolio).


Thus in my example I would have to use getWeights(portfolio@portfolio).


I hope this helps someone.


Yaakov



> Message: 1
> Date: Sun, 03 May 2009 19:59:22 +0300
> From: Yaakov Moser <ymoser@gmail.com>
> Subject: [R-SIG-Finance] fPortfolio - Change in getWeights function
> To: r-sig-finance@stat.math.ethz.ch
> Message-ID: <49FDCD6A.3080206@gmail.com>
> Content-Type: text/plain; charset=windows-1255; format=flowed
>
> I recently upgraded to the latest version of fPortfolio:
>
>
>   
>> Package:            fPortfolio
>> Version:            2100.77
>> Revision:           4093
>> Date:               2009-04-19
>>     
> Has there been a change in the behaviour of the getWeights function?
>
> In the previous versions, it used to return a matrix with the different 
> assets as the columns and the frontier points as the rows.
>
> Now it only returns a single row, which appears to be the last point 
> that is found.
>
>
> Do I need to change the syntax by which I call it?
>
>
> Any help appreciated.
>
>
> See sample code below.
>
>
> Thanks
>
>
> Yaakov
>
>
> Data <- as.timeSeries(data(SMALLCAP.RET))
> Data<-Data[,1:3]
> Spec = portfolioSpec()
> portfolio<-portfolioFrontier(Data,Spec)
>
> #portfolio returns 5 out of the 50 points as we expect.
>
> # The weights are listed as well.
>
> portfolio
>
> #frontierPoints returns a 2 X 50 matrix, as expected
>
> frontierPoints(portfolio)
>
> #getWeights returns only one row...
>
> getWeights(portfolio)
>
>
>   
>> [1] 2.258490e-08 0.000000e+00 1.000000e+00
>> attr(,"invest")
>> [1] 1
>>     
>   

	[[alternative HTML version deleted]]

