<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
@font-face
{font-family:Tahoma}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif"}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{margin:0in;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif"}
span.EmailStyle17
{font-family:"Calibri","sans-serif";
color:windowtext}
span.BalloonTextChar
{font-family:"Tahoma","sans-serif"}
.MsoChpDefault
{}
@page WordSection1
{margin:1.0in 1.0in 1.0in 1.0in}
div.WordSection1
{}
-->
</style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Dear all:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I am facing a disconcerting issue with the functions CalculateReturns() and chart.CumReturns() of the PerformanceAnalytics package.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">First, when I try to use CalculateReturns() to back out the returns from the total return indices values, the resulting returns do not add up:</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="text-indent:.5in">Indices.ts <- as.timeSeries(CalculateReturns(indices, method = "compound"))</p>
<p class="MsoNormal" style="text-indent:.5in">#Note that the method = “simple” option only returns zeros for me.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Running the code above on the data in the “indices” CSV file attached, I obtain suspicious returns (for instance the total return for S&P 500 is 17% while it is actually close to 40%).</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Second, when I do the reverse and use chart.CumReturns() with the correct returns calculated manually in the “returns” CSV file attached, I also obtain wrong cumulative returns.
</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal" style="text-indent:.5in">Returns.ts <- chart.CumReturns(returns[,c(1:5), drop = FALSE],
</p>
<p class="MsoNormal"> main="Cumulative Returns",
</p>
<p class="MsoNormal"> begin="axis",</p>
<p class="MsoNormal"> legend.loc = "topleft",
</p>
<p class="MsoNormal"> geometric = TRUE,</p>
<p class="MsoNormal"> wealth.index = TRUE,</p>
<p class="MsoNormal"> colorset = rainbow6equal)</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Running this code plots for instance the Barclays US Agg Corporate in my sample above the Barclays Global Agg whereas the later outperformed it.
</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><img width="550" height="450" id="Picture_x0020_1" src="cid:image001.png@01CD69DE.3138E1C0"></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">I spent a fair amount of time trying to resolve this by myself but it appears that something is amiss.</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Thanks in advance for your much appreciated help!</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Julien</p>
<p class="MsoNormal"> </p>
</div>
<br>
<br>
This e-mail and its attachments are intended only for the individual or entity to whom it is addressed and may contain information that is confidential, privileged, inside information, or subject to other restrictions on use or disclosure. If you have received
this transmission in error, please notify the sender immediately by return e-mail, and permanently delete or destroy this e-mail, any attachments, and all copies. Any unauthorized use, dissemination or copying of this transmission or the information may be
unlawful. This message is provided for informational purposes and should not be construed as an invitation or offer to buy or sell any securities or related financial instruments.
</body>
</html>