HI,
I try to do a Markovitz aplication using fPortfolio package example, like below, but this code not work, someone help me.
     ## SOURCE("fBasics.A0-SPlusCompatibility")
     ## SOURCE("fPortfolio.B2-MarkowitzPortfolio")
     ## Not run:
     ## berndtInvest -
        xmpPortfolio("\nStart: Load monthly data set of returns > ")
        data(berndtInvest)
        # Exclude Date, Market and Interest Rate columns from data frame,
        # then multiply by 100 for percentual returns ...
        berndtAssets = berndtInvest[, -c(1, 11, 18)]
        rownames(berndtAssets) = berndtInvest[, 1]
        head(berndtAssets)

     ## Markowitz Portfolios:
        myPortfolio = portfolioMarkowitz(berndtAssets, targetReturn = 20/100/12)
        print(myPortfolio)
        pm = myPortfolio@pfolio$pm
        ps = myPortfolio@pfolio$ps
        pw = myPortfolio@pfolio$pw
        pfolioTargetReturn(berndtAssets, pw)
        pfolioTargetRisk(berndtAssets, pw)

        myPortfolio = portfolioMarkowitz(berndtAssets, targetReturn = 20/100/12)
        print(myPortfolio)
        pm = myPortfolio@pfolio$pm; pm
        ps = myPortfolio@pfolio$ps; ps
        pw = myPortfolio@pfolio$pw; pw
        pfolioTargetReturn(berndtAssets, pw)
        pfolioTargetRisk(berndtAssets, pw)

     ## Plot results:
        plot(myPortfolio)
     ## End(Not run)

Walmir Almeida Rodrigues
Risk Management Analyst

	[[alternative HTML version deleted]]

