<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1008287547;
        mso-list-type:hybrid;
        mso-list-template-ids:-1585814252 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Two initial comments about regime switching models and their use, keeping mind that I haven’t looked at the proposal in a long time (maybe send it along):<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><span style='mso-list:Ignore'>1)<span style='font:7.0pt "Times New Roman"'>      </span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>There are a lot of models and they tend to be complex.  The good news is that this PortfolioAnalytics development will support people to more (badly needed) research on what models are really worth using.<o:p></o:p></span></p><p class=MsoListParagraph><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><span style='mso-list:Ignore'>2)<span style='font:7.0pt "Times New Roman"'>      </span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>As for use in portfolio optimization a main feature needed is allow the user to specify how to blend <o:p></o:p></span></p><p class=MsoListParagraph><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>data from a prior regime (or regimes) and the new  regime for which you at first have very little data (maybe you already included this in the proposal?)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Doug<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> gsoc-porta-bounces@lists.r-forge.r-project.org [mailto:gsoc-porta-bounces@lists.r-forge.r-project.org] <b>On Behalf Of </b>Ross Bennett<br><b>Sent:</b> Monday, May 19, 2014 8:20 AM<br><b>To:</b> PortfolioAnalytics<br><b>Subject:</b> [GSoC-PortA] GSoC Timeline/Kickoff<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><span style='font-family:"Arial","sans-serif"'>Mentors (and others on the list),</span><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span style='font-family:"Arial","sans-serif"'>It was great seeing you all at R/Finance last week.</span><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><span style='font-family:"Arial","sans-serif"'>Here are the first 3 tasks in the timeline in my original proposal.</span><o:p></o:p></p></div><div><p><span style='font-family:"Arial","sans-serif";color:black'>5/19 - 5/30: Multilayer Optimization</span><span style='color:black'><o:p></o:p></span></p><p><span style='font-family:"Arial","sans-serif";color:black'>5/31 - 6/13: Regime Switching Optimization</span><span style='color:black'><o:p></o:p></span></p><p><span style='font-family:"Arial","sans-serif";color:black'>6/14 - 6/27: Factor Portfolio Optimization</span><span style='color:black'><o:p></o:p></span></p><p><span style='color:black'><o:p> </o:p></span></p><p><span style='font-family:"Arial","sans-serif";color:black'>I would like to modify the timeline as follows:</span><span style='color:black'><o:p></o:p></span></p><p><span style='font-family:"Arial","sans-serif";color:black'>5/19 - 5/30: Regime Switching Optimization</span><span style='color:black'><o:p></o:p></span></p><p><span style='font-family:"Arial","sans-serif";color:black'>5/31 - 6/13: Factor Portfolio Optimization</span><span style='color:black'><o:p></o:p></span></p><p><span style='font-family:"Arial","sans-serif";color:black'>6/14 - 6/27: Multilayer Optimization</span><span style='color:black'><o:p></o:p></span></p><p><span style='color:black'><o:p> </o:p></span></p><p><span style='font-family:"Arial","sans-serif";color:black'>Regime Switching Optimization</span><span style='color:black'><o:p></o:p></span></p><p><span style='font-family:"Arial","sans-serif";color:black'>My code example for the proposal was for regime switching. I kept it pretty general so that the user can just pass in a time series of what portfolio to use depending on the regime for any arbitrary regime switching model. Do you have any comments or feedback on my proposed way for supporting regime switching?</span><o:p></o:p></p><p><span style='font-family:"Arial","sans-serif";color:black'>The regime switching example is in the following code gist</span><span style='color:black'><o:p></o:p></span></p><p><span style='color:#222222'><a href="https://gist.github.com/rossb34/9645489">https://gist.github.com/rossb34/9645489</a></span><span style='color:black'><o:p></o:p></span></p><p><span style='font-family:"Arial","sans-serif";color:black'>Factor Models to Estimate Moments</span><span style='color:black'><o:p></o:p></span></p><p><span style='font-family:"Arial","sans-serif";color:black'>I reached out to Kris Boudt a few weeks ago and he shared some of the code he used for his paper. I put together a small package as a prototype. One thing to note is that Kris sent me C++ code (using Rcpp) for computing the cokurtosis error matrix. I would prefer not to rewrite the code in R, but this does mean introducing a dependency on Rcpp.  Along these same lines, we could also write functions to compute the 3rd and 4th moments in C++. The Armadillo library has a kron() function to compute the kronecker product making the higher moments an easy computation using RcppArmadillo. We could do this as a prototype in PortfolioAnalytics and eventually move to PerformanceAnalytics so <a href="http://M3.MM">M3.MM</a> and <a href="http://M4.MM">M4.MM</a> are compiled code. Thoughts?</span><o:p></o:p></p><p><span style='font-family:"Arial","sans-serif";color:black'>Here is the source code of the prototype package for moment estimates.</span><o:p></o:p></p><p><a href="https://bitbucket.org/rossbennett34/momentestimation/src">https://bitbucket.org/rossbennett34/momentestimation/src</a><o:p></o:p></p><p><o:p> </o:p></p><p>Best,<o:p></o:p></p><p>Ross<o:p></o:p></p></div></div></div></body></html>