<div dir="ltr">Re: Turnover Objective Function<div><br></div><div>I have gone through the slides and code, but did not see an example using turnover as an objective function.</div><div><a href="http://www.rinfinance.com/agenda/2010/Carl+Peterson+Boudt_Tutorial.pdf" style="font-family:arial,sans-serif;font-size:13px" target="_blank">http://www.rinfinance.com/<u></u>agenda/2010/Carl+Peterson+<u></u>Boudt_Tutorial.pdf</a><br style="font-family:arial,sans-serif;font-size:13px">
<a href="https://r-forge.r-project.org/scm/viewvc.php/*checkout*/pkg/PortfolioAnalytics/sandbox/script.workshop2010.R?root=returnanalytics" target="_blank" style="font-size:13px;font-family:arial,sans-serif">https://r-forge.r-project.org/<u></u>scm/viewvc.php/*checkout*/pkg/<u></u>PortfolioAnalytics/sandbox/<u></u>script.workshop2010.R?root=<u></u>returnanalytics</a><br>
</div><div><br></div><div style>I have also gone through this presentation and code, but it does not look like turnover was used as an objective measure. </div><div style><a href="http://www.rinfinance.com/agenda/2012/workshop/Carl+Peterson.pdf">http://www.rinfinance.com/agenda/2012/workshop/Carl+Peterson.pdf</a></div>
<div style><a href="https://r-forge.r-project.org/scm/viewvc.php/pkg/PortfolioAnalytics/sandbox/script.workshop2012.R?view=markup&root=returnanalytics">https://r-forge.r-project.org/scm/viewvc.php/pkg/PortfolioAnalytics/sandbox/script.workshop2012.R?view=markup&root=returnanalytics</a><br>
</div><div><br></div><div>Slide 36 shows a chart of Turnover from Equal Weight, but it looks to be that the turnover was calculated ex-post. Is there a different example you have where turnover is specified as an objective function for the optimization?<br>
</div><div><br></div><div style>Both presentations have some great examples and charts for visualization that I can use for later this summer.</div><div style><br></div><div style>Thanks,</div><div style>Ross Bennett</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 18, 2013 at 4:28 AM, Brian G. Peterson <span dir="ltr"><<a href="mailto:brian@braverock.com" target="_blank">brian@braverock.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 06/18/2013 03:34 AM, Kris Boudt wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Intrinsically, it means that what we used to call "soft constraints"<br>
(the constraints that can be violated) are classified as<br>
"objectives". Seems good to me, but we need to make sure that each<br>
objective has then its multiplier/scaling factor, which by default is<br>
1, but for soft constraints will typically be higher.<br>
</blockquote>
<br></div>
I've never liked the 'soft constraints' construct, as it's not very<br>
clear. My distinction was between things we can do *before* calling the<br>
objective function, only on the weights vector, which we'll call<br>
'constraints' and things that we can do only by acting on the set of all<br>
possible weights vectors which satisfy the constraints (the objectives).<br>
<br>
We've always supported both multipliers and penalties for the individual objectives, from the very first version of the code. In practice, two things go into selecting a multiplier:<br>
<br>
a. the objectives must inherently be of similar scale, e.g. both returning a return number of roughly equal magnitude. if they are not of roughly equal magnitude, then the user needs to use the multiplier to adjust.<br>
<br>
b. the user must understand that to over/under weight a specific objective with respect to other objectives, they need to adjust either the multiplier or the penalty, or both.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
1. I would also include a turnover objective, whereby there seem to<br>
be two possibilities:<br>
<br>
- provide directly the weights at the time of rebalancing - provide<br>
the weights at the previous rebalancing data and include a function<br>
that, uses the return data to calculate the weights at the time of<br>
rebalancing.<br>
</blockquote>
<br></div>
We demonstrated how to use a turnover objective function in our 2012<br>
R/Finance seminar:<br>
<br>
<a href="http://www.rinfinance.com/agenda/2010/Carl+Peterson+Boudt_Tutorial.pdf" target="_blank">http://www.rinfinance.com/<u></u>agenda/2010/Carl+Peterson+<u></u>Boudt_Tutorial.pdf</a><br>
<br>
see page 36<br>
<br>
with code here:<br>
<a href="https://r-forge.r-project.org/scm/viewvc.php/*checkout*/pkg/PortfolioAnalytics/sandbox/script.workshop2010.R?root=returnanalytics" target="_blank">https://r-forge.r-project.org/<u></u>scm/viewvc.php/*checkout*/pkg/<u></u>PortfolioAnalytics/sandbox/<u></u>script.workshop2010.R?root=<u></u>returnanalytics</a><br>
<br>
It would be nice to get the chart from page 36 into the package if we have time later in the summer.<br>
<br>
In practice, turnover can be dealt with either as a constraint (in some solvers) or as an objective. Doug would need to comment on using it as a constraint, I know there's a brief discussion of that in MPO(v1) or perhaps Bernd's book, both of which I have at the office right now.<br>
<br>
I've always done it as an objective, which works fine in current code.<br>
<br>
It would probably be nice to include the turnover function in the package directly and document it.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2. In practical work, I work with a price data file that has all<br>
possible constituents and for each selection date a list of allowed<br>
constituents. Typically an xts with in row the selection dates and<br>
columns the assets with 1 if included and 0 otherwise. Such a<br>
constituents check could be in the constraints object.<br>
</blockquote>
<br></div>
It seems to me that this belongs in the portfolio specification. That is to say that the constituents of the portfolio are defined in the portfolio specification as a time series.<br>
<br>
Another way to think of this, of course, is to say that an equality constraint (weight=0) is imposed on some of the overall universe of constituents at certain times. You can also do it with box constraints that vary through time.<br>
<br>
I think I prefer the first approach as more intuitive for the user, and dealing with subsetting the input data to match the allowed constituents within optimize.portfolio. We're better off never giving data to the solvers that they don't need, and if the constituent is out of the portfolio, then the subset can happen before the optimization step. That's just an initial feeling though.<br>
<br>
I think we need to think more about what it does to the code to support time-varying constraints and portfolio specifications, and then put it wherever it makes the most sense. I don't see any reason to work on that this week though, as the overall structure seems more important to me at this point, and I think we can cover this when we have a more coherent framework to work from.<br>
<br>
Regards,<br>
<br>
Brian<div class="im HOEnZb"><br>
<br>
-- <br>
Brian G. Peterson<br>
<a href="http://braverock.com/brian/" target="_blank">http://braverock.com/brian/</a><br>
Ph: <a href="tel:773-459-4973" value="+17734594973" target="_blank">773-459-4973</a><br>
IM: bgpbraverock<br></div><div class="HOEnZb"><div class="h5">
______________________________<u></u>_________________<br>
GSoC-PortA mailing list<br>
<a href="mailto:GSoC-PortA@lists.r-forge.r-project.org" target="_blank">GSoC-PortA@lists.r-forge.r-<u></u>project.org</a><br>
<a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta" target="_blank">http://lists.r-forge.r-<u></u>project.org/cgi-bin/mailman/<u></u>listinfo/gsoc-porta</a><br>
</div></div></blockquote></div><br></div>