[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-finance
Subject:    [R-SIG-Finance] how to get programmatically "portfolio weights" from portfolioFrontier-Object after
From:       zeljko krizek <z.krizek () gmail ! com>
Date:       2013-07-22 13:24:59
Message-ID: CAKd8xcmDw=sUBkC2rj-YM4b_BXCRny3GVAaSjJ_H1r6ekfP6UA () mail ! gmail ! com
[Download RAW message or body]

Hi There !
I have folowing problem.
I'm using portfolioFrontier function from fPortfolio package to find
optimal portfolio allocation.
That what I want is when the portfolioFrontier function has the job done, I
get in the r-console some print out of the found optimization object with
weights, target return and so on.
But I want to read this informations automatically from returned object to
start other functions with this informations as parameters

This Property I can call "Frontier@portfolio". But retruned object is to
complex and I want to get single properties from tthere.

I tried to reach single on this way properties from object

Frontier@portfolio@weights

Frontier@portfolio$weights


but I'v got such errors
"$ operator not defined for this S4 class"
or
"No Slot "weights" for this Objekt of the class "fPFOLIOVAL"

Can anyone say to me how to get "portfolio weights" and "Target Return and
Risks:", from returned object ?

thanks a lot
Zak

	[[alternative HTML version deleted]]

_______________________________________________
R-SIG-Finance@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only. If you want to post, subscribe first.
-- Also note that this is not the r-help list where general R questions should go.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic