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

List:       r-sig-finance
Subject:    Re: [R-SIG-Finance] =?utf-8?q?Some_problems_while_reading_Diethelm_W?=
From:       "Brian G. Peterson" <brian () braverock ! com>
Date:       2017-08-27 13:41:01
Message-ID: aa8b6c64-ddc6-d44c-fa20-c58fff716524 () braverock ! com
[Download RAW message or body]

Regrettably, Diethelm died in a car accident last year.  He is missed by 
many in this community who appreciated his advice, openness, and 
fostering of the community.

fPortfolio has not been updated for some time.  I would suggest looking 
at Berhard Pfaff's excellent risk and portfolio management book, as well 
as at packages such as PortfolioAnalytics for actually doing portfolio 
optimization in R.

I still refer to Diethelm's book for ideas and visualizations, but I do 
not use that code.

Regards,

Brian

On 08/27/2017 08:35 AM, Baki UNAL via R-SIG-Finance wrote:
> Hello
> I am reading Diethelm Würtz's Portfolio Optimization with R book. I encountered a \
> problem at "17.2 How to Compute a Minimum Risk Efficient Portfolio" part. I entered \
> the commands: 
> > minriskSpec <- portfolioSpec()> targetReturn <- \
> > getTargetReturn(ewPortfolio@portfolio)["mean"]> setTargetReturn(minriskSpec) <- \
> > targetReturn minriskPortfolio <- efficientPortfolio(data = lppData,spec = \
> > minriskSpec,constraints = "LongOnly")> print(minriskPortfolio)
> 
> 
> 
> But I got the following output:
> 
> 
> Title: MV Efficient Portfolio  Estimator:         covEstimator  Solver:            \
> solveRquadprog  Optimize:          minRisk  Constraints:       LongOnly Portfolio \
> Weights:SBI SPI SII LMI MPI ALT   0   0   0   0   0   0 Covariance Risk Budgets:SBI \
> SPI SII LMI MPI ALT Target Returns and Risks:mean  Cov CVaR  VaR    0    0    0    \
>                 0
> Description: Sun Aug 27 16:00:42 2017 by user: win7120
> 
> As you notice R does not compute Portfolio Weights, Target Returns and Risks... \
> etc. I also tried to run the code at "17.3 How to Compute the Global Minimum \
> Variance Portfolio" which is: 
> > globminSpec <- portfolioSpec()> globminPortfolio <- minvariancePortfolio(data = \
> > lppData,spec = globminSpec,constraints = "LongOnly")> print(globminPortfolio)
> 
> But I got the following output:
> 
> Title:
> MV Minimum Variance Portfolio
> Estimator:         covEstimator
> Solver:            solveRquadprog
> Optimize:          minRisk
> Constraints:       LongOnly
> 
> Portfolio Weights:
> SBI SPI SII LMI MPI ALT
> 0   0   0   0   0   0
> 
> Covariance Risk Budgets:
> SBI SPI SII LMI MPI ALT
> 
> 
> Target Returns and Risks:
> mean  Cov CVaR  VaR
> 0    0    0    0
> 
> Description:
> Sun Aug 27 16:12:21 2017 by user: win7120
> 
> 
> 
> As you see R does not make computations again.
> 
> I also tried to run the code at "17.4 How to Compute the Tangency Portfolio" which \
> is: 
> > tgSpec <- portfolioSpec()> setRiskFreeRate(tgSpec) <- 0
> 
> > tgPortfolio <- tangencyPortfolio(data = lppData,spec = tgSpec,constraints = \
> > "LongOnly")
> 
> This time I got the following error:
> 
> 
> Error in if (STATUS != 0) { : argument is of length zero
> 
> What may be the problem? Could you help?
> Thanks
> 
> 
> 
> 
> 
> 
> 
> 	[[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.
> 


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

_______________________________________________
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