<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Two or three follow up questions to your reply:</div>

<div> </div>

<div>1.  package PortfolioAnalytics date is 2015, so does not seem to have been updated for a while too. But still the package to go for optimization?</div>

<div>2. I am currently looking for a good package for backtesting strategies. I am still working through the recommended packages from the list in view "empirical finance" (excellent overview btw). Which package(s) would you recommend for backtesting?</div>

<div> </div>

<div>My (prelimenary) assessment of  </div>

<div>
<div> </div>

<div>1. package "backtest": not to be used because not many functions, only basics of backtesting are covered.<br/>
 <br/>
2. package: "STI" : not to be used because difficult to install, almost no documentation, last update in 2012</div>

<div><br/>
3. package: "TTR" : very useful!</div>

<div><br/>
4. package: "quantstrat" : very useful</div>

<div> </div>

<div> </div>

<div>Any experience and/or evaluation of the following packages (that I still have on my work through list) would be highly appreciated:</div>

<div> </div>

<div>package: "portfolioSim" </div>

<div>package: "pbo" </div>

<div>package: "portfolio": </div>

<div>package: "factorAnalytics"</div>

<div> </div>

<div> </div>

<div>It seems to me that "quantstrat" is the package to go for. However, documentation is sparse and spread around various sites. Any suggestions for additional sources (outside Guy Yollin) are welcome too.</div>

<div> </div>

<div>Cheers,</div>

<div>Oliver</div>

<div> </div>

<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Gesendet:</b> Sonntag, 27. August 2017 um 15:41 Uhr<br/>
<b>Von:</b> "Brian G. Peterson" <brian@braverock.com><br/>
<b>An:</b> r-sig-finance@r-project.org<br/>
<b>Betreff:</b> Re: [R-SIG-Finance] Some problems while reading Diethelm Würtz's Portfolio Optimization with R book</div>

<div name="quoted-content">Regrettably, Diethelm died in a car accident last year. He is missed by<br/>
many in this community who appreciated his advice, openness, and<br/>
fostering of the community.<br/>
<br/>
fPortfolio has not been updated for some time. I would suggest looking<br/>
at Berhard Pfaff's excellent risk and portfolio management book, as well<br/>
as at packages such as PortfolioAnalytics for actually doing portfolio<br/>
optimization in R.<br/>
<br/>
I still refer to Diethelm's book for ideas and visualizations, but I do<br/>
not use that code.<br/>
<br/>
Regards,<br/>
<br/>
Brian<br/>
<br/>
On 08/27/2017 08:35 AM, Baki UNAL via R-SIG-Finance wrote:<br/>
> Hello<br/>
> 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:<br/>
><br/>
>> minriskSpec <- portfolioSpec()> targetReturn <- getTargetReturn(ewPortfolio@portfolio)["mean"]> setTargetReturn(minriskSpec) <- targetReturn<br/>
>> minriskPortfolio <- efficientPortfolio(data = lppData,spec = minriskSpec,constraints = "LongOnly")> print(minriskPortfolio)<br/>
><br/>
><br/>
><br/>
> But I got the following output:<br/>
><br/>
><br/>
> Title: MV Efficient Portfolio Estimator: covEstimator Solver: solveRquadprog Optimize: minRisk Constraints: LongOnly<br/>
> Portfolio Weights:SBI SPI SII LMI MPI ALT 0 0 0 0 0 0<br/>
> Covariance Risk Budgets:SBI SPI SII LMI MPI ALT<br/>
> Target Returns and Risks:mean Cov CVaR VaR 0 0 0 0<br/>
> Description: Sun Aug 27 16:00:42 2017 by user: win7120<br/>
><br/>
> As you notice R does not compute Portfolio Weights, Target Returns and Risks... etc.<br/>
> I also tried to run the code at "17.3 How to Compute the Global Minimum Variance Portfolio" which is:<br/>
><br/>
>> globminSpec <- portfolioSpec()> globminPortfolio <- minvariancePortfolio(data = lppData,spec = globminSpec,constraints = "LongOnly")> print(globminPortfolio)<br/>
><br/>
> But I got the following output:<br/>
><br/>
> Title:<br/>
> MV Minimum Variance Portfolio<br/>
> Estimator: covEstimator<br/>
> Solver: solveRquadprog<br/>
> Optimize: minRisk<br/>
> Constraints: LongOnly<br/>
><br/>
> Portfolio Weights:<br/>
> SBI SPI SII LMI MPI ALT<br/>
> 0 0 0 0 0 0<br/>
><br/>
> Covariance Risk Budgets:<br/>
> SBI SPI SII LMI MPI ALT<br/>
><br/>
><br/>
> Target Returns and Risks:<br/>
> mean Cov CVaR VaR<br/>
> 0 0 0 0<br/>
><br/>
> Description:<br/>
> Sun Aug 27 16:12:21 2017 by user: win7120<br/>
><br/>
><br/>
><br/>
> As you see R does not make computations again.<br/>
><br/>
> I also tried to run the code at "17.4 How to Compute the Tangency Portfolio" which is:<br/>
><br/>
>> tgSpec <- portfolioSpec()> setRiskFreeRate(tgSpec) <- 0<br/>
><br/>
>> tgPortfolio <- tangencyPortfolio(data = lppData,spec = tgSpec,constraints = "LongOnly")<br/>
><br/>
> This time I got the following error:<br/>
><br/>
><br/>
> Error in if (STATUS != 0) { : argument is of length zero<br/>
><br/>
> What may be the problem? Could you help?<br/>
> Thanks<br/>
><br/>
><br/>
><br/>
><br/>
><br/>
><br/>
><br/>
> [[alternative HTML version deleted]]<br/>
><br/>
> _______________________________________________<br/>
> R-SIG-Finance@r-project.org mailing list<br/>
> <a href="https://stat.ethz.ch/mailman/listinfo/r-sig-finance" target="_blank">https://stat.ethz.ch/mailman/listinfo/r-sig-finance</a><br/>
> -- Subscriber-posting only. If you want to post, subscribe first.<br/>
> -- Also note that this is not the r-help list where general R questions should go.<br/>
><br/>
<br/>
<br/>
--<br/>
Brian G. Peterson<br/>
<a href="http://braverock.com/brian/" target="_blank">http://braverock.com/brian/</a><br/>
Ph: 773-459-4973<br/>
IM: bgpbraverock<br/>
<br/>
_______________________________________________<br/>
R-SIG-Finance@r-project.org mailing list<br/>
<a href="https://stat.ethz.ch/mailman/listinfo/r-sig-finance" target="_blank">https://stat.ethz.ch/mailman/listinfo/r-sig-finance</a><br/>
-- Subscriber-posting only. If you want to post, subscribe first.<br/>
-- Also note that this is not the r-help list where general R questions should go.</div>
</div>
</div>
</div></div></body></html>