Congratulations!

[Valid RSS] This is a valid RSS feed.

Recommendations

This feed is valid, but interoperability with the widest range of feed readers could be improved by implementing the following recommendations.

Source: https://quantivity.wordpress.com/feed/

  1. <?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
  2. xmlns:content="http://purl.org/rss/1.0/modules/content/"
  3. xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  4. xmlns:dc="http://purl.org/dc/elements/1.1/"
  5. xmlns:atom="http://www.w3.org/2005/Atom"
  6. xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
  7. xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  8. xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
  9. >
  10.  
  11. <channel>
  12. <title>Quantivity</title>
  13. <atom:link href="https://quantivity.wordpress.com/feed/" rel="self" type="application/rss+xml" />
  14. <link>https://quantivity.wordpress.com</link>
  15. <description>Uncommon Returns through Quantitative and Algorithmic Trading</description>
  16. <lastBuildDate>Sat, 10 Nov 2012 17:11:45 +0000</lastBuildDate>
  17. <language>en</language>
  18. <sy:updatePeriod>
  19. hourly </sy:updatePeriod>
  20. <sy:updateFrequency>
  21. 1 </sy:updateFrequency>
  22. <generator>http://wordpress.com/</generator>
  23. <cloud domain='quantivity.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
  24. <image>
  25. <url>https://s0.wp.com/i/buttonw-com.png</url>
  26. <title>Quantivity</title>
  27. <link>https://quantivity.wordpress.com</link>
  28. </image>
  29. <atom:link rel="search" type="application/opensearchdescription+xml" href="https://quantivity.wordpress.com/osd.xml" title="Quantivity" />
  30. <atom:link rel='hub' href='https://quantivity.wordpress.com/?pushpress=hub'/>
  31. <item>
  32. <title>Multi-Asset Market Regimes</title>
  33. <link>https://quantivity.wordpress.com/2012/11/09/multi-asset-market-regimes/</link>
  34. <comments>https://quantivity.wordpress.com/2012/11/09/multi-asset-market-regimes/#comments</comments>
  35. <dc:creator><![CDATA[quantivity]]></dc:creator>
  36. <pubDate>Fri, 09 Nov 2012 08:42:35 +0000</pubDate>
  37. <category><![CDATA[Uncategorized]]></category>
  38. <guid isPermaLink="false">http://quantivity.wordpress.com/?p=10079</guid>
  39.  
  40. <description><![CDATA[An astute reader suggested reproducing the results from a recent article on regime analysis by Kritzman et al., Regime Shifts: Implications for Dynamic Strategies in FAJ (May / June 2012). This is a fun exercise to be conducted over a series of posts, as doing so illustrates several important economic principles and some elegant mathematics. [&#8230;]]]></description>
  41. <content:encoded><![CDATA[<p>An astute reader suggested reproducing the results from a recent article on regime analysis by Kritzman <em>et al.</em>, <a href="http://www.cfapubs.org/doi/abs/10.2469/faj.v68.n3.3">Regime Shifts: Implications for Dynamic Strategies</a> in FAJ (May / June 2012). This is a fun exercise to be conducted over a series of posts, as doing so illustrates several important economic principles and some elegant mathematics.</p>
  42. <p>This post begins by identifying <em>macroeconomic market regimes arising from multi-asset economic activity</em>.</p>
  43. <p><span id="more-10079"></span></p>
  44. <p>One big challenge in analyzing market regimes is <em>identification</em>, as they are not directly observable. As an unsupervised statistical learning problem, there is no verifiable &#8220;right answer&#8221;. Beyond identifying regimes, we also want to know the probability of being in a given regime at any given point in time. Finally, our economic activity is measured via time series.</p>
  45. <p>Fortunately, a standard ML technique exists which possesses these attributes: <em>hidden Markov model</em> (HMM). For readers unfamiliar with HMM, here is a brief summary on the theory relevant to our problem. See <cite><a href="http://books.google.com/books?id=LDDzvCsdVs8C">Hidden Markov Models for Time Series</a></cite> by Zucchini and MacDonald (2009) for more details.</p>
  46. <hr>
  47. <p>HMMs are useful because they estimate both unobserved regimes and corresponding probabilities of being in each regime at every point in time. The latter is termed &#8220;local decoding&#8221;, and expressed as the conditional state probabilities:</p>
  48. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=%5Ctext%7BPr%7D%28C_t+%3D+i+%7C+%5Cbf%7BX%7D_T+%3D+%5Cbf%7Bx%7D_T%29+%3D+%5Cfrac%7B%5Ctext%7BPr%7D%28C_t+%3D+i%2C+%5Cbf%7BX%7D%5ET+%3D+%5Cbf%7Bx%7D%5ET%29%7D%7B%5Ctext%7BPr%7D%28%5Cbf%7BX%7D%5ET+%3D+%5Cbf%7Bx%7D%5ET%29%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Ctext%7BPr%7D%28C_t+%3D+i+%7C+%5Cbf%7BX%7D_T+%3D+%5Cbf%7Bx%7D_T%29+%3D+%5Cfrac%7B%5Ctext%7BPr%7D%28C_t+%3D+i%2C+%5Cbf%7BX%7D%5ET+%3D+%5Cbf%7Bx%7D%5ET%29%7D%7B%5Ctext%7BPr%7D%28%5Cbf%7BX%7D%5ET+%3D+%5Cbf%7Bx%7D%5ET%29%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Ctext%7BPr%7D%28C_t+%3D+i+%7C+%5Cbf%7BX%7D_T+%3D+%5Cbf%7Bx%7D_T%29+%3D+%5Cfrac%7B%5Ctext%7BPr%7D%28C_t+%3D+i%2C+%5Cbf%7BX%7D%5ET+%3D+%5Cbf%7Bx%7D%5ET%29%7D%7B%5Ctext%7BPr%7D%28%5Cbf%7BX%7D%5ET+%3D+%5Cbf%7Bx%7D%5ET%29%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;text{Pr}(C_t = i | &#92;bf{X}_T = &#92;bf{x}_T) = &#92;frac{&#92;text{Pr}(C_t = i, &#92;bf{X}^T = &#92;bf{x}^T)}{&#92;text{Pr}(&#92;bf{X}^T = &#92;bf{x}^T)} " class="latex" /></p>
  49. <p>In other words, the probability of being in regime <img src="https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="i" class="latex" /> at time <img src="https://s0.wp.com/latex.php?latex=t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="t" class="latex" /> given the observed data <img src="https://s0.wp.com/latex.php?latex=%5Cbf%7Bx%7D_T&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cbf%7Bx%7D_T&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cbf%7Bx%7D_T&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;bf{x}_T" class="latex" />.</p>
  50. <p>Where <img src="https://s0.wp.com/latex.php?latex=%5Cbf%7BX%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cbf%7BX%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cbf%7BX%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;bf{X}" class="latex" /> is the observed time-series data and <img src="https://s0.wp.com/latex.php?latex=C&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=C&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=C&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="C" class="latex" /> is an unobserved parameter process which conditional probability at time <img src="https://s0.wp.com/latex.php?latex=t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="t" class="latex" /> depends at most on the previous time <img src="https://s0.wp.com/latex.php?latex=%28t-1%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%28t-1%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%28t-1%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="(t-1)" class="latex" />, also known as the Markov property:</p>
  51. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=%5Ctext%7BPr%7D%28C_%7Bt%2B1%7D+%7C+C_t%2C+...%2C+C_1%29+%3D+%5Ctext%7BPr%7D%28C_%7Bt%2B1%7D+%7C+c_t%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Ctext%7BPr%7D%28C_%7Bt%2B1%7D+%7C+C_t%2C+...%2C+C_1%29+%3D+%5Ctext%7BPr%7D%28C_%7Bt%2B1%7D+%7C+c_t%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Ctext%7BPr%7D%28C_%7Bt%2B1%7D+%7C+C_t%2C+...%2C+C_1%29+%3D+%5Ctext%7BPr%7D%28C_%7Bt%2B1%7D+%7C+c_t%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;text{Pr}(C_{t+1} | C_t, ..., C_1) = &#92;text{Pr}(C_{t+1} | c_t) " class="latex" /></p>
  52. <p>Thus, <img src="https://s0.wp.com/latex.php?latex=C&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=C&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=C&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="C" class="latex" /> is an unobservable Markov chain; because of which the conditional probability at time <img src="https://s0.wp.com/latex.php?latex=t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="t" class="latex" /> nicely reduces to (see equation 5.6 in Zucchini, derived from 4.9):</p>
  53. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=%5Ctext%7BPr%7D%28C_%7Bt%2B1%7D+%7C+C_t%2C+...%2C+C_1%29+%3D+%5Cfrac%7B%5Calpha_t%28i%29+%5Cbeta_t%28i%29%7D%7BL_T%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Ctext%7BPr%7D%28C_%7Bt%2B1%7D+%7C+C_t%2C+...%2C+C_1%29+%3D+%5Cfrac%7B%5Calpha_t%28i%29+%5Cbeta_t%28i%29%7D%7BL_T%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Ctext%7BPr%7D%28C_%7Bt%2B1%7D+%7C+C_t%2C+...%2C+C_1%29+%3D+%5Cfrac%7B%5Calpha_t%28i%29+%5Cbeta_t%28i%29%7D%7BL_T%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;text{Pr}(C_{t+1} | C_t, ..., C_1) = &#92;frac{&#92;alpha_t(i) &#92;beta_t(i)}{L_T} " class="latex" /></p>
  54. <p>Where <img src="https://s0.wp.com/latex.php?latex=%5Calpha_t%28i%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha_t%28i%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha_t%28i%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha_t(i)" class="latex" /> and <img src="https://s0.wp.com/latex.php?latex=%5Cbeta_t%28i%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cbeta_t%28i%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cbeta_t%28i%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;beta_t(i)" class="latex" /> are forward and backward probabilities along the Markov chain <img src="https://s0.wp.com/latex.php?latex=C&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=C&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=C&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="C" class="latex" /> at time <img src="https://s0.wp.com/latex.php?latex=t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="t" class="latex" /> (estimated via iterative maximum likelihood using <a href="http://en.wikipedia.org/wiki/Expectation%E2%80%93maximization_algorithm">expectation maximization</a>), and <img src="https://s0.wp.com/latex.php?latex=L_T&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=L_T&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=L_T&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="L_T" class="latex" /> is the likelihood at time <img src="https://s0.wp.com/latex.php?latex=T+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=T+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=T+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="T " class="latex" />.</p>
  55. <p>For those who prefer code, where <code>val</code> is observed time series <img src="https://s0.wp.com/latex.php?latex=%5Cbf%7BX%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cbf%7BX%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cbf%7BX%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;bf{X}" class="latex" /> and <code>numOfStates</code> is number of unobserved regimes for <img src="https://s0.wp.com/latex.php?latex=C&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=C&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=C&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="C" class="latex" />:</p>
  56. <pre class="brush: r; title: ; notranslate">
  57. hmmFit &lt;- HMMFit(val, nStates=numOfStates)
  58. fb &lt;- forwardBackward(hmmFit, val)
  59. eu &lt;- exp(fb$Alpha + fb$Beta - fb$LL)
  60. </pre>
  61. <p>Readers with ML background will recognize HMM as an elementary temporal graphical model (see § 6.2 of <a href="http://books.google.com/books?id=7dzpHCHzNQ4C">Koller and Friedman (2009)</a>).</p>
  62. <hr>
  63. <p>With this tiny bit of HMM theory, we can now formulate our regime analysis problem in economic terms and use a bit of R to solve it. </p>
  64. <p>Consider four measures of economic activity: US equities, real gross domestic product (GDP), inflation, and G10 currencies. Posit each measure of economic activity can be characterized at any point in time as being in either one of <em>two</em> states: stable with corresponding small downside volatility or contracting with corresponding high volatility. This broadly matches traditional wisdom, namely the macroeconomy is either acting &#8220;fairly normal&#8221; or is exceptional (either panic or exuberance).</p>
  65. <p>Worth noting is the obvious caveat that this bi-state model oversimplifies reality, in particular ignoring potential distinction between &#8220;growth&#8221; and &#8220;stagnancy&#8221; (of potential importance during 1970s and 2010s). Intuition is unclear <em>a priori</em> whether a bi- or tri-state model is preferable. A subsequent post will take up this model selection question, as it lacks an easy answer.</p>
  66. <p>Illustrating the conditional probabilities of this model graphically, where a value of 0 indicates 100% likelihood of being in the &#8220;normal&#8221; regime and value of 1 indicates 100% likelihood of being in &#8220;exceptional&#8221; regime:</p>
  67. <p><a href="https://quantivity.files.wordpress.com/2012/11/hmm-regime-state-probs.png"><img data-attachment-id="10161" data-permalink="https://quantivity.wordpress.com/2012/11/09/multi-asset-market-regimes/hmm-regime-state-probs/" data-orig-file="https://quantivity.files.wordpress.com/2012/11/hmm-regime-state-probs.png" data-orig-size="653,900" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="hmm-regime-state-probs" data-image-description="" data-image-caption="" data-medium-file="https://quantivity.files.wordpress.com/2012/11/hmm-regime-state-probs.png?w=218" data-large-file="https://quantivity.files.wordpress.com/2012/11/hmm-regime-state-probs.png?w=600" src="https://quantivity.files.wordpress.com/2012/11/hmm-regime-state-probs.png?w=600&#038;h=826" alt="" title="hmm-regime-state-probs" width="600" height="826" class="aligncenter size-full wp-image-10161" srcset="https://quantivity.files.wordpress.com/2012/11/hmm-regime-state-probs.png?w=600&amp;h=826 600w, https://quantivity.files.wordpress.com/2012/11/hmm-regime-state-probs.png?w=109&amp;h=150 109w, https://quantivity.files.wordpress.com/2012/11/hmm-regime-state-probs.png?w=218&amp;h=300 218w, https://quantivity.files.wordpress.com/2012/11/hmm-regime-state-probs.png 653w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
  68. <p>These regimes match our economic recollection. Equities were normal through much of the 1990s and mid-2000, and in panic the remaining time. GDP growth was exceptionally strong in the mid-1990s, during recovery from dotcom bubble in early 2000s, and during recovery of mortgage bubble in late 2000s; growth during all other times was &#8220;normal&#8221;. Inflation was high during the late 1970s and flanking the mortgage bubble. Currencies were volatile throughout 1980s and 1990s and then again flanking the mortgage bubble.</p>
  69. <p>These regimes also illustrate just how unusual the mortgage bubble was in historical sense, as it is the only time in the past 30 years during which all four measures of macroeconomic activity were simultaneously in exceptional regime.</p>
  70. <hr>
  71. <p>Code to replicate the above results, and quite a bit more to be discussed in subsequent posts.</p>
  72. <p>Note: US equity regime is estimated using daily returns from SPX, rather than equally-weighted basket of S&amp;P 500 sector indices as in the original article. Doing so results in nearly identical equity regime conditional probabilities, hence SPX is chosen in recognition of Occam.</p>
  73. <pre class="brush: r; title: ; notranslate">
  74. library(&quot;RHmm&quot;)
  75. library(&quot;TTR&quot;)
  76.  
  77. displayKritzmanRegimes &lt;- function()
  78. {
  79.  # Display regimes from Kritzman et al. (2012), printing regime
  80.  # statistics and plotting local decoding.
  81.  
  82.  equityRegime &lt;- getEquityTurbulenceRegime()
  83.  inflationRegime &lt;- getInflationRegime()
  84.  growthRegime &lt;- getGrowthRegime()
  85.  currencyTurbulenceRegime &lt;- getCurrencyTurbulenceRegime()
  86.  
  87.  print(equityRegime)
  88.  print(inflationRegime)
  89.  print(growthRegime)
  90.  print(currencyTurbulenceRegime)
  91.  
  92.  plotMarkovRegimes(equityRegime, &quot;Equity (SPX)&quot;, plotDensity=F)
  93.  plotMarkovRegimes(inflationRegime, &quot;Inflation (CPIAUCNS)&quot;, plotDensity=F)
  94.  plotMarkovRegimes(growthRegime, &quot;Real GDP (GDPC1)&quot;, plotDensity=F)
  95.  plotMarkovRegimes(currencyTurbulenceRegime, &quot;G10 Currency Turbulence&quot;,
  96.                    plotDensity=F)
  97.  
  98.  plotLocalDecodings(list(equityRegimeTurbulence, growthRegime, inflationRegime,
  99.                          currencyTurbulenceRegime),
  100.                     list(&quot;US Equity (SPX)&quot;, &quot;Real GDP (GDPC1)&quot;,
  101.                          &quot;Inflation (CPIAUCNS)&quot;,&quot;G10 Currency Turbulence&quot;),
  102.                     regimeNums=c(2,2,2,2))
  103. }
  104.  
  105. getEquityTurbulenceRegime &lt;- function(startDate=as.Date(&quot;1977-12-01&quot;),
  106.                                      endDate=Sys.Date(), numOfStates=2)
  107. {
  108.  # Estimate two-state markov (SPX-based) equity regime. In lieu of S&amp;P 500
  109.  # sector indices, use SPX instead.
  110.  #
  111.  # Args:
  112.  #     startDate: date which to begin panel for regime estimation
  113.  #     endDate: end which to end panel for regime estimation
  114.  #     numOfStates: number of hidden states in regime
  115.  #
  116.  # Returns: hmmFit from HMMFit(), suitable for display with plotMarkovRegime()
  117.  
  118.  spx &lt;- dROC(getOhlcv(instrumentSymbol=&quot;^GSPC&quot;, startDate=startDate,
  119.                              endDate=endDate, quote=c(&quot;close&quot;)))
  120.  spxTurb &lt;- rollingTurbulence(spx, avgWidth=(250 * 10),
  121.                                    covarWidth=(250 * 10))
  122.  meanTurb &lt;- apply.monthly(spxTurb, mean)
  123.  estimateMarkovRegimes(meanTurb, numOfStates=numOfStates)
  124. }
  125.  
  126. getInflationRegime &lt;- function(startDate=as.Date(&quot;1946-01-01&quot;), endDate=Sys.Date(),
  127.                               numOfStates=2)
  128. {
  129.  # Estimate two-state markov (CPI-based) inflation regime.
  130.  #
  131.  # Args:
  132.  #     startDate: date which to begin panel for regime estimation
  133.  #     endDate: end which to end panel for regime estimation
  134.  #     numOfStates: number of hidden states in regime
  135.  #
  136.  # Returns: hmmFit from HMMFit(), suitable for display with plotMarkovRegime()
  137.  
  138.  val &lt;- 100 *dROC(getFREDData(symbol=&quot;CPIAUCNS&quot;, startDate=startDate,
  139.                               endDate=endDate))
  140.  estimateMarkovRegimes(val, numOfStates=numOfStates)
  141. }
  142.  
  143. getGrowthRegime &lt;- function(startDate=as.Date(&quot;1946-01-01&quot;),
  144.                            endDate=as.Date(&quot;2012-12-31&quot;), numOfStates=2)
  145. {
  146.  # Estimate two-state markov (GDP-based) growth regime.
  147.  #
  148.  # Note: Growth regime appears to be bi-modal, and thus need to estimate
  149.  # several times to get convergence on the regime reported by Kritzman.
  150.  #
  151.  # Args:
  152.  #     startDate: date which to begin panel for regime estimation
  153.  #     endDate: end which to end panel for regime estimation
  154.  #     numOfStates: number of hidden states in regime
  155.  #
  156.  # Returns: hmmFit from HMMFit(), suitable for display with plotMarkovRegime()
  157.  
  158.  val &lt;- 100 * dROC(getFREDData(symbol=&quot;GDPC1&quot;, startDate=startDate,
  159.                                endDate=endDate))
  160.  estimateMarkovRegimes(val, numOfStates=numOfStates)
  161. }
  162.  
  163. getCurrencyTurbulenceRegime &lt;- function(startDate=as.Date(&quot;1971-01-01&quot;),
  164.                                        endDate=Sys.Date(),
  165.                                        numOfStates=2)
  166. {
  167.  # Estimate two-state markov (G10-based) currency turbulence regime.
  168.  #
  169.  # Args:
  170.  #     startDate: date which to begin panel for regime estimation
  171.  #     endDate: end which to end panel for regime estimation
  172.  #     numOfStates: number of hidden states in regime
  173.  #
  174.  # Returns: hmmFit from HMMFit(), suitable for display with plotMarkovRegime()
  175.  
  176.  g10rates &lt;- getG10Currencies()
  177.  avgg10rates &lt;- xts(100 * rowMeans(dROC(g10rates), na.rm=T),
  178.                     order.by=last(index(g10rates), -1))
  179.  turbG10rates &lt;- rollingTurbulence(avgg10rates, avgWidth=(250 * 3),
  180.                                    covarWidth=(250 * 3))
  181.  meanTurbG10rates &lt;- apply.monthly(turbG10rates, mean)
  182.  
  183.  estimateMarkovRegimes(meanTurbG10rates, numOfStates=numOfStates)
  184. }
  185.  
  186. estimateMarkovRegimes &lt;- function(val, numOfStates=2)
  187. {
  188.  # Estimate n-state hidden markov model (HMM) for val.
  189.  #
  190.  # Args:
  191.  #     val: series
  192.  #     numOfStates: number of hidden states in HMM
  193.  #
  194.  # Returns: hmmFit from HMMFit(), suitable for display with plotMarkovRegime()
  195.  
  196.  hmmFit &lt;- HMMFit(val, nStates=numOfStates)
  197.  return (list(val=val, hmmFit=hmmFit))
  198. }
  199.  
  200. plotLocalDecodings &lt;- function(regimes, symbols, plotDateRange=&quot;1900::2012&quot;,
  201.                             regimeNums)
  202. {
  203.  # Plot local decodings for a list of HMM regimes, optionally over a set
  204.  # date range.
  205.  #
  206.  # Args:
  207.  #     regimes: list of regimes, as returned by estimateMarkovRegimes()
  208.  #     symbols: list of human-readable symbols for regimes
  209.  #     plotDateRange: option date over which to plot regime local decodings
  210.  #     regimeNums: index of HMM regime, into regimes, to plot
  211.  
  212.  oldpar &lt;- par(mfrow=c(1,1))
  213.  on.exit(par(oldpar))
  214.  
  215.  layout(c(1,2,3,4))
  216.  
  217.  # generate merge of local decodings
  218.  localList &lt;- lapply(c(1:length(regimes)), function(i) {
  219.    
  220.    regime &lt;- regimes[[i]]
  221.    fb &lt;- forwardBackward(regime$hmmFit, regime$val)
  222.    eu &lt;- exp(fb$Alpha + fb$Beta - fb$LL)
  223.    local &lt;- xts(eu[,regimeNums[i]], index(regime$val))[plotDateRange]
  224.    
  225.    plota(local, type='l', plotX=T, col=drawColors[i], main=symbols[i])
  226.  })
  227. }
  228.  
  229. plotMarkovRegimes &lt;- function(regime, symbol, plotDateRange=&quot;1900::2012&quot;,
  230.                              plotDensity=T, plotTimeSeries=T)
  231. {
  232.  # Plot markov regimes from HMM: kernel densities and per-regime local decodings.
  233.  #
  234.  # Args:
  235.  #     hmmFit: fit for HMM, as generated by estimateMarkovRegimes()
  236.  #     symbol: human-readable description of series with markov regimes
  237.  #     plotDateRange: contiguous range of time which to plot
  238.  
  239.  val &lt;- regime$val
  240.  hmmFit &lt;- regime$hmmFit
  241.  
  242.  # calculate local decoding
  243.  fb &lt;- forwardBackward(hmmFit, val)
  244.  eu &lt;- exp(fb$Alpha + fb$Beta - fb$LL)
  245.  hmmMeans &lt;- hmmFit$HMM$distribution$mean
  246.  hmmSD &lt;- sqrt(hmmFit$HMM$distribution$var)
  247.  
  248.  # plot kernel density with regime means
  249.  oldpar &lt;- par(mfrow=c(1,1))
  250.  on.exit(par(oldpar))
  251.  
  252.  if (plotDensity)
  253.  {
  254.    plot(density(val), main=paste(&quot;Density with Regime Means:&quot;, symbol))
  255.    abline(v=mean(val), lty=2)
  256.    
  257.    sapply(c(1:length(hmmMeans)), function(i) {
  258.      abline(v=hmmMeans[i], lty=2, col=drawColors[(i+1)])
  259.      curve(dnorm(x, hmmMeans[i], hmmSD[i]), add=T, lty=3,
  260.            col=drawColors[(i+1)])
  261.    })
  262.  }
  263.  
  264.  # Plot time series of percent change and local decoding for each regime
  265.  if (plotTimeSeries)
  266.  {
  267.    merged &lt;- merge(val, eu)
  268.    layout(c(1:(1+ncol(eu))))
  269.    
  270.    plota(merged[,1][plotDateRange], type='l', paste(&quot;Regime:&quot;, symbol), plotX=F)
  271.    sapply(c(1:length(hmmMeans)), function(i) {
  272.      abline(h=hmmMeans[i], lty=2, col=drawColors[(i+1)])
  273.    })
  274.    plota.legend(&quot;Percent Change:&quot;, drawColors[1], last(merged[,1]))
  275.    
  276.    sapply(c(1:ncol(eu)), function(i) {
  277.      
  278.      plota(xts(merged[,(i+1)], index(val))[plotDateRange], type='l',
  279.            plotX=(i==(ncol(eu))),
  280.            col=drawColors[(i+1)])
  281.      plota.legend(paste0(&quot;Event Regime &quot;, i, &quot;:&quot;), drawColors[(i+1)],
  282.                   last(merged[,(i+1)]))
  283.    })
  284.  }
  285. }
  286.  
  287. dROC &lt;- function(x, n=1)
  288. {
  289.  # Return discrete rate-of-change (ROC) for a series, without padding
  290.  ROC(x, n, type=&quot;discrete&quot;, na.pad=F)
  291. }
  292. </pre>
  293. ]]></content:encoded>
  294. <wfw:commentRss>https://quantivity.wordpress.com/2012/11/09/multi-asset-market-regimes/feed/</wfw:commentRss>
  295. <slash:comments>20</slash:comments>
  296. <media:content url="https://1.gravatar.com/avatar/a9ee4f38c7bbbbf864d24e654111565e7559b8ab5d6740d90efc36077b8b6555?s=96&#38;d=identicon&#38;r=G" medium="image">
  297. <media:title type="html">quantivity</media:title>
  298. </media:content>
  299.  
  300. <media:content url="https://quantivity.files.wordpress.com/2012/11/hmm-regime-state-probs.png" medium="image">
  301. <media:title type="html">hmm-regime-state-probs</media:title>
  302. </media:content>
  303. </item>
  304. <item>
  305. <title>Implicit Momentum Bias</title>
  306. <link>https://quantivity.wordpress.com/2012/10/25/implicit-momentum-bias/</link>
  307. <comments>https://quantivity.wordpress.com/2012/10/25/implicit-momentum-bias/#comments</comments>
  308. <dc:creator><![CDATA[quantivity]]></dc:creator>
  309. <pubDate>Thu, 25 Oct 2012 08:35:27 +0000</pubDate>
  310. <category><![CDATA[Uncategorized]]></category>
  311. <guid isPermaLink="false">http://quantivity.wordpress.com/?p=9948</guid>
  312.  
  313. <description><![CDATA[Tadas asked an interesting question in his recent post: Where did all the finance bloggers go? A variety of folks gave thoughtful replies: Josh Brown, Flex Salmon, David Merkel, Scott Bell, the Macro Men, and bunch of anonymous professional traders. Undoubtedly, there is truth in all their observations. Yet, perhaps there is a common root [&#8230;]]]></description>
  314. <content:encoded><![CDATA[<p>Tadas asked an interesting question in his recent post: <a href="http://abnormalreturns.com/where-did-all-the-finance-bloggers-go/">Where did all the finance bloggers go?</a> A variety of folks gave thoughtful replies: <a href="http://www.thereformedbroker.com/2012/10/23/where-did-all-the-finance-bloggers-go-my-theories/">Josh Brown</a>, <a href="http://blogs.reuters.com/felix-salmon/2012/10/23/did-the-financial-blogosphere-go-away/">Flex Salmon</a>, <a href="http://alephblog.com/2012/10/24/why-i-love-blogging/">David Merkel</a>, <a href="http://iheartwallstreet.com/2012/10/24/why-i-stopped-blogging/">Scott Bell</a>, the <a href="http://macro-man.blogspot.com/2012/10/introspection-day.html">Macro Men</a>, and bunch of <a href="http://www.rmdfx.com/2012/10/24/prominent-market-players-talk-about-this-market-enviroment/">anonymous professional traders</a>. Undoubtedly, there is truth in all their observations.</p>
  315. <p>Yet, perhaps there is a common root cause at work, not yet stated: <em>implicit momentum bias</em>.</p>
  316. <p><span id="more-9948"></span></p>
  317. <p>Let me break that down, as there is a bit of intentional double entendre. By &#8220;momentum&#8221;, I intend a sustained trend, whether conceptual or technical. By &#8220;implicit bias&#8221;, I intend a cognitive preference which is rarely stated and often partially or fully unconscious.</p>
  318. <p>You can see this bias in numerous ways, affecting both blog readers and authors:</p>
  319. <ul>
  320. <li><strong>Retail trading</strong>: the vast majority of retail investors and traders are pursuing discretionary strategies which boil down to technical momentum, whether conceived explicitly (<em>e.g.</em> ad hoc moving average strategies or more arcane technical analysis voodoo) or implicitly (<em>e.g.</em> cocktail party stock tips or watching CNBC). Thus, the vast majority of retail exhibit this bias.</li>
  321. <li><strong>Asset managers</strong>: many active asset managers are pursuing strategies which also essentially boil down to technical momentum, either due to stock picking or executing strategies aligned with historically strong long-term risk-adjusted returns of momentum. This is exemplified by a quick scan of the <a href="http://hq.ssrn.com/rankings/Ranking_display.cfm?TRN_gID=10&amp;requesttimeout=900">Top Papers</a> from SSRN, for which 2 of 10 top are momentum papers (followed by lots more of varying sophistication). Thus, majority of asset managers exhibit this bias.</li>
  322. <li><strong>Quant funds</strong>: many low-, and medium-frequency funds run strategies which are essentially momentum dressed in sophisticated clothing, often tracking one or more risk premia (whether due to anomalies or market structure) rather than raw prices. This is nicely exemplified by Ilmanen&#8217;s well-reviewed <a href="http://www.amazon.com/Expected-Returns-Investors-Harvesting-Rewards/dp/1119990726">Expected Returns</a>, who now works at AQR. Thus, many hedge funds exhibit this bias.</li>
  323. <li><strong>Mainstream financial media</strong>: ratings are driven by viewers&#8217; perception &#8220;something is happening&#8221;, which almost always occurs in strongly trending markets: bubbles or crashes. In contrast, range-bound markets are often remarked to be &#8220;boring&#8221; or &#8220;frustrating&#8221;, with corresponding tanking in ratings. Thus, mainstream media exhibits this bias.</li>
  324. <li><strong>Blogs / Twitter</strong>: building readership depends on establishing a distinctive perspective or &#8220;voice&#8221;, enabling a blog or stream to stand out amongst all the noise. This demands the corresponding content to be formulaic in some predictable sense. Blogs have an even higher bar than Twitter, as blogs are expected to hold up as being &#8220;good&#8221; despite hindsight bias&mdash;meaning their shelf life must extend until they are read at some indeterminate point in the future. <a href="http://falkenblog.blogspot.com/">Falkenblog</a> is a good example, which has been a tireless advocate of the low-vol anomaly for many years. Thus, many blogs and twitter exhibit this bias.</li>
  325. <li><strong>Alpha research</strong>: much of the search for alpha is tested via historical backtests that span many years, invariably including both trending and range-bound regimes. Invariably, majority of both alpha and beta strategies perform best in momentum-driven trending markets, of which the past 30 years have mostly been; those strategies that perform well in range markets often are regime-aware, and trade different across regimes. Careful review of nearly all popular tactical and dynamic asset allocation strategies exhibit this (along with many exhibiting a pervasive, unstated bias from the 30-year bond bull run). Thus, alpha research often exhibits this bias.</li>
  326. </ul>
  327. <p>Momentum originates from one of the most influential aspects of human psychology: confirmation bias. Simply put, humans &#8220;like to be right&#8221;: enjoying and finding comfort in writing and reading information that confirms their existing beliefs or hypotheses (scientifically attributable to stimulus-response dopamine effects).</p>
  328. <p>Thus, range-bound markets are frustrating for many folks because they form opinions conceived as directional bets. For them, <em>their momentum bias generates significant pain in markets like this&mdash;which makes them tune-out</em>. This is also seen in hedge funds, which in aggregate have a comparatively poor record in range-bound markets. In contrast, many computers find enjoyment in markets which generally defy non-quantitative directional prediction.</p>
  329. <p>Coming full circle back to Tadas&#8217; question, perhaps this implicit momentum bias partially explains the durability of his blog&mdash;and, in doing so, perhaps contributes to the question he raised. He astutely blends the benefits of momentum, while avoiding its detriments: </p>
  330. <ul>
  331. <li>Is a &#8220;forecast free blog&#8221;, thus ensuring he cannot be wrong in hindsight</li>
  332. <li>Follows a well-established presentation style, thus ensuring his distinctive voice</li>
  333. <li>Aggregates and synthesizes from materials authored by others, ensuring both a constant stream of material and diversity of opposing perspectives to satisfy both sides of any debate</li>
  334. <li>Varies topical coverage on a daily basis to remain relevant and responsive to the trends which dominate investor and trader mindshare</li>
  335. </ul>
  336. <p>If only we could all replicate alpha strategies as durably as his blog has effectively contributed to the financial blogosphere over the years.</p>
  337. ]]></content:encoded>
  338. <wfw:commentRss>https://quantivity.wordpress.com/2012/10/25/implicit-momentum-bias/feed/</wfw:commentRss>
  339. <slash:comments>3</slash:comments>
  340. <media:content url="https://1.gravatar.com/avatar/a9ee4f38c7bbbbf864d24e654111565e7559b8ab5d6740d90efc36077b8b6555?s=96&#38;d=identicon&#38;r=G" medium="image">
  341. <media:title type="html">quantivity</media:title>
  342. </media:content>
  343. </item>
  344. <item>
  345. <title>Volume Clock, Gaps, and GOOG</title>
  346. <link>https://quantivity.wordpress.com/2012/10/23/volume-clock-gaps-and-goog/</link>
  347. <comments>https://quantivity.wordpress.com/2012/10/23/volume-clock-gaps-and-goog/#comments</comments>
  348. <dc:creator><![CDATA[quantivity]]></dc:creator>
  349. <pubDate>Tue, 23 Oct 2012 19:07:08 +0000</pubDate>
  350. <category><![CDATA[Uncategorized]]></category>
  351. <guid isPermaLink="false">http://quantivity.wordpress.com/?p=9778</guid>
  352.  
  353. <description><![CDATA[GOOG unexpectedly disclosed their Q3 earnings early last week, on October 18th. While earnings were marginally interesting, much more amusing was the corresponding hiccup in intraday trading. This event provides an opportunity to dig into TAQ data, view through a HFT lens, and build intuition from some elegant ideas due to Mendelbrot, Clark, and Ané. [&#8230;]]]></description>
  354. <content:encoded><![CDATA[<p>GOOG unexpectedly disclosed their Q3 earnings early last week, on October 18th. While earnings were marginally interesting, much more amusing was the corresponding hiccup in intraday trading. This event provides an opportunity to dig into TAQ data, view through a HFT lens, and build intuition from some elegant ideas due to Mendelbrot, Clark, and Ané.</p>
  355. <p><span id="more-9778"></span></p>
  356. <p>Begin by taking a look at the time-series plot of intraday trade prices for GOOG from the 18th (from one exchange):</p>
  357. <p><a href="https://quantivity.files.wordpress.com/2012/10/goog-trades-20121018.png"><img data-attachment-id="9795" data-permalink="https://quantivity.wordpress.com/2012/10/23/volume-clock-gaps-and-goog/goog-trades-20121018/" data-orig-file="https://quantivity.files.wordpress.com/2012/10/goog-trades-20121018.png" data-orig-size="699,723" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="goog-trades-20121018" data-image-description="" data-image-caption="" data-medium-file="https://quantivity.files.wordpress.com/2012/10/goog-trades-20121018.png?w=290" data-large-file="https://quantivity.files.wordpress.com/2012/10/goog-trades-20121018.png?w=600" src="https://quantivity.files.wordpress.com/2012/10/goog-trades-20121018.png?w=600&#038;h=620" alt="" title="goog-trades-20121018" width="600" height="620" class="aligncenter size-full wp-image-9795" srcset="https://quantivity.files.wordpress.com/2012/10/goog-trades-20121018.png?w=600&amp;h=620 600w, https://quantivity.files.wordpress.com/2012/10/goog-trades-20121018.png?w=145&amp;h=150 145w, https://quantivity.files.wordpress.com/2012/10/goog-trades-20121018.png?w=290&amp;h=300 290w, https://quantivity.files.wordpress.com/2012/10/goog-trades-20121018.png 699w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
  358. <p>The tape clearly illustrates some unhappy traders, with what appears to be a gap down in the noon hour (followed by trading halt until 3pm). Intraday dynamics can be better understood with a time-series summary of the corresponding trades and quotes:</p>
  359. <p><a href="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018.png"><img data-attachment-id="9832" data-permalink="https://quantivity.wordpress.com/2012/10/23/volume-clock-gaps-and-goog/goog-taq-20121018/" data-orig-file="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018.png" data-orig-size="678,875" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="goog-taq-20121018" data-image-description="" data-image-caption="" data-medium-file="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018.png?w=232" data-large-file="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018.png?w=600" src="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018.png?w=600&#038;h=774" alt="" title="goog-taq-20121018" width="600" height="774" class="aligncenter size-full wp-image-9832" srcset="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018.png?w=600&amp;h=774 600w, https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018.png?w=116&amp;h=150 116w, https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018.png?w=232&amp;h=300 232w, https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018.png 678w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
  360. <p>Although the price appears to gap when viewed on a low-frequency daily chart, drilling into the noon hour illustrates the contrary:</p>
  361. <p><a href="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-noon-one.png"><img loading="lazy" data-attachment-id="9833" data-permalink="https://quantivity.wordpress.com/2012/10/23/volume-clock-gaps-and-goog/goog-taq-20121018-noon-one/" data-orig-file="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-noon-one.png" data-orig-size="674,877" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="goog-taq-20121018-noon-one" data-image-description="" data-image-caption="" data-medium-file="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-noon-one.png?w=231" data-large-file="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-noon-one.png?w=600" src="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-noon-one.png?w=600&#038;h=780" alt="" title="goog-taq-20121018-noon-one" width="600" height="780" class="aligncenter size-full wp-image-9833" srcset="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-noon-one.png?w=600&amp;h=780 600w, https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-noon-one.png?w=115&amp;h=150 115w, https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-noon-one.png?w=231&amp;h=300 231w, https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-noon-one.png 674w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
  362. <p>Rather than a single print gap, the price action evolved more slowly over 12:30 to 12:40. The spread quickly expanded after 12:30, presumably driven by the jump in volume subsequent to disclosure. A 5,000 share trade printed shortly after 12:32, as spreads were beginning to stabilize. This precipitated some fear and greed, as market makers blew the spreads out to $4. Spread dynamics after noon appear to be fairly typical response to uncertainty and toxicity, as the summary is qualitatively similar to other similar events such as the morning after Bear in 2008.</p>
  363. <p>By way of comparison, below is plot for TAQ summary on 3:25 &#8211; 4pm:</p>
  364. <p><a href="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-three-four.png"><img loading="lazy" data-attachment-id="9834" data-permalink="https://quantivity.wordpress.com/2012/10/23/volume-clock-gaps-and-goog/goog-taq-20121018-three-four/" data-orig-file="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-three-four.png" data-orig-size="668,878" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="goog-taq-20121018-three-four" data-image-description="" data-image-caption="" data-medium-file="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-three-four.png?w=228" data-large-file="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-three-four.png?w=600" src="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-three-four.png?w=600&#038;h=788" alt="" title="goog-taq-20121018-three-four" width="600" height="788" class="aligncenter size-full wp-image-9834" srcset="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-three-four.png?w=600&amp;h=788 600w, https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-three-four.png?w=114&amp;h=150 114w, https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-three-four.png?w=228&amp;h=300 228w, https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-three-four.png 668w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
  365. <p>Now that we are familiar with the TAQ action as measured in human chronology, let&#8217;s view it through a different lens&mdash;following the intuition from Mandelbrot (1963), Clark (1971), and most recently Easley <em>et al.</em> (2012).</p>
  366. <p>To do so, begin by considering trades for GOOG from another day which is more normal, say the following day Oct 19. Start with human chronology, and calculate the time series of first differences for 1 and 5 minute bars. Next estimate the <a href="http://en.wikipedia.org/wiki/Kernel_density_estimation">Epanechnikov kernel density</a> from first differences. Finally, fit the corresponding Gaussian for the same first differences. Or, in R:</p>
  367. <pre class="brush: r; title: ; notranslate">
  368. # first differences
  369. min1Diff &lt;- diff(to.minutes(trades$price)[,4], na.pad=F)
  370. min10Diff &lt;- diff(to.minutes5(trades$price)[,4], na.pad=F)
  371.  
  372. # kernel densities
  373. min1Density &lt;- density(min1Diff, kernel=&quot;epanechnikov&quot;)
  374. min10Density &lt;- density(min10Diff, kernel=&quot;epanechnikov&quot;)
  375.  
  376. # corresponding normals
  377. min1Normal &lt;- fitdistr(coredata(min1Diff), &quot;normal&quot;)$estimate
  378. min10Normal &lt;- fitdistr(coredata(min10Diff), &quot;normal&quot;)$estimate
  379. </pre>
  380. <p>Which are plotted below for Oct 19, with solid red being 1-minute difference density and solid blue being 5-minute difference bars (ignore black for now); Gaussian fits for the same differences of each are dashed:</p>
  381. <p><a href="https://quantivity.files.wordpress.com/2012/10/goog-clock-20121019.png"><img loading="lazy" data-attachment-id="9805" data-permalink="https://quantivity.wordpress.com/2012/10/23/volume-clock-gaps-and-goog/goog-clock-20121019/" data-orig-file="https://quantivity.files.wordpress.com/2012/10/goog-clock-20121019.png" data-orig-size="726,725" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="goog-clock-20121019" data-image-description="" data-image-caption="" data-medium-file="https://quantivity.files.wordpress.com/2012/10/goog-clock-20121019.png?w=300" data-large-file="https://quantivity.files.wordpress.com/2012/10/goog-clock-20121019.png?w=600" src="https://quantivity.files.wordpress.com/2012/10/goog-clock-20121019.png?w=600&#038;h=599" alt="" title="goog-clock-20121019" width="600" height="599" class="aligncenter size-full wp-image-9805" srcset="https://quantivity.files.wordpress.com/2012/10/goog-clock-20121019.png?w=600&amp;h=599 600w, https://quantivity.files.wordpress.com/2012/10/goog-clock-20121019.png?w=150&amp;h=150 150w, https://quantivity.files.wordpress.com/2012/10/goog-clock-20121019.png?w=300&amp;h=300 300w, https://quantivity.files.wordpress.com/2012/10/goog-clock-20121019.png 726w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
  382. <p>This reproduces the familiar stylized distribution of high-frequency returns, consistent with Figure 1 from Clark (1971) and Exhibit 2 from Easley <em>et al.</em> (2012). Although certainly leptokurtic, the distributions are not too dissimilar from normal.</p>
  383. <p>Now, ignore chronological time and instead consider the trades from the perspective of a <em>clock based on volume of shares traded over the day</em>. In other words, generate a new process defined as the sequence of prices coinciding with shares traded on equal-sized partitions of total volume over the day. This process generates a &#8220;volume clock&#8221; for the trades, in doing so exemplifying a beautiful time-series transformation.</p>
  384. <p>A similar kernel density can be estimated from this trade volume clock, which is plotted above in black (with dashed corresponding normal fit), assuming partition size of 50. This exhibits distribution characteristics consistent with Exhibit 2 from Easley <em>et al.</em> (2012).</p>
  385. <p>With intuition on volume clock densities, we can finally take a look at Oct 18 through the lens of a computer via the following plot:</p>
  386. <p><a href="https://quantivity.files.wordpress.com/2012/10/goog-clock-20121018.png"><img loading="lazy" data-attachment-id="9807" data-permalink="https://quantivity.wordpress.com/2012/10/23/volume-clock-gaps-and-goog/goog-clock-20121018/" data-orig-file="https://quantivity.files.wordpress.com/2012/10/goog-clock-20121018.png" data-orig-size="725,705" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="goog-clock-20121018" data-image-description="" data-image-caption="" data-medium-file="https://quantivity.files.wordpress.com/2012/10/goog-clock-20121018.png?w=300" data-large-file="https://quantivity.files.wordpress.com/2012/10/goog-clock-20121018.png?w=600" src="https://quantivity.files.wordpress.com/2012/10/goog-clock-20121018.png?w=600&#038;h=583" alt="" title="goog-clock-20121018" width="600" height="583" class="aligncenter size-full wp-image-9807" srcset="https://quantivity.files.wordpress.com/2012/10/goog-clock-20121018.png?w=600&amp;h=583 600w, https://quantivity.files.wordpress.com/2012/10/goog-clock-20121018.png?w=150&amp;h=146 150w, https://quantivity.files.wordpress.com/2012/10/goog-clock-20121018.png?w=300&amp;h=292 300w, https://quantivity.files.wordpress.com/2012/10/goog-clock-20121018.png 725w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
  387. <p>Needless to say, this plot for Oct 18 looks nothing like the previous plot for Oct 19. The normal fits for both 5-min bars (blue) and volume clock (black) are especially interesting, as they have little resemblance to their corresponding kernel estimates. Care is required for trading on days that look like this.</p>
  388. <p>For those interested to learn more, see Clark (1971) for theory, including subordinated stochastic processes (originally due to Bochner (1960)). Ané and Geman (2000) apply a bit more sophistication, including arguing in favor of cumulative transaction count rather than cumulative traded volume. Perhaps worth a follow-up post to see if this still makes sense, given current era of predominantly algorithmic program trading.</p>
  389. <p>The R code to generate the above plots is:</p>
  390. <pre class="brush: r; title: ; notranslate">
  391. plot(trades20121018$price, main=&quot;GOOG Trades (2012-10-18)&quot;)
  392. plotTAQSummary(&quot;GOOG&quot;, &quot;2012-10-18&quot;, as.POSIXct(&quot;2012-10-18 09:30:00&quot;), as.POSIXct(&quot;2012-10-18 16:05:00&quot;))
  393. plotTAQSummary(&quot;GOOG&quot;, &quot;2012-10-18 | 12:00 - 13:00&quot;, as.POSIXct(&quot;2012-10-18 12:00:00&quot;), as.POSIXct(&quot;2012-10-18 13:00:00&quot;))
  394. plotTAQSummary(&quot;GOOG&quot;, &quot;2012-10-18 | 15:00 - 16:00&quot;, as.POSIXct(&quot;2012-10-18 15:25:00&quot;), as.POSIXct(&quot;2012-10-18 16:05:00&quot;))
  395. plotTimeChangeDensity(&quot;GOOG&quot;, as.Date(&quot;2012-10-19&quot;), trades20121019)
  396. plotTimeChangeDensity(&quot;GOOG&quot;, as.Date(&quot;2012-10-18&quot;), trades20121018)
  397. </pre>
  398. <p>And, a bit of literature on subordinated processes, volume clocks, and price processes:</p>
  399. <ul>
  400. <li>Bochner, <cite>Harmonic Analysis and the Theory of Probability</cite>, University of California Press, Berkeley, 1960.</li>
  401. <li>Mandelbrot, &#8220;The Variation of Certain Speculative Prices&#8221;, <cite>Journal of Business</cite>, Vol. 36 (1963), p. 394-419.</li>
  402. <li>Clark, &#8220;A Subordinated Stochastic Process Model with Finite Variance for Speculative Prices&#8221;. Center for Economic Research. University of Minnesota, 1971.</li>
  403. <li>Ané and Geman, &#8220;Order Flow, Transaction Clock, and Normality of Asset Returns&#8221;, <cite>Journal of Finance</cite>, Vol. 55, No. 5 (2000), pp. 2259-2284.</li>
  404. <li>Murphy and Izzeldin, &#8220;Order Flow, Transaction Clock, and Normality of Asset Returns: Ané and Geman (2000) Revisited&#8221;, 2006.</li>
  405. <li>Easley, de Prado, and O&#8217;Hara, &#8220;The Volume Clock: Insights into the High Frequency Paradigm&#8221;. <cite>Journal of Portfolio Management</cite>, May 2012.</li>
  406. </ul>
  407. ]]></content:encoded>
  408. <wfw:commentRss>https://quantivity.wordpress.com/2012/10/23/volume-clock-gaps-and-goog/feed/</wfw:commentRss>
  409. <slash:comments>11</slash:comments>
  410. <media:content url="https://1.gravatar.com/avatar/a9ee4f38c7bbbbf864d24e654111565e7559b8ab5d6740d90efc36077b8b6555?s=96&#38;d=identicon&#38;r=G" medium="image">
  411. <media:title type="html">quantivity</media:title>
  412. </media:content>
  413.  
  414. <media:content url="https://quantivity.files.wordpress.com/2012/10/goog-trades-20121018.png" medium="image">
  415. <media:title type="html">goog-trades-20121018</media:title>
  416. </media:content>
  417.  
  418. <media:content url="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018.png" medium="image">
  419. <media:title type="html">goog-taq-20121018</media:title>
  420. </media:content>
  421.  
  422. <media:content url="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-noon-one.png" medium="image">
  423. <media:title type="html">goog-taq-20121018-noon-one</media:title>
  424. </media:content>
  425.  
  426. <media:content url="https://quantivity.files.wordpress.com/2012/10/goog-taq-20121018-three-four.png" medium="image">
  427. <media:title type="html">goog-taq-20121018-three-four</media:title>
  428. </media:content>
  429.  
  430. <media:content url="https://quantivity.files.wordpress.com/2012/10/goog-clock-20121019.png" medium="image">
  431. <media:title type="html">goog-clock-20121019</media:title>
  432. </media:content>
  433.  
  434. <media:content url="https://quantivity.files.wordpress.com/2012/10/goog-clock-20121018.png" medium="image">
  435. <media:title type="html">goog-clock-20121018</media:title>
  436. </media:content>
  437. </item>
  438. <item>
  439. <title>Macro Matters and Orthodoxy</title>
  440. <link>https://quantivity.wordpress.com/2012/05/09/macro-matters-and-orthodoxy/</link>
  441. <comments>https://quantivity.wordpress.com/2012/05/09/macro-matters-and-orthodoxy/#comments</comments>
  442. <dc:creator><![CDATA[quantivity]]></dc:creator>
  443. <pubDate>Wed, 09 May 2012 20:52:29 +0000</pubDate>
  444. <category><![CDATA[Uncategorized]]></category>
  445. <guid isPermaLink="false">http://quantivity.wordpress.com/?p=9384</guid>
  446.  
  447. <description><![CDATA[Quantivity disliked undergrad macroecon, as it was largely a waste of time: fancy theory lacking compelling evidence, amplified by no consensus within the field à la saltwater versus freshwater. Few folks could be blamed for such flippancy, as it was mostly harmless throughout the great moderation. In fact, traders took apparent pride in their ignorance [&#8230;]]]></description>
  448. <content:encoded><![CDATA[<p>Quantivity disliked undergrad <a href="http://en.wikipedia.org/wiki/Macroeconomics">macroecon</a>, as it was largely a waste of time: fancy theory lacking compelling evidence, amplified by no consensus within the field à la <a href="http://en.wikipedia.org/wiki/Saltwater_and_freshwater_economics">saltwater versus freshwater</a>.</p>
  449. <p>Few folks could be blamed for such flippancy, as it was mostly harmless throughout the <a href="http://en.wikipedia.org/wiki/Great_Moderation">great moderation</a>. In fact, traders took apparent pride in their ignorance of macro&mdash;except the <a href="http://en.wikipedia.org/wiki/Global_macro">global macro</a> guys, obviously. Then, along came a credit crisis.</p>
  450. <p>With that swan, Quantivity concluded it was high time to formulate a <em>systematic</em> macro perspective: a &#8220;top down&#8221; complement to calibrate &#8220;bottom up&#8221; quant models. Quantivity brought great humility to this effort, due to both intrinsic complexity and comparatively weaker background in macro.</p>
  451. <p>This post kicks off a few thoughts derived from this effort; hopefully a welcome addition alongside micro analysis. Two caveats are worth noting. First, confirmation bias is particularly dangerous with macro, and thus emphasis is placed on broadly considering diverse viewpoints. Second, these thoughts are posted with a bit of trepidation, given intense desire to avoid politics and policymaking.</p>
  452. <p><span id="more-9384"></span></p>
  453. <p>Understanding macro is built from formulating intuition around two themes: </p>
  454. <ul>
  455. <li>Combining both <em>backward-</em> and <em>forward-looking</em> perspectives</li>
  456. <li>Contextualizing sovereign and institutional politics within those joint perspectives, in real-time</li>
  457. </ul>
  458. <p>Backward-looking perspective requires careful study of economic history&mdash;admittedly, not a topic many folks enjoy reading at bedtime. Much more empirically challenging is the statistical rarity of credit crises; only twice in the past century: globally 1927 &#8211; 1934 and in Japan 1989 &#8211; 2005.</p>
  459. <p>The following are excellent long form introductions (ignore Koo&#8217;s ridiculous title):</p>
  460. <ul>
  461. <li><a href="http://www.interdependence.org/wp-content/uploads/2012/03/Paul-McCulley-Fellows-Paper.pdf">Does Central Bank Independence Frustrate the Optimal Fiscal-Monetary Policy Mix in a Liquidity Trap?</a>, by McCulley and Pozsar (2012)</li>
  462. <li><a href="http://books.google.com/books?id=ui9Bj0u_khUC">Holy Grail of Macroeconomics</a>, by Koo (2011)</a>
  463. <li><a href="http://www.kansascityfed.org/publicat/sympos/2005/pdf/rajan2005.pdf">Has Financial Development Made the World Riskier?</a>, by <a href="http://www.chicagobooth.edu/faculty/bio.aspx?person_id=12825569280">Rajan</a> (2005)</li>
  464. </ul>
  465. <p>The first two eloquently summarize history and key dynamics of the current macroeconomic climate, including <em>credit crisis</em>, <em>balance sheet recession</em>, and <em>liquidity trap</em>. Rajan presents a shockingly prescient perspective on the impact and dangers caused by financial development, equally applicable today as in 2005.</p>
  466. <p>Arguably the most important collective insight is the <em>remarkably</em> important role which <em>economic orthodoxy</em> plays among market participants (including regulators). McCulley and Pozsar (p. 3) nicely summarize as:</p>
  467. <blockquote><p>Intellectual paralysis borne of inertia from dogma that, in the present circumstances, do not apply.</p></blockquote>
  468. <p>Neatly tucked into this definition are three fundamental scaffolds:</p>
  469. <ul>
  470. <li><strong>Dogma</strong>: understanding what is the prevailing <em>conventional</em> economic &#8220;wisdom&#8221; <em>among market participants</em>, in sufficient detail to trade on it; in other words, economic theory, market structure, regulation, secular demographic trends, sociopolitical context, <em>etc</em>.</li>
  471. <li><strong>Present circumstances</strong>: accessing and understanding <em>real-time</em> economic data and analysis, again in sufficient detail; in other words, market data and corresponding econometric analysis</li>
  472. <li><strong>Applicability</strong>: speculating when dogmatic wisdom is applicable to present circumstances, versus when it is not and thus resulting in intellectual inertia</li>
  473. </ul>
  474. <p>Although in a new guise, these three boil down to a familiar trading concept: contrarian versus trend following. When dogma is appropriate for present circumstances, then follow the trend; if not, then go contrarian. The challenge is having to make this call in <em>real-time</em> based on incomplete information, simultaneously understanding all three in sufficient confidence to risk capital.</p>
  475. <p>Towards this end, <a href="http://research.stlouisfed.org/fred2/">FRED</a> is a nice source for macro data. Given data, next is building intuition and understanding of dogmatic applicability via analysis and synthesis while seeking to minimize confirmation bias.</p>
  476. <p>The blogosphere is as good source for this as any (certainly better than nearly all sell side research), although much of it suffers from varying degrees of partisanship and politicking. A few exemplar blogs, from the roll, include:</p>
  477. <ul>
  478. <li><a href="http://www.econbrowser.com/">Econbrowser</a>, by <a href="http://weber.ucsd.edu/~jhamilto/">James Hamilton</a></li>
  479. <li><a href="http://www.interfluidity.com/">Interfluidity</a>, by Steve Waldman</li>
  480. <li><a href="http://macro-man.blogspot.com/">Macro Man</a></li>
  481. </ul>
  482. ]]></content:encoded>
  483. <wfw:commentRss>https://quantivity.wordpress.com/2012/05/09/macro-matters-and-orthodoxy/feed/</wfw:commentRss>
  484. <slash:comments>10</slash:comments>
  485. <media:content url="https://1.gravatar.com/avatar/a9ee4f38c7bbbbf864d24e654111565e7559b8ab5d6740d90efc36077b8b6555?s=96&#38;d=identicon&#38;r=G" medium="image">
  486. <media:title type="html">quantivity</media:title>
  487. </media:content>
  488. </item>
  489. <item>
  490. <title>Direction of Change Forecasting</title>
  491. <link>https://quantivity.wordpress.com/2012/01/16/sign-direction-of-change-forecasting/</link>
  492. <comments>https://quantivity.wordpress.com/2012/01/16/sign-direction-of-change-forecasting/#comments</comments>
  493. <dc:creator><![CDATA[quantivity]]></dc:creator>
  494. <pubDate>Tue, 17 Jan 2012 04:37:59 +0000</pubDate>
  495. <category><![CDATA[Uncategorized]]></category>
  496. <guid isPermaLink="false">http://quantivity.wordpress.com/?p=7655</guid>
  497.  
  498. <description><![CDATA[Index Return Decomposition prompted several readers to inquire about forecasting the signs of returns, as implied by the decomposition variable. This is an interesting topic worth review, quick survey of intuition from the literature, and some R code for exploratory analysis. This topic is known as direction-of-change forecasting in the literature. Needless to say, successful [&#8230;]]]></description>
  499. <content:encoded><![CDATA[<p><a href="https://quantivity.wordpress.com/2011/12/14/index-return-decomposition/">Index Return Decomposition</a> prompted several readers to inquire about <em>forecasting the signs of returns</em>, as implied by the <img src="https://s0.wp.com/latex.php?latex=s_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=s_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=s_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="s_t" class="latex" /> decomposition variable. This is an interesting topic worth review, quick survey of intuition from the literature, and some R code for exploratory analysis.</p>
  500. <p>This topic is known as <em>direction-of-change</em> forecasting in the literature. Needless to say, successful prediction of the sign for future returns is quite interesting from a trading perspective. Traditionally, only univariate return series were considered; <a href="http://www.nes.ru/~sanatoly/Papers/DepRatio.pdf">Anatolyev (2008)</a> is an exception, modeling two or more interrelated markets via dependence ratios. This literature tends to be a bit obtuse, due to commonly unstated stylistic assumptions regarding conditional return dynamics.</p>
  501. <p><span id="more-7655"></span></p>
  502. <p>The traditional formulation for this topic considers the estimation of the probabilities of returns exceeding an upper or lower threshold <img src="https://s0.wp.com/latex.php?latex=c&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=c&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=c&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="c" class="latex" />, optionally conditioned on an information set <img src="https://s0.wp.com/latex.php?latex=I&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=I&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=I&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="I" class="latex" /> from the previous time step:</p>
  503. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=U_t%28c%29+%3D+%5Ctext%7BPr%7D%28r_t+%3E+c+%7C+I_%7Bt-1%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=U_t%28c%29+%3D+%5Ctext%7BPr%7D%28r_t+%3E+c+%7C+I_%7Bt-1%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=U_t%28c%29+%3D+%5Ctext%7BPr%7D%28r_t+%3E+c+%7C+I_%7Bt-1%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="U_t(c) = &#92;text{Pr}(r_t &gt; c | I_{t-1}) " class="latex" /><br />
  504. &nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=D_t%28c%29+%3D+%5Ctext%7BPr%7D%28r_t+%3C+-c+%7C+I_%7Bt-1%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=D_t%28c%29+%3D+%5Ctext%7BPr%7D%28r_t+%3C+-c+%7C+I_%7Bt-1%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=D_t%28c%29+%3D+%5Ctext%7BPr%7D%28r_t+%3C+-c+%7C+I_%7Bt-1%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="D_t(c) = &#92;text{Pr}(r_t &lt; -c | I_{t-1}) " class="latex" /></p>
  505. <p>If <img src="https://s0.wp.com/latex.php?latex=c+%3D+0&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=c+%3D+0&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=c+%3D+0&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="c = 0" class="latex" />, the probabilities reduce to forecasting positive or negative returns; for trading, a natural choice for <img src="https://s0.wp.com/latex.php?latex=c&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=c&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=c&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="c" class="latex" /> is roundtrip transaction costs:</p>
  506. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=U_t%28c%29+%3D+%5Ctext%7BPr%7D%28r_t+%3E+0+%7C+I_%7Bt-1%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=U_t%28c%29+%3D+%5Ctext%7BPr%7D%28r_t+%3E+0+%7C+I_%7Bt-1%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=U_t%28c%29+%3D+%5Ctext%7BPr%7D%28r_t+%3E+0+%7C+I_%7Bt-1%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="U_t(c) = &#92;text{Pr}(r_t &gt; 0 | I_{t-1}) " class="latex" /><br />
  507. &nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=D_t%28c%29+%3D+%5Ctext%7BPr%7D%28r_t+%3C+0+%7C+I_%7Bt-1%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=D_t%28c%29+%3D+%5Ctext%7BPr%7D%28r_t+%3C+0+%7C+I_%7Bt-1%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=D_t%28c%29+%3D+%5Ctext%7BPr%7D%28r_t+%3C+0+%7C+I_%7Bt-1%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="D_t(c) = &#92;text{Pr}(r_t &lt; 0 | I_{t-1}) " class="latex" /></p>
  508. <p>Estimating these probabilities can be undertaken via several techniques. One approach is to use a logit model, based upon the logistic function:</p>
  509. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=U_t%28c%29+%3D+%5Cfrac%7B%5Cexp%28%5Cboldsymbol%7B%5Ctheta%7D_t%29%7D%7B1+%2B+%5Cexp%28%5Cboldsymbol%7B%5Ctheta%7D_t%29%7D+%3A+%5Cboldsymbol%7B%5Ctheta%7D_t+%3D+%5Chat%7B%5Cboldsymbol%7B%5Cbeta%7D%7D+%5Ctextbf%7BX%7D_t+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=U_t%28c%29+%3D+%5Cfrac%7B%5Cexp%28%5Cboldsymbol%7B%5Ctheta%7D_t%29%7D%7B1+%2B+%5Cexp%28%5Cboldsymbol%7B%5Ctheta%7D_t%29%7D+%3A+%5Cboldsymbol%7B%5Ctheta%7D_t+%3D+%5Chat%7B%5Cboldsymbol%7B%5Cbeta%7D%7D+%5Ctextbf%7BX%7D_t+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=U_t%28c%29+%3D+%5Cfrac%7B%5Cexp%28%5Cboldsymbol%7B%5Ctheta%7D_t%29%7D%7B1+%2B+%5Cexp%28%5Cboldsymbol%7B%5Ctheta%7D_t%29%7D+%3A+%5Cboldsymbol%7B%5Ctheta%7D_t+%3D+%5Chat%7B%5Cboldsymbol%7B%5Cbeta%7D%7D+%5Ctextbf%7BX%7D_t+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="U_t(c) = &#92;frac{&#92;exp(&#92;boldsymbol{&#92;theta}_t)}{1 + &#92;exp(&#92;boldsymbol{&#92;theta}_t)} : &#92;boldsymbol{&#92;theta}_t = &#92;hat{&#92;boldsymbol{&#92;beta}} &#92;textbf{X}_t " class="latex" /></p>
  510. <p>Where <img src="https://s0.wp.com/latex.php?latex=%5Ctextbf%7BX%7D_t+%5Cin+I_%7Bt-1%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Ctextbf%7BX%7D_t+%5Cin+I_%7Bt-1%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Ctextbf%7BX%7D_t+%5Cin+I_%7Bt-1%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;textbf{X}_t &#92;in I_{t-1}" class="latex" /> are explanatory variables from the previous time step. Challenge of this model is proper selection of explanatory variables.</p>
  511. <p>An alternative approach is to consider the following functional decomposition for univariate return series:</p>
  512. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=r_t+%3D+%5Cmu_t+%2B+%5Csigma_t+%5Cepsilon_t+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=r_t+%3D+%5Cmu_t+%2B+%5Csigma_t+%5Cepsilon_t+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=r_t+%3D+%5Cmu_t+%2B+%5Csigma_t+%5Cepsilon_t+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="r_t = &#92;mu_t + &#92;sigma_t &#92;epsilon_t " class="latex" /></p>
  513. <p>Where <img src="https://s0.wp.com/latex.php?latex=%5Cmu_t+%3D+%5Ctext%7BE%7D+%28Y_t+%7C+I_%7Bt-1%7D%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cmu_t+%3D+%5Ctext%7BE%7D+%28Y_t+%7C+I_%7Bt-1%7D%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cmu_t+%3D+%5Ctext%7BE%7D+%28Y_t+%7C+I_%7Bt-1%7D%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;mu_t = &#92;text{E} (Y_t | I_{t-1})" class="latex" /> is the conditional expected value, <img src="https://s0.wp.com/latex.php?latex=%5Csigma%5E2+%3D+%5Ctext%7BVar%7D%28Y_t+%7C+I_%7Bt-1%7D%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Csigma%5E2+%3D+%5Ctext%7BVar%7D%28Y_t+%7C+I_%7Bt-1%7D%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Csigma%5E2+%3D+%5Ctext%7BVar%7D%28Y_t+%7C+I_%7Bt-1%7D%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;sigma^2 = &#92;text{Var}(Y_t | I_{t-1})" class="latex" /> is the conditional variance, and <img src="https://s0.wp.com/latex.php?latex=%5Cepsilon_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cepsilon_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cepsilon_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;epsilon_t" class="latex" /> is a martingale with zero mean, unity variance, and conditional distribution function <img src="https://s0.wp.com/latex.php?latex=F_%7B%5Cepsilon%7D%28%5Ccdot+%7C+I_%7Bt-1%7D%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=F_%7B%5Cepsilon%7D%28%5Ccdot+%7C+I_%7Bt-1%7D%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=F_%7B%5Cepsilon%7D%28%5Ccdot+%7C+I_%7Bt-1%7D%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="F_{&#92;epsilon}(&#92;cdot | I_{t-1})" class="latex" />. From which the direction of change probabilities can be expressed:</p>
  514. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=U_t%28c%29+%3D+%5Ctext%7BPr%7D+%5Cleft%5B+%28%5Cmu_t+%2B+%5Csigma_t+%5Cepsilon_t%29+%3E+c+%5Cright%5D+%3D+%5Ctext%7BPr%7D+%5Cleft%5B+%5Cepsilon_t+%3E+%5Cleft%28+%5Cfrac%7Bc+-+%5Cmu_t%7D%7B%5Csigma_t%7D+%5Cright%29+%5Cright%5D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=U_t%28c%29+%3D+%5Ctext%7BPr%7D+%5Cleft%5B+%28%5Cmu_t+%2B+%5Csigma_t+%5Cepsilon_t%29+%3E+c+%5Cright%5D+%3D+%5Ctext%7BPr%7D+%5Cleft%5B+%5Cepsilon_t+%3E+%5Cleft%28+%5Cfrac%7Bc+-+%5Cmu_t%7D%7B%5Csigma_t%7D+%5Cright%29+%5Cright%5D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=U_t%28c%29+%3D+%5Ctext%7BPr%7D+%5Cleft%5B+%28%5Cmu_t+%2B+%5Csigma_t+%5Cepsilon_t%29+%3E+c+%5Cright%5D+%3D+%5Ctext%7BPr%7D+%5Cleft%5B+%5Cepsilon_t+%3E+%5Cleft%28+%5Cfrac%7Bc+-+%5Cmu_t%7D%7B%5Csigma_t%7D+%5Cright%29+%5Cright%5D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="U_t(c) = &#92;text{Pr} &#92;left[ (&#92;mu_t + &#92;sigma_t &#92;epsilon_t) &gt; c &#92;right] = &#92;text{Pr} &#92;left[ &#92;epsilon_t &gt; &#92;left( &#92;frac{c - &#92;mu_t}{&#92;sigma_t} &#92;right) &#92;right] " class="latex" /></p>
  515. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=D_t%28c%29+%3D+%5Ctext%7BPr%7D+%5Cleft%5B+%28%5Cmu_t+%2B+%5Csigma_t+%5Cepsilon_t%29+%3C+-c+%5Cright%5D+%3D+%5Ctext%7BPr%7D+%5Cleft%5B+%5Cepsilon_t+%3C+%5Cleft%28+%5Cfrac%7B-c+-+%5Cmu_t%7D%7B%5Csigma_t%7D+%5Cright%29+%5Cright%5D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=D_t%28c%29+%3D+%5Ctext%7BPr%7D+%5Cleft%5B+%28%5Cmu_t+%2B+%5Csigma_t+%5Cepsilon_t%29+%3C+-c+%5Cright%5D+%3D+%5Ctext%7BPr%7D+%5Cleft%5B+%5Cepsilon_t+%3C+%5Cleft%28+%5Cfrac%7B-c+-+%5Cmu_t%7D%7B%5Csigma_t%7D+%5Cright%29+%5Cright%5D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=D_t%28c%29+%3D+%5Ctext%7BPr%7D+%5Cleft%5B+%28%5Cmu_t+%2B+%5Csigma_t+%5Cepsilon_t%29+%3C+-c+%5Cright%5D+%3D+%5Ctext%7BPr%7D+%5Cleft%5B+%5Cepsilon_t+%3C+%5Cleft%28+%5Cfrac%7B-c+-+%5Cmu_t%7D%7B%5Csigma_t%7D+%5Cright%29+%5Cright%5D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="D_t(c) = &#92;text{Pr} &#92;left[ (&#92;mu_t + &#92;sigma_t &#92;epsilon_t) &lt; -c &#92;right] = &#92;text{Pr} &#92;left[ &#92;epsilon_t &lt; &#92;left( &#92;frac{-c - &#92;mu_t}{&#92;sigma_t} &#92;right) &#92;right] " class="latex" /></p>
  516. <p>With corresponding conditional expectations:</p>
  517. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=%5Ctext%7BE%7D+%5Cleft%5BU_t%28c%29+%7C+I_%7Bt-1%7D+%5Cright%5D+%3D+1+-+F_r%28c+%7C+I_%7Bt-1%7D%29+%3D+1+-+F_%7B%5Cepsilon%7D+%5Cleft%28+%5Cfrac%7Bc+-+%5Cmu_t%7D%7B%5Csigma_t%7D+%7C+I_%7Bt-1%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Ctext%7BE%7D+%5Cleft%5BU_t%28c%29+%7C+I_%7Bt-1%7D+%5Cright%5D+%3D+1+-+F_r%28c+%7C+I_%7Bt-1%7D%29+%3D+1+-+F_%7B%5Cepsilon%7D+%5Cleft%28+%5Cfrac%7Bc+-+%5Cmu_t%7D%7B%5Csigma_t%7D+%7C+I_%7Bt-1%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Ctext%7BE%7D+%5Cleft%5BU_t%28c%29+%7C+I_%7Bt-1%7D+%5Cright%5D+%3D+1+-+F_r%28c+%7C+I_%7Bt-1%7D%29+%3D+1+-+F_%7B%5Cepsilon%7D+%5Cleft%28+%5Cfrac%7Bc+-+%5Cmu_t%7D%7B%5Csigma_t%7D+%7C+I_%7Bt-1%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;text{E} &#92;left[U_t(c) | I_{t-1} &#92;right] = 1 - F_r(c | I_{t-1}) = 1 - F_{&#92;epsilon} &#92;left( &#92;frac{c - &#92;mu_t}{&#92;sigma_t} | I_{t-1} &#92;right) " class="latex" /><br />
  518. &nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=%5Ctext%7BE%7D+%5Cleft%5BD_t%28c%29+%7C+I_%7Bt-1%7D+%5Cright%5D+%3D+F_r%28c+%7C+I_%7Bt-1%7D%29+%3D+F_%7B%5Cepsilon%7D+%5Cleft%28+%5Cfrac%7B-c+-+%5Cmu_t%7D%7B%5Csigma_t%7D+%7C+I_%7Bt-1%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Ctext%7BE%7D+%5Cleft%5BD_t%28c%29+%7C+I_%7Bt-1%7D+%5Cright%5D+%3D+F_r%28c+%7C+I_%7Bt-1%7D%29+%3D+F_%7B%5Cepsilon%7D+%5Cleft%28+%5Cfrac%7B-c+-+%5Cmu_t%7D%7B%5Csigma_t%7D+%7C+I_%7Bt-1%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Ctext%7BE%7D+%5Cleft%5BD_t%28c%29+%7C+I_%7Bt-1%7D+%5Cright%5D+%3D+F_r%28c+%7C+I_%7Bt-1%7D%29+%3D+F_%7B%5Cepsilon%7D+%5Cleft%28+%5Cfrac%7B-c+-+%5Cmu_t%7D%7B%5Csigma_t%7D+%7C+I_%7Bt-1%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;text{E} &#92;left[D_t(c) | I_{t-1} &#92;right] = F_r(c | I_{t-1}) = F_{&#92;epsilon} &#92;left( &#92;frac{-c - &#92;mu_t}{&#92;sigma_t} | I_{t-1} &#92;right) " class="latex" /></p>
  519. <p>These expectations simplify to the following when <img src="https://s0.wp.com/latex.php?latex=c+%3D+0&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=c+%3D+0&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=c+%3D+0&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="c = 0" class="latex" />, assuming <img src="https://s0.wp.com/latex.php?latex=%5Cmu+%5Cne+0&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cmu+%5Cne+0&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cmu+%5Cne+0&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;mu &#92;ne 0" class="latex" /> (otherwise, expectation is constant and thus uninteresting):</p>
  520. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=%5Ctext%7BE%7D+%5Cleft%5BU_t%28c%29+%7C+I_%7Bt-1%7D+%5Cright%5D+%3D+1+-+F_%7B%5Cepsilon%7D+%5Cleft%28+%5Cfrac%7B-+%5Cmu_t%7D%7B%5Csigma_t%7D+%7C+I_%7Bt-1%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Ctext%7BE%7D+%5Cleft%5BU_t%28c%29+%7C+I_%7Bt-1%7D+%5Cright%5D+%3D+1+-+F_%7B%5Cepsilon%7D+%5Cleft%28+%5Cfrac%7B-+%5Cmu_t%7D%7B%5Csigma_t%7D+%7C+I_%7Bt-1%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Ctext%7BE%7D+%5Cleft%5BU_t%28c%29+%7C+I_%7Bt-1%7D+%5Cright%5D+%3D+1+-+F_%7B%5Cepsilon%7D+%5Cleft%28+%5Cfrac%7B-+%5Cmu_t%7D%7B%5Csigma_t%7D+%7C+I_%7Bt-1%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;text{E} &#92;left[U_t(c) | I_{t-1} &#92;right] = 1 - F_{&#92;epsilon} &#92;left( &#92;frac{- &#92;mu_t}{&#92;sigma_t} | I_{t-1} &#92;right) " class="latex" /><br />
  521. &nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=%5Ctext%7BE%7D+%5Cleft%5BD_t%28c%29+%7C+I_%7Bt-1%7D+%5Cright%5D+%3D+F_%7B%5Cepsilon%7D+%5Cleft%28+%5Cfrac%7B-+%5Cmu_t%7D%7B%5Csigma_t%7D+%7C+I_%7Bt-1%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Ctext%7BE%7D+%5Cleft%5BD_t%28c%29+%7C+I_%7Bt-1%7D+%5Cright%5D+%3D+F_%7B%5Cepsilon%7D+%5Cleft%28+%5Cfrac%7B-+%5Cmu_t%7D%7B%5Csigma_t%7D+%7C+I_%7Bt-1%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Ctext%7BE%7D+%5Cleft%5BD_t%28c%29+%7C+I_%7Bt-1%7D+%5Cright%5D+%3D+F_%7B%5Cepsilon%7D+%5Cleft%28+%5Cfrac%7B-+%5Cmu_t%7D%7B%5Csigma_t%7D+%7C+I_%7Bt-1%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;text{E} &#92;left[D_t(c) | I_{t-1} &#92;right] = F_{&#92;epsilon} &#92;left( &#92;frac{- &#92;mu_t}{&#92;sigma_t} | I_{t-1} &#92;right) " class="latex" /></p>
  522. <p>These expectations can be evaluated explicitly via calculating the empirical distribution function <img src="https://s0.wp.com/latex.php?latex=%5Chat%7BF%7D_%7B%5Cepsilon%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Chat%7BF%7D_%7B%5Cepsilon%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Chat%7BF%7D_%7B%5Cepsilon%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;hat{F}_{&#92;epsilon}" class="latex" /> (requiring assumption of a parametric distribution), where <img src="https://s0.wp.com/latex.php?latex=%5Cmathbb%7BI%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cmathbb%7BI%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cmathbb%7BI%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;mathbb{I}" class="latex" /> is the indicator function:</p>
  523. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=%5Chat%7BF%7D_%7B%5Cepsilon%7D+%5Cleft%28+%5Cfrac%7B-+%5Cmu_t%7D%7B%5Csigma_t%7D+%7C+I_%7Bt-1%7D+%5Cright%29+%3D+%5Cfrac%7B1%7D%7Bk%7D+%5Csum%5Climits_%7Bt%3D1%7D%5Ek+%5Cmathbb%7BI%7D+%5Cleft%28+%5Cfrac%7Br_t+-+%5Cmu_t%7D%7B%5Csigma_t%7D+%5Cle+%5Cfrac%7B-%5Cmu_k%7D%7B%5Csigma_k%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Chat%7BF%7D_%7B%5Cepsilon%7D+%5Cleft%28+%5Cfrac%7B-+%5Cmu_t%7D%7B%5Csigma_t%7D+%7C+I_%7Bt-1%7D+%5Cright%29+%3D+%5Cfrac%7B1%7D%7Bk%7D+%5Csum%5Climits_%7Bt%3D1%7D%5Ek+%5Cmathbb%7BI%7D+%5Cleft%28+%5Cfrac%7Br_t+-+%5Cmu_t%7D%7B%5Csigma_t%7D+%5Cle+%5Cfrac%7B-%5Cmu_k%7D%7B%5Csigma_k%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Chat%7BF%7D_%7B%5Cepsilon%7D+%5Cleft%28+%5Cfrac%7B-+%5Cmu_t%7D%7B%5Csigma_t%7D+%7C+I_%7Bt-1%7D+%5Cright%29+%3D+%5Cfrac%7B1%7D%7Bk%7D+%5Csum%5Climits_%7Bt%3D1%7D%5Ek+%5Cmathbb%7BI%7D+%5Cleft%28+%5Cfrac%7Br_t+-+%5Cmu_t%7D%7B%5Csigma_t%7D+%5Cle+%5Cfrac%7B-%5Cmu_k%7D%7B%5Csigma_k%7D+%5Cright%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;hat{F}_{&#92;epsilon} &#92;left( &#92;frac{- &#92;mu_t}{&#92;sigma_t} | I_{t-1} &#92;right) = &#92;frac{1}{k} &#92;sum&#92;limits_{t=1}^k &#92;mathbb{I} &#92;left( &#92;frac{r_t - &#92;mu_t}{&#92;sigma_t} &#92;le &#92;frac{-&#92;mu_k}{&#92;sigma_k} &#92;right) " class="latex" /></p>
  524. <p>Alternatively, this decomposition suggests one potential formulation for the logit parameters <img src="https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D_tt&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D_tt&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D_tt&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;boldsymbol{&#92;theta}_tt" class="latex" /> from the above model, where <img src="https://s0.wp.com/latex.php?latex=%5Chat%7B%5Cmu_t%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Chat%7B%5Cmu_t%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Chat%7B%5Cmu_t%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;hat{&#92;mu_t}" class="latex" /> is estimated by the logit and <img src="https://s0.wp.com/latex.php?latex=%5Csigma_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Csigma_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Csigma_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;sigma_t" class="latex" /> are historical observations:</p>
  525. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D_t+%3D+%5Cfrac%7B%5Chat%7B%5Cmu_t%7D%7D%7B%5Chat%7B%5Csigma_t%7D%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D_t+%3D+%5Cfrac%7B%5Chat%7B%5Cmu_t%7D%7D%7B%5Chat%7B%5Csigma_t%7D%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D_t+%3D+%5Cfrac%7B%5Chat%7B%5Cmu_t%7D%7D%7B%5Chat%7B%5Csigma_t%7D%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;boldsymbol{&#92;theta}_t = &#92;frac{&#92;hat{&#92;mu_t}}{&#92;hat{&#92;sigma_t}} " class="latex" /></p>
  526. <p>Of course, the non-trivial work is generating forecast estimates for next-step average conditional return <img src="https://s0.wp.com/latex.php?latex=%5Chat%7B%5Cmu_t%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Chat%7B%5Cmu_t%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Chat%7B%5Cmu_t%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;hat{&#92;mu_t}" class="latex" /> and conditional variance <img src="https://s0.wp.com/latex.php?latex=%5Chat%7B%5Csigma_t%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Chat%7B%5Csigma_t%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Chat%7B%5Csigma_t%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;hat{&#92;sigma_t}" class="latex" />.</p>
  527. <p>An alternative way to model the logit parameters <img src="https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;boldsymbol{&#92;theta}_t" class="latex" /> is to apply ARMA intuition with a binary autoregression (BARMA) due to <a href="papers.ssrn.com/sol3/papers.cfm?abstract_id=886092">Startz (2006)</a>, including lags for both autoregressive parameters and past indicator values, due to <a href="http://www.nes.ru/~sanatoly/Papers/DepRatio.pdf">Anatolyev (2008)</a>:</p>
  528. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D_t+%3D+w+%2B+%5Csum%5Climits_%7Bj%3D1%7D%5Ep+%5Calpha_j+%5Ctheta_%7Bt-j%7D+%2B+%5Csum%5Climits_%7Bj%3D1%7D%5Ep+%5Cbeta_j+I_%7Bt-j%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D_t+%3D+w+%2B+%5Csum%5Climits_%7Bj%3D1%7D%5Ep+%5Calpha_j+%5Ctheta_%7Bt-j%7D+%2B+%5Csum%5Climits_%7Bj%3D1%7D%5Ep+%5Cbeta_j+I_%7Bt-j%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D_t+%3D+w+%2B+%5Csum%5Climits_%7Bj%3D1%7D%5Ep+%5Calpha_j+%5Ctheta_%7Bt-j%7D+%2B+%5Csum%5Climits_%7Bj%3D1%7D%5Ep+%5Cbeta_j+I_%7Bt-j%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;boldsymbol{&#92;theta}_t = w + &#92;sum&#92;limits_{j=1}^p &#92;alpha_j &#92;theta_{t-j} + &#92;sum&#92;limits_{j=1}^p &#92;beta_j I_{t-j} " class="latex" /></p>
  529. <p>A survey of estimation techniques may be considered in a subsequent post, depending on reader interest.</p>
  530. <hr>
  531. <p>One exploratory analysis technique relevant to sign forecasting is visualizing up/down runs, signed difference (<em>i.e.</em> up-down), and corresponding averages for a return series.</p>
  532. <pre class="brush: r; title: ; notranslate">
  533. returnRuns &lt;- function(r, bound=0, doPlot=TRUE, startAvg=5, avgLen=-1)
  534. {
  535.  # Generate up/down runs and average runs for a return series, optionally
  536.  # plotting them.
  537.  #
  538.  # Args:
  539.  #   r: return series
  540.  #   bound: symmetric upper and lower bound, aka c
  541.  #   doPlot: flag indicating whether plots should be generated for runs
  542.  #   startAvg: Number of average runs which should be excluded for
  543.  #             eliminating unstable average with few leading observations
  544.  #   avgLen: number of periods over which to generate average; of -1 for
  545.  #           entire period
  546.  #
  547.  # Returns: none
  548.  
  549.  up &lt;- cumsum(ifelse(r &gt; bound, 1, 0))
  550.  down &lt;- cumsum(ifelse(r &lt; -bound, 1, 0))
  551.  
  552.  if (doPlot)
  553.  {
  554.    plot(up, main='Signed Runs: Up &amp; Down', ylim=range(up,down))
  555.    lines(down, col='red')
  556.    legend(&quot;topleft&quot;,legend=c(&quot;Up&quot;,&quot;Down&quot;), fill=colors, cex=0.5)
  557.    
  558.    plot(up-down, main=&quot;Signed Run Difference (up-down)&quot;)
  559.  }
  560.  
  561.  if (avgLen == -1)
  562.  {
  563.    avgUp &lt;- xts(sapply(c(1:length(up)), function(i) {
  564.      up[i]/i
  565.    }), order.by=index(up))
  566.    avgDown &lt;- xts(sapply(c(1:length(down)), function(i) {
  567.      down[i]/i
  568.    }), order.by=index(up))
  569.  } else
  570.  {
  571.    avgUp &lt;- xts(sapply(c(avgLen:length(up)), function(i) {
  572.      start &lt;- i - avgLen + 1
  573.      last(cumsum(ifelse(r[start:i] &gt; bound, 1, 0))) / avgLen
  574.    }), order.by=index(up[avgLen:length(up)]))
  575.    avgDown &lt;- xts(sapply(c(avgLen:length(down)), function(i) {
  576.      start &lt;- i - avgLen + 1
  577.      last(cumsum(ifelse(r[start:i] &lt; bound, 1, 0))) / avgLen
  578.    }), order.by=index(up[avgLen:length(up)]))
  579.  }
  580.  
  581.  if (doPlot)
  582.  {
  583.    n &lt;- length(avgUp)
  584.    plot(avgUp[startAvg:n], main=paste(&quot;Average Runs: Up &amp; Down (&quot;,avgLen,&quot; periods)&quot;,sep=&quot;&quot;), type='l', ylim=range(avgUp,avgDown))
  585.    lines(avgDown[startAvg:n], col='red')
  586.    legend(&quot;topleft&quot;,legend=c(&quot;Up&quot;,&quot;Down&quot;), fill=colors, cex=0.5)
  587.  }
  588.      
  589.  return (list(up=up, down=down, avgUp=avgUp, avgDown=avgDown))
  590. }
  591. </pre>
  592. <p>For example, the following plots illustrate CRM run dynamics from 2005 to present. First plot illustrates the running sums for both up and down returns, indicating negative returns are more prevalent:</p>
  593. <p><a href="https://quantivity.files.wordpress.com/2011/10/runs-signed.png"><img loading="lazy" data-attachment-id="9261" data-permalink="https://quantivity.wordpress.com/2012/01/16/sign-direction-of-change-forecasting/runs-signed/" data-orig-file="https://quantivity.files.wordpress.com/2011/10/runs-signed.png" data-orig-size="596,596" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="runs-signed" data-image-description="" data-image-caption="" data-medium-file="https://quantivity.files.wordpress.com/2011/10/runs-signed.png?w=300" data-large-file="https://quantivity.files.wordpress.com/2011/10/runs-signed.png?w=596" src="https://quantivity.files.wordpress.com/2011/10/runs-signed.png?w=600" alt="" title="runs-signed"   class="aligncenter size-full wp-image-9261" srcset="https://quantivity.files.wordpress.com/2011/10/runs-signed.png 596w, https://quantivity.files.wordpress.com/2011/10/runs-signed.png?w=150&amp;h=150 150w, https://quantivity.files.wordpress.com/2011/10/runs-signed.png?w=300&amp;h=300 300w" sizes="(max-width: 596px) 100vw, 596px" /></a></p>
  594. <p>Second plot illustrates the difference in signed sums, showing time-dynamics for the difference in up and down returns. Not surprising, this difference mirrors the CRM price curve closely:</p>
  595. <p><a href="https://quantivity.files.wordpress.com/2011/10/runs-diff.png"><img loading="lazy" data-attachment-id="9262" data-permalink="https://quantivity.wordpress.com/2012/01/16/sign-direction-of-change-forecasting/runs-diff/" data-orig-file="https://quantivity.files.wordpress.com/2011/10/runs-diff.png" data-orig-size="601,626" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="runs-diff" data-image-description="" data-image-caption="" data-medium-file="https://quantivity.files.wordpress.com/2011/10/runs-diff.png?w=288" data-large-file="https://quantivity.files.wordpress.com/2011/10/runs-diff.png?w=600" src="https://quantivity.files.wordpress.com/2011/10/runs-diff.png?w=600&#038;h=624" alt="" title="runs-diff" width="600" height="624" class="aligncenter size-full wp-image-9262" srcset="https://quantivity.files.wordpress.com/2011/10/runs-diff.png?w=600&amp;h=624 600w, https://quantivity.files.wordpress.com/2011/10/runs-diff.png?w=144&amp;h=150 144w, https://quantivity.files.wordpress.com/2011/10/runs-diff.png?w=288&amp;h=300 288w, https://quantivity.files.wordpress.com/2011/10/runs-diff.png 601w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
  596. <p>Third plot illustrates the average probabilities for both up and down, running incrementally over the entire timeframe:</p>
  597. <p><a href="https://quantivity.files.wordpress.com/2011/10/runs-avg.png"><img loading="lazy" data-attachment-id="9263" data-permalink="https://quantivity.wordpress.com/2012/01/16/sign-direction-of-change-forecasting/runs-avg/" data-orig-file="https://quantivity.files.wordpress.com/2011/10/runs-avg.png" data-orig-size="566,581" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="runs-avg" data-image-description="" data-image-caption="" data-medium-file="https://quantivity.files.wordpress.com/2011/10/runs-avg.png?w=292" data-large-file="https://quantivity.files.wordpress.com/2011/10/runs-avg.png?w=566" src="https://quantivity.files.wordpress.com/2011/10/runs-avg.png?w=600" alt="" title="runs-avg"   class="aligncenter size-full wp-image-9263" srcset="https://quantivity.files.wordpress.com/2011/10/runs-avg.png 566w, https://quantivity.files.wordpress.com/2011/10/runs-avg.png?w=146&amp;h=150 146w, https://quantivity.files.wordpress.com/2011/10/runs-avg.png?w=292&amp;h=300 292w" sizes="(max-width: 566px) 100vw, 566px" /></a></p>
  598. <hr>
  599. <p>The following are representative papers from the direction-of-change literature, ignoring the early papers focused on evaluating market efficiency (<em>e.g.</em> run tests):</p>
  600. <ul>
  601. <li><a href="http://www.neurogest.com/papers/forecasting_stock_indices.pdf">Forecasting Stock Indices: A Comparison of Classification and Level Estimation Models</a>, by Leunga, Daoukb, and Chenc (2000)</li>
  602. <li><a href="http://papers.ssrn.com/sol3/papers.cfm?abstract_id=306127">Financial, Asset Returns, Market Timing, and Volatility Dynamics</a>, by Christoffersen and Diebold (2002)</li>
  603. <li><a href="http://papers.ssrn.com/sol3/papers.cfm?abstract_id=908317">Direction-of-Change Forecasts Based on Conditional Variance, Skewness and Kurtosis Dynamics: International Evidence</a>, by Christoffersen <em>et al</em> (2004)</li>
  604. <li><a href="http://www.ims.nus.edu.sg/Programs/econometrics/files/ymh_paper.pdf">Are the Directions of Stock Price Changes Predictable? Statistical Theory and Evidence</a>, by Hong and Chung (2003)</li>
  605. <li><a href="http://papers.ssrn.com/sol3/papers.cfm?abstract_id=675623">Evaluating Direction-of-change Forecasting: Neurofuzzy Models vs. Neural Networks</a>, by Bekiros and Georgoutsos (2005)</li>
  606. <li><a href="http://www.cefir.ru/papers/WP95Anatolyev.pdf">Modeling Financial Return Dynamics via Decomposition</a>, by Anatolyev and Gospodinov (2007)</li>
  607. <li><a href="http://www.nes.ru/dataupload/files/programs/econ/preprints/2007/Deliya.pdf">Direction-of-change Forecasts and Trading Strategy Profitability at Intra-Day Horizons</a>, by Deliya (2007)</li>
  608. <li><a href="http://www.nes.ru/~sanatoly/Papers/DepRatio.pdf">Multi-Market Direction-of-Change Modeling Using Dependence Ratios</a>, by Anatolyev (2008)</li>
  609. <li><a href="http://ethesis.helsinki.fi/julkaisut/eri/hecer/disc/227/forecast.pdf">Forecasting the Direction of the U.S. Stock Market with Dynamic Binary Probit Models</a>, by Nyberg (2008)</li>
  610. <li><a href="http://www.iaeng.org/publication/WCE2008/WCE2008_pp1160-1165.pdf">Direction-of-Change Financial Time Series Forecasting using Bayesian Learning for MLPs</a>, by Skabar (2008)</li>
  611. <li><a href="http://www.springerlink.com/content/f53731054u1761w7/">A Kernel-Based Technique for Direction-of-Change Financial Time Series Forecasting</a>, by Skabar (2008)
  612. <li>
  613. <li><a href="http://econlab.uom.gr/econdep/images/stories/tpanag/Thomacos_seminar.pdf">Optimal Probabilistic and Directional Predictions of Financial Returns</a>, by Thomakos and Wang (2009)</li>
  614. <li><a href="http://www.cefir.ru/papers/WP136.pdf">Directional Prediction of Returns under Asymmetric Loss: Direct and Indirect Approaches</a>, by Anatolyev and Kryzhanovskaya (2009)</li>
  615. <li><a href="http://papers.ssrn.com/sol3/papers.cfm?abstract_id=1735352">Markets Change Every Day: Evidence from the Memory of Trade Direction</a>, Skouras and Axioglou (2011)</li>
  616. </ul>
  617. <p>Finally, Kinlay briefly surveyed this topic in two posts on <a href="http://jonathankinlay.com/index.php/category/volatility-sign-prediction-forecasting-engle/">volatility sign prediction</a>.</p>
  618. ]]></content:encoded>
  619. <wfw:commentRss>https://quantivity.wordpress.com/2012/01/16/sign-direction-of-change-forecasting/feed/</wfw:commentRss>
  620. <slash:comments>9</slash:comments>
  621. <media:content url="https://1.gravatar.com/avatar/a9ee4f38c7bbbbf864d24e654111565e7559b8ab5d6740d90efc36077b8b6555?s=96&#38;d=identicon&#38;r=G" medium="image">
  622. <media:title type="html">quantivity</media:title>
  623. </media:content>
  624.  
  625. <media:content url="https://quantivity.files.wordpress.com/2011/10/runs-signed.png" medium="image">
  626. <media:title type="html">runs-signed</media:title>
  627. </media:content>
  628.  
  629. <media:content url="https://quantivity.files.wordpress.com/2011/10/runs-diff.png" medium="image">
  630. <media:title type="html">runs-diff</media:title>
  631. </media:content>
  632.  
  633. <media:content url="https://quantivity.files.wordpress.com/2011/10/runs-avg.png" medium="image">
  634. <media:title type="html">runs-avg</media:title>
  635. </media:content>
  636. </item>
  637. <item>
  638. <title>Physics, Biology, or Peltzman?</title>
  639. <link>https://quantivity.wordpress.com/2012/01/03/physics-biology-peltzman-finance/</link>
  640. <comments>https://quantivity.wordpress.com/2012/01/03/physics-biology-peltzman-finance/#comments</comments>
  641. <dc:creator><![CDATA[quantivity]]></dc:creator>
  642. <pubDate>Tue, 03 Jan 2012 10:15:24 +0000</pubDate>
  643. <category><![CDATA[Uncategorized]]></category>
  644. <guid isPermaLink="false">http://quantivity.wordpress.com/?p=9021</guid>
  645.  
  646. <description><![CDATA[Quantivity is fortunate to be acquainted with numerous folks who have earned consistent returns over multiple decades without significant drawdown. Although they have varying trading strategies, there is a common theme which unifies them: top-down systematic focus on the sociology of market participants. This focus is not behavioral finance, in search of anomalies driven by [&#8230;]]]></description>
  647. <content:encoded><![CDATA[<p>Quantivity is fortunate to be acquainted with numerous folks who have earned consistent returns over multiple decades without significant drawdown. Although they have varying trading strategies, there is a common theme which unifies them: top-down systematic focus on the <em>sociology of market participants</em>.</p>
  648. <p>This focus is <em>not</em> behavioral finance, in search of anomalies driven by cognitive biases divergent from equilibrium (although majority do that too). Rather asking inferential sociological questions, such as: was the market &#8220;efficient&#8221;, in the <a href="http://en.wikipedia.org/wiki/Efficient-market_hypothesis">Fama</a> sense, during the post-war decades prior to 2000 <em>because people expected it to be</em> (blissfully ignoring a few <a href="http://en.wikipedia.org/wiki/Black_Monday_%281987%29">hiccups</a>); in contrast to how it is commonly understood and formalized, with reverse causality: market is assumed to be efficient, thus people understand it as such.</p>
  649. <p>Similarly, have the past 15 years been &#8220;inefficient&#8221;, in the bubble and anomaly sense, <em>because</em> cultural faith among investors in such &#8220;efficiency&#8221; was lost; or, did they lose faith because the market became inefficient? Big difference.</p>
  650. <p>In other words: <em>is finance governed by physics, biology, or Peltzman</em>?</p>
  651. <p><span id="more-9021"></span></p>
  652. <p>The traditional answer of <em>market hypothesis</em>, provided by financial economics via microeconomic principles of <a href="http://en.wikipedia.org/wiki/Market_equilibrium">equilibrium</a> and <a href="http://en.wikipedia.org/wiki/Economic_efficiency">efficiency</a>: causality flows from market to investor. This explanation comes in two variants, known by their colloquial analogical fields:</p>
  653. <ul>
  654. <li><strong>Physics</strong>: market is governed by <em>immutable mathematical principles</em> and can be formalized into coherent <em>predictive</em> models, either in favor or contradiction of excess returns; exemplified by classic weak/strong EMH theory</li>
  655. <li><strong>Biology</strong>: market is governed by evolutionary principles ala Darwin, as exemplified by <a href="http://web.mit.edu/alo/www/Papers/JPM2004.pdf">Lo&#8217;s 2004 AMH</a> article: &#8220;Very existence of active liquid financial markets implies that profit opportunities must be present. As they are exploited, they disappear. But new opportunities are also constantly being created as certain species die out, as others are born, and as institutions and business conditions change.&#8221; (p. 24)</li>
  656. </ul>
  657. <p>Yet, both these explanations suffer from implicitly begging the question: conjure &#8220;a market&#8221; with desired attributes and then derive conclusions. The physics perspective assumes immutability, conceivability, and mathematical expressiveness for its hypothesized market. While the biology perspective endows the hypothesized market with even more sophisticated Darwinian traits, presumably driven by underlying physical principles so inscrutable as to defy mathematical formalization. </p>
  658. <p>An alternative explanation is to apply the self-fulfilling <a href="http://en.wikipedia.org/wiki/Peltzman_effect">Peltzman effect</a> to financial markets, and reverse causality: <em>markets behave as they do because of investor sociology</em>, rather than arising emergent from implicit cooperation of equilibrium-seeking rational microeconomic agents.</p>
  659. <p>In other words: when investors <em>believe</em> the market is rational (irrespective of whether that belief is well-founded), then they embody <a href="http://en.wikipedia.org/wiki/Dunning%E2%80%93Kruger_effect">Dunning-Kruger</a> by <em>ex ante</em> faithfully dumping money into their 401K each month; in doing so collectively, the investment management industry undertakes its <a href="http://en.wikipedia.org/wiki/Rent-seeking">rent seeking</a> activity resulting in the market possessing <em>ex post</em> &#8220;efficient&#8221; characteristics. Conversely, when investors believe the market is irrational, they either: go to cash, pursue uninformed non-collective trading, or both. Both of which result in anomalous market behavior, uncontrollable by the industry, either due to decreased liquidity or absence of predictable momentum.</p>
  660. <p>If the market is indeed Peltzmanian, then the real question is how to best quantify and model <em>primary and spillover effects</em> resulting from investor sociology as they unfold ephemerally.</p>
  661. ]]></content:encoded>
  662. <wfw:commentRss>https://quantivity.wordpress.com/2012/01/03/physics-biology-peltzman-finance/feed/</wfw:commentRss>
  663. <slash:comments>1</slash:comments>
  664. <media:content url="https://1.gravatar.com/avatar/a9ee4f38c7bbbbf864d24e654111565e7559b8ab5d6740d90efc36077b8b6555?s=96&#38;d=identicon&#38;r=G" medium="image">
  665. <media:title type="html">quantivity</media:title>
  666. </media:content>
  667. </item>
  668. <item>
  669. <title>Return Decomposition via Mixing</title>
  670. <link>https://quantivity.wordpress.com/2011/12/28/estimating-mixture-index-return-decomposition-via-maximum-likelihood/</link>
  671. <comments>https://quantivity.wordpress.com/2011/12/28/estimating-mixture-index-return-decomposition-via-maximum-likelihood/#comments</comments>
  672. <dc:creator><![CDATA[quantivity]]></dc:creator>
  673. <pubDate>Thu, 29 Dec 2011 04:47:20 +0000</pubDate>
  674. <category><![CDATA[Uncategorized]]></category>
  675. <guid isPermaLink="false">http://quantivity.wordpress.com/?p=8887</guid>
  676.  
  677. <description><![CDATA[A variety of techniques exist for estimating parameters of the return decomposition model, previously introduced in Index Return Decomposition. This post considers estimation of an independent mixture model via maximum likelihood (MLE), a workhorse of frequentist statistics and always a nice place to begin. Recall is unobserved, and thus the model cannot be directly estimated [&#8230;]]]></description>
  678. <content:encoded><![CDATA[<p>A variety of techniques exist for estimating parameters of the return decomposition model, previously introduced in <a href="https://quantivity.wordpress.com/2011/12/14/index-return-decomposition/">Index Return Decomposition</a>. This post considers estimation of an <em>independent mixture model</em> via maximum likelihood (MLE), a workhorse of frequentist statistics and always a nice place to begin.</p>
  679. <p>Recall <img src="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="z" class="latex" /> is <em>unobserved</em>, and thus the model cannot be directly estimated via MLE. Thus, need to decide how to approach estimation for this latent variable. One way is to be naive, and simply assume <img src="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="z" class="latex" /> is the deterministic difference in return between stock and index (technically, this generates a <a href="http://en.wikipedia.org/wiki/Likelihood_function#Profile_likelihood">profile likelihood</a> as formalized by <a href="http://people.csail.mit.edu/~jrennie/trg/papers/severini-conditionally-92.pdf">Severini and Wong [1992]</a>, which <a href="http://www.jstor.org/pss/2669386">Murphy and Van Der Vaart [2000]</a> verify is well-behaved consistent with exact likelihood):</p>
  680. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=z_t+%3D+r_t+-+i_t+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=z_t+%3D+r_t+-+i_t+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=z_t+%3D+r_t+-+i_t+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="z_t = r_t - i_t " class="latex" /></p>
  681. <p>This assumption permits focus on estimating <img src="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha" class="latex" />, providing insight into the <em>mixing behavior</em> of the return being decomposed: if a stock return behaves like its index, then mixing is low with small <img src="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha" class="latex" /> (in the limit, <img src="https://s0.wp.com/latex.php?latex=%5Calpha+%3D+0&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha+%3D+0&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha+%3D+0&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha = 0" class="latex" /> when a stock behaves identical to its index, as no mixing is required); in contrast, the stock return behaves independent from its index on a regular basis, then mixing is high with a large <img src="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha" class="latex" />.</p>
  682. <p><span id="more-8887"></span></p>
  683. <p>Autocorrelation of <img src="https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="i" class="latex" /> and <img src="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="z" class="latex" /> is worth consideration, as that helps determine whether time indexing is required for <img src="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha" class="latex" />. For returns with insignificant autocorrelation (common for <em>signed</em> equity returns), the time index is dropped and a single <img src="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha" class="latex" /> is estimated. Yet, <em>conditional dependence</em> often exists between <img src="https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="i" class="latex" /> and <img src="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="z" class="latex" />, consistent with previous posts in the <a href="https://quantivity.wordpress.com/2011/10/02/proxy-cross-hedging/">Proxy / Cross Hedging</a> series  (illustrating r-z copula for CRM / QQQ example below):</p>
  684. <p><a href="https://quantivity.files.wordpress.com/2011/12/z-r-empirical-copula.png"><img loading="lazy" data-attachment-id="8914" data-permalink="https://quantivity.wordpress.com/2011/12/28/estimating-mixture-index-return-decomposition-via-maximum-likelihood/z-r-empirical-copula/" data-orig-file="https://quantivity.files.wordpress.com/2011/12/z-r-empirical-copula.png" data-orig-size="729,652" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="z-r-empirical-copula" data-image-description="" data-image-caption="" data-medium-file="https://quantivity.files.wordpress.com/2011/12/z-r-empirical-copula.png?w=300" data-large-file="https://quantivity.files.wordpress.com/2011/12/z-r-empirical-copula.png?w=600" src="https://quantivity.files.wordpress.com/2011/12/z-r-empirical-copula.png?w=600&#038;h=536" alt="" title="z-r-empirical-copula" width="600" height="536" class="aligncenter size-full wp-image-8914" srcset="https://quantivity.files.wordpress.com/2011/12/z-r-empirical-copula.png?w=600&amp;h=536 600w, https://quantivity.files.wordpress.com/2011/12/z-r-empirical-copula.png?w=150&amp;h=134 150w, https://quantivity.files.wordpress.com/2011/12/z-r-empirical-copula.png?w=300&amp;h=268 300w, https://quantivity.files.wordpress.com/2011/12/z-r-empirical-copula.png 729w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
  685. <p>Use of this identity for <img src="https://s0.wp.com/latex.php?latex=z_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=z_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=z_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="z_i" class="latex" /> transforms the decomposition model into:</p>
  686. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=r_t+%3D+s_t+%5Cleft%5B+%5Calpha_t+%7C+%28r_t+-+i_t%29+%7C+%2B+%281+-+%5Calpha_t%29+%5Cbeta+%7C+i_t+%7C+%5Cright%5D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=r_t+%3D+s_t+%5Cleft%5B+%5Calpha_t+%7C+%28r_t+-+i_t%29+%7C+%2B+%281+-+%5Calpha_t%29+%5Cbeta+%7C+i_t+%7C+%5Cright%5D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=r_t+%3D+s_t+%5Cleft%5B+%5Calpha_t+%7C+%28r_t+-+i_t%29+%7C+%2B+%281+-+%5Calpha_t%29+%5Cbeta+%7C+i_t+%7C+%5Cright%5D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="r_t = s_t &#92;left[ &#92;alpha_t | (r_t - i_t) | + (1 - &#92;alpha_t) &#92;beta | i_t | &#92;right] " class="latex" /></p>
  687. <p>The model is further simplified into a familiar <em>independent mixture model</em> by dropping sign <img src="https://s0.wp.com/latex.php?latex=s_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=s_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=s_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="s_t" class="latex" /> and <img src="https://s0.wp.com/latex.php?latex=%5Cbeta&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cbeta&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cbeta&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;beta" class="latex" />, and estimating via MLE using density <img src="https://s0.wp.com/latex.php?latex=f&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=f&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=f&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="f" class="latex" /> and return distribution functions <img src="https://s0.wp.com/latex.php?latex=%5Cphi_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cphi_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cphi_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;phi_i" class="latex" />:</p>
  688. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=f%28r_t%3B+%5Cboldsymbol%7B%5Ctheta%7D%29+%3D+%5Calpha+%5Cphi_1%28r_t+-+i_t%29+%2B+%281+-+%5Calpha%29+%5Cphi_2%28i_t%29++&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=f%28r_t%3B+%5Cboldsymbol%7B%5Ctheta%7D%29+%3D+%5Calpha+%5Cphi_1%28r_t+-+i_t%29+%2B+%281+-+%5Calpha%29+%5Cphi_2%28i_t%29++&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=f%28r_t%3B+%5Cboldsymbol%7B%5Ctheta%7D%29+%3D+%5Calpha+%5Cphi_1%28r_t+-+i_t%29+%2B+%281+-+%5Calpha%29+%5Cphi_2%28i_t%29++&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="f(r_t; &#92;boldsymbol{&#92;theta}) = &#92;alpha &#92;phi_1(r_t - i_t) + (1 - &#92;alpha) &#92;phi_2(i_t)  " class="latex" /></p>
  689. <p>MLE estimation requires assumption of parametric distributions for <img src="https://s0.wp.com/latex.php?latex=%5Cphi_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cphi_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cphi_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;phi_i" class="latex" />, of which common choices from the literature are normal, student-t, skew-t, or skew hyperbolic student-t (<a href="http://www.econ.ku.dk/fru/conference/Programme/Sunday/F4/Aas_226.pdf">Aas and Haff [2006]</a>). Next question is how to estimate the <img src="https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;boldsymbol{&#92;theta}" class="latex" /> parameters: <img src="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha" class="latex" /> and family of <img src="https://s0.wp.com/latex.php?latex=%5Cphi_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cphi_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cphi_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;phi_i" class="latex" /> parameters (<em>e.g.</em> <img src="https://s0.wp.com/latex.php?latex=%5Cmu_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cmu_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cmu_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;mu_i" class="latex" /> and <img src="https://s0.wp.com/latex.php?latex=%5Csigma_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Csigma_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Csigma_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;sigma_i" class="latex" /> if <img src="https://s0.wp.com/latex.php?latex=%5Cphi_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cphi_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cphi_i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;phi_i" class="latex" /> is assumed to be normal). As <img src="https://s0.wp.com/latex.php?latex=i_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=i_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=i_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="i_t" class="latex" /> is observed, one way to proceed is via two-step estimation:</p>
  690. <ol>
  691. <li>Estimate <img src="https://s0.wp.com/latex.php?latex=%5Cphi_2&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cphi_2&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cphi_2&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;phi_2" class="latex" /> parameters via MLE from <img src="https://s0.wp.com/latex.php?latex=i_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=i_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=i_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="i_t" class="latex" /></li>
  692. <li>Jointly estimate <img src="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha" class="latex" /> and <img src="https://s0.wp.com/latex.php?latex=%5Cphi_1&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cphi_1&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cphi_1&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;phi_1" class="latex" /> parameters via MLE on the mixture, holding <img src="https://s0.wp.com/latex.php?latex=%5Cphi_2&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cphi_2&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cphi_2&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;phi_2" class="latex" /> parameters constant</li>
  693. </ol>
  694. <p>For both, recall the likelihood <img src="https://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;mathcal{L} " class="latex" />, and log likelihood <img src="https://s0.wp.com/latex.php?latex=ln+%5Cmathcal%7BL%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=ln+%5Cmathcal%7BL%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=ln+%5Cmathcal%7BL%7D+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="ln &#92;mathcal{L} " class="latex" />, are defined as:</p>
  695. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D+%3D+%5Cprod%5Climits_%7Bt%3D1%7D%5ET+f%28r_t%3B+%5Cboldsymbol%7B%5Ctheta%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D+%3D+%5Cprod%5Climits_%7Bt%3D1%7D%5ET+f%28r_t%3B+%5Cboldsymbol%7B%5Ctheta%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cmathcal%7BL%7D+%3D+%5Cprod%5Climits_%7Bt%3D1%7D%5ET+f%28r_t%3B+%5Cboldsymbol%7B%5Ctheta%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;mathcal{L} = &#92;prod&#92;limits_{t=1}^T f(r_t; &#92;boldsymbol{&#92;theta}) " class="latex" /></p>
  696. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=%5Cln+%5Cmathcal%7BL%7D+%3D+%5Csum%5Climits_%7Bt%3D1%7D%5ET+%5Cln+f%28r_t%3B+%5Cboldsymbol%7B%5Ctheta%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cln+%5Cmathcal%7BL%7D+%3D+%5Csum%5Climits_%7Bt%3D1%7D%5ET+%5Cln+f%28r_t%3B+%5Cboldsymbol%7B%5Ctheta%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cln+%5Cmathcal%7BL%7D+%3D+%5Csum%5Climits_%7Bt%3D1%7D%5ET+%5Cln+f%28r_t%3B+%5Cboldsymbol%7B%5Ctheta%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;ln &#92;mathcal{L} = &#92;sum&#92;limits_{t=1}^T &#92;ln f(r_t; &#92;boldsymbol{&#92;theta}) " class="latex" /></p>
  697. <p>From which MLE of the mixture is maximization of the likelihood over <img src="https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cboldsymbol%7B%5Ctheta%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;boldsymbol{&#92;theta}" class="latex" />, where log is chosen for numeric stability:</p>
  698. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=%5Cdisplaystyle+%5Cmax_%7B%5Cboldsymbol%7B%5Ctheta%7D%7D+%5Cln+%5Cmathcal%7BL%7D+%3D+%5Cmax_%7B%5Cboldsymbol%7B%5Ctheta%7D%7D+%5Csum%5Climits_%7Bt%3D1%7D%5ET+%5Cleft%28+%5Cln+%5Cleft%5B+%5Calpha+%28r_t+-+i_t%29+%2B+%281+-+%5Calpha%29+i_t+%5Cright%5D+%5Cright%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cdisplaystyle+%5Cmax_%7B%5Cboldsymbol%7B%5Ctheta%7D%7D+%5Cln+%5Cmathcal%7BL%7D+%3D+%5Cmax_%7B%5Cboldsymbol%7B%5Ctheta%7D%7D+%5Csum%5Climits_%7Bt%3D1%7D%5ET+%5Cleft%28+%5Cln+%5Cleft%5B+%5Calpha+%28r_t+-+i_t%29+%2B+%281+-+%5Calpha%29+i_t+%5Cright%5D+%5Cright%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cdisplaystyle+%5Cmax_%7B%5Cboldsymbol%7B%5Ctheta%7D%7D+%5Cln+%5Cmathcal%7BL%7D+%3D+%5Cmax_%7B%5Cboldsymbol%7B%5Ctheta%7D%7D+%5Csum%5Climits_%7Bt%3D1%7D%5ET+%5Cleft%28+%5Cln+%5Cleft%5B+%5Calpha+%28r_t+-+i_t%29+%2B+%281+-+%5Calpha%29+i_t+%5Cright%5D+%5Cright%29&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;displaystyle &#92;max_{&#92;boldsymbol{&#92;theta}} &#92;ln &#92;mathcal{L} = &#92;max_{&#92;boldsymbol{&#92;theta}} &#92;sum&#92;limits_{t=1}^T &#92;left( &#92;ln &#92;left[ &#92;alpha (r_t - i_t) + (1 - &#92;alpha) i_t &#92;right] &#92;right)" class="latex" /></p>
  699. <p>This optimization can be performed numerically in R via minimization using <code>DEoptim</code> of the negative log likelihood <code>negLogLikeFun</code> (negative is due to minimization in <code>DEoptim</code> versus maximization of <img src="https://s0.wp.com/latex.php?latex=%5Cln+%5Cmathcal%7BL%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cln+%5Cmathcal%7BL%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cln+%5Cmathcal%7BL%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;ln &#92;mathcal{L}" class="latex" />). <code>DEoptim</code> is chosen due to rapid convergence on non-smooth global optimizations.</p>
  700. <p>For example, continuing the example of CRM / QQQ introduced in the previous posts on <a href="https://quantivity.wordpress.com/2011/10/02/proxy-cross-hedging/">Proxy / Cross Hedging</a> generates the results:</p>
  701. <pre class="brush: r; title: ; notranslate">
  702. &gt; symbols &lt;- c(&quot;CRM&quot;, &quot;QQQ&quot;)
  703. &gt; endDate &lt;- Sys.Date()
  704. &gt; startDate &lt;- endDate - as.difftime(52*5, unit=&quot;weeks&quot;)
  705. &gt; quoteType &lt;- &quot;Close&quot;
  706. &gt; p &lt;- do.call(cbind, lapply(symbols, get.hist.quote, start=startDate, end=endDate,  quote=quoteType))
  707. &gt; colnames(p) &lt;- symbols
  708. &gt; doReturnDecomp(p)
  709. normal mix likelihood: -3485.55 phi1 params: 0.0003471366 0.01673634 params 0.2546208 -0.001208877 0.0113988
  710. skew-t mix likelihood: -3566.512 phi1 params: 0.003844969 0.01079941 -0.3252923 2.893228 params 0.2357737 -0.004188977 0.01099266 0.4157174 26.5643
  711. skew-hyp-t likelihood: -3083.700 phi1 params: 0.01051675 0.1485529 -3.945452 10.10836 params 0.8295289 -0.0003636940 0.03071332 -0.5 5
  712. </pre>
  713. <p>These results correspond to the following density functions for the skew-t mixture:</p>
  714. <p><a href="https://quantivity.files.wordpress.com/2011/12/return-decomp-mixture-densities-skewt2.png"><img loading="lazy" data-attachment-id="8927" data-permalink="https://quantivity.wordpress.com/2011/12/28/estimating-mixture-index-return-decomposition-via-maximum-likelihood/return-decomp-mixture-densities-skewt/" data-orig-file="https://quantivity.files.wordpress.com/2011/12/return-decomp-mixture-densities-skewt2.png" data-orig-size="737,750" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="return-decomp-mixture-densities-skewt" data-image-description="" data-image-caption="" data-medium-file="https://quantivity.files.wordpress.com/2011/12/return-decomp-mixture-densities-skewt2.png?w=295" data-large-file="https://quantivity.files.wordpress.com/2011/12/return-decomp-mixture-densities-skewt2.png?w=600" src="https://quantivity.files.wordpress.com/2011/12/return-decomp-mixture-densities-skewt2.png?w=600&#038;h=610" alt="" title="return-decomp-mixture-densities-skewt" width="600" height="610" class="aligncenter size-full wp-image-8927" srcset="https://quantivity.files.wordpress.com/2011/12/return-decomp-mixture-densities-skewt2.png?w=600&amp;h=610 600w, https://quantivity.files.wordpress.com/2011/12/return-decomp-mixture-densities-skewt2.png?w=147&amp;h=150 147w, https://quantivity.files.wordpress.com/2011/12/return-decomp-mixture-densities-skewt2.png?w=295&amp;h=300 295w, https://quantivity.files.wordpress.com/2011/12/return-decomp-mixture-densities-skewt2.png 737w" sizes="(max-width: 600px) 100vw, 600px" /></a></p>
  715. <p>One interesting observation of these densities is their location parameters are on opposing side of zero: <img src="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="z" class="latex" /> has positive location, while <img src="https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="i" class="latex" /> has negative location. One interpretation of this is positive returns from CRM disproportionately originate from the idiosyncratic <img src="https://s0.wp.com/latex.php?latex=z_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=z_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=z_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="z_t" class="latex" />, while negative returns originate from the index <img src="https://s0.wp.com/latex.php?latex=i_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=i_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=i_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="i_t" class="latex" />. Economically, this is plausible: positive news is often idiosyncratic, while negative news is often market-wide.</p>
  716. <p>Several additional inferences can be drawn from these results:</p>
  717. <ul>
  718. <li>Model selection: likelihood suggests skew-t is the preferred model, indicating long tails and skewness (matching stylized facts)</li>
  719. <li>Mixing: <img src="https://s0.wp.com/latex.php?latex=%5Calpha+%3D+0.24&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha+%3D+0.24&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha+%3D+0.24&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha = 0.24" class="latex" /> indicating that over 75% of CRM returns are determined by the corresponding QQQ index; remaining 25% are determined by the unobserved <img src="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="z" class="latex" /> return series</li>
  720. <li>Tails: CRM <img src="https://s0.wp.com/latex.php?latex=%5Cphi_1&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cphi_1&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cphi_1&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;phi_1" class="latex" /> df = 2.89 which indicates significantly thicker tails than QQQ <img src="https://s0.wp.com/latex.php?latex=%5Cphi_2&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cphi_2&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cphi_2&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;phi_2" class="latex" /> df = 26.56 (matching stylized facts for individual stocks versus indices)</li>
  721. </ul>
  722. <p>Subsequent posts may consider alternative estimation techniques for this model.</p>
  723. <hr>
  724. <p>R code for generating two-stage MLE estimation of return decomposition via mixing:</p>
  725. <pre class="brush: r; title: ; notranslate">
  726. library(&quot;MASS&quot;)
  727. library(&quot;stats&quot;)
  728. library(&quot;DEoptim&quot;)
  729. library(&quot;sn&quot;)
  730. library(&quot;SkewHyperbolic&quot;)
  731.  
  732. normalMixtureIndexDecomp &lt;- function(r, i)
  733. {
  734.  # Two-step MLE estimation of return decomposition model, assuming both
  735.  # return distributions are normal.
  736.  #
  737.  # Args:
  738.  #   r: return series being decomposed
  739.  #   i: index series used for decomposition
  740.  #
  741.  # Return value: MLE parameter estimates
  742.  
  743.  z &lt;- r - i
  744.  id &lt;- fitdistr(i, &quot;normal&quot;)$estimate
  745.  negLogLikeFun &lt;- function(p) {
  746.    a &lt;- p[1]; mu1 &lt;- p[2]; s1 &lt;- p[3];
  747.    ll &lt;- (-sum(log(a * dnorm(z,mu1,s1) + (1 - a) * dnorm(i, id[1], id[2]))));
  748.    return (ll);
  749.  }
  750.  mle &lt;- DEoptim(negLogLikeFun, c(0, -0.5, 0), c(1, .5, .5), control=list(trace=FALSE))
  751.  
  752.  cat(&quot;normal mix likelihood:&quot;, last(mle$member$bestvalit), &quot;phi1 params:&quot;,id, &quot;params&quot;, last(mle$member$bestmemit),&quot;\n&quot;)
  753.  mle &lt;- last(mle$member$bestmemit)
  754.  
  755.  x &lt;- seq(-.25,.25,length.out=500)
  756.  dnorm1 &lt;- dnorm(x, id[1], id[2])
  757.  dnorm2 &lt;- dst(x, mle[2], mle[3])
  758.  plot(x, dnorm1, type='l', ylim=c(0, max(dnorm1,dnorm2)), ylab=&quot;Density&quot;, main=&quot;Normal Mixture&quot;)
  759.  lines(x, dnorm2, col='red')
  760.  abline(v=id[1], lty=2)
  761.  abline(v=mle[2], col='red', lty=2)
  762.  legend(&quot;topleft&quot;,legend=c(&quot;phi1&quot;, &quot;phi2&quot;), fill=colors, cex=0.5)
  763.    
  764.  return (mle)
  765. }
  766.  
  767. mixtureSkewTIndexDecomp &lt;- function(r, i)
  768. {
  769.  # Two-step MLE estimation of return decomposition model, assuming both
  770.  # return distributions are skew-t.
  771.  #
  772.  # Args:
  773.  #   r: return series being decomposed
  774.  #   i: index series used for decomposition
  775.  #
  776.  # Return value: MLE parameter estimates
  777.  
  778.  z &lt;- r - i
  779.  idp &lt;- st.mle(y=i)$dp
  780.  negLogLikeFun &lt;- function(p) {
  781.    a &lt;- p[1]; mu1 &lt;- p[2]; s1 &lt;- p[3]; s2 &lt;- p[4]; df1 &lt;- p[5]
  782.    ll &lt;- (-sum(log(a * dst(z,location=mu1,scale=s1,shape=s2,df=df1) + (1 - a) * dst(i, dp=idp))));
  783.    return (ll);
  784.  }
  785.  mle &lt;- DEoptim(negLogLikeFun, c(0, -0.5, 0, 0, 2), c(1, .5, .5, 5, 50), control=list(trace=FALSE))
  786.  
  787.  cat(&quot;skew-t mix likelihood:&quot;, last(mle$member$bestvalit), &quot;phi1 params:&quot;, idp, &quot;params&quot;, last(mle$member$bestmemit),&quot;\n&quot;)
  788.  mle &lt;- last(mle$member$bestmemit)
  789.  
  790.  
  791.  x &lt;- seq(-.25,.25,length.out=500)
  792.  dst1 &lt;- dst(x, dp=idp)
  793.  dst2 &lt;- dst(x, dp=mle[2:5])
  794.  plot(x, dst1, type='l', ylim=c(0, max(dst1,dst2)), ylab=&quot;Density&quot;, main=&quot;Skew T Mixture&quot;)
  795.  lines(x, dst2, col='red')
  796.  abline(v=idp[1], lty=2)
  797.  abline(v=mle[2], col='red', lty=2)
  798.  legend(&quot;topleft&quot;,legend=c(&quot;phi1&quot;, &quot;phi2&quot;), fill=colors, cex=0.5)
  799.  
  800.  return (mle)
  801. }
  802.  
  803. mixtureSkewHypTIndexDecomp &lt;- function(r, i)
  804. {
  805.  # Two-step MLE estimation of return decomposition model, assuming both
  806.  # return distributions are skew hyperbolic student-t.
  807.  #
  808.  # Args:
  809.  #   r: return series being decomposed
  810.  #   i: index series used for decomposition
  811.  #
  812.  # Return value: MLE parameter estimates
  813.  
  814.  z &lt;- r - i
  815.  iparam &lt;- skewhypFit(i,plots=FALSE,printOut=FALSE)$param
  816.  negLogLikeFun &lt;- function(p) {
  817.    a &lt;- p[1];
  818.    ll &lt;- (-sum(log(a * dskewhyp(z,param=p[2:5]) + (1 - a) * dskewhyp(i, param=iparam))));
  819.    return (ll);
  820.  }
  821.  mle &lt;- DEoptim(negLogLikeFun, c(0, -5, 0, -0.5, 0), c(1, 5, .5, -0.5, 5), control=list(trace=FALSE))
  822.  
  823.  cat(&quot;skew-hyp-t likelihood:&quot;, last(mle$member$bestvalit), &quot;phi1 params:&quot;,iparam,&quot;params&quot;, last(mle$member$bestmemit),&quot;\n&quot;)
  824.  mle &lt;- last(mle$member$bestmemit)
  825.  
  826.  
  827.  x &lt;- seq(-.25,.25,length.out=500)
  828.  dskewhyp1 &lt;- dskewhyp(x, param=iparam)
  829.  dskewhyp2 &lt;- dskewhyp(x, param=mle[2:5])
  830.  plot(x, dskewhyp1, type='l', ylim=c(0, max(dskewhyp1,dskewhyp2)), ylab=&quot;Density&quot;, main=&quot;Skew Hyperbolic Student-T&quot;)
  831.  lines(x, dskewhyp2, col='red')
  832.  abline(v=iparam[1], lty=2)
  833.  abline(v=mle[2], col='red', lty=2)
  834.  legend(&quot;topleft&quot;,legend=c(&quot;phi1&quot;, &quot;phi2&quot;), fill=colors, cex=0.5)
  835.  
  836.  return (mle)
  837. }
  838.  
  839. doReturnDecomp &lt;- function(p)
  840. {
  841.  # Decompose return of two series, using several parametric distributions.
  842.  #
  843.  # Args:
  844.  #   p: p[,1] is return being decomposed; p[,2] is index returns
  845.  #
  846.  # Return value: none
  847.  
  848.  r &lt;- ROC(p[,1], type=&quot;discrete&quot;, na.pad=FALSE)
  849.  i &lt;- ROC(p[,2], type=&quot;discrete&quot;, na.pad=FALSE)
  850.  
  851.  normalMixtureIndexDecomp(r, i)
  852.  mixtureSkewTIndexDecomp(r,i)
  853.  mixtureSkewHypTIndexDecomp(r,i)
  854. }
  855. </pre>
  856. ]]></content:encoded>
  857. <wfw:commentRss>https://quantivity.wordpress.com/2011/12/28/estimating-mixture-index-return-decomposition-via-maximum-likelihood/feed/</wfw:commentRss>
  858. <slash:comments>2</slash:comments>
  859. <media:content url="https://1.gravatar.com/avatar/a9ee4f38c7bbbbf864d24e654111565e7559b8ab5d6740d90efc36077b8b6555?s=96&#38;d=identicon&#38;r=G" medium="image">
  860. <media:title type="html">quantivity</media:title>
  861. </media:content>
  862.  
  863. <media:content url="https://quantivity.files.wordpress.com/2011/12/z-r-empirical-copula.png" medium="image">
  864. <media:title type="html">z-r-empirical-copula</media:title>
  865. </media:content>
  866.  
  867. <media:content url="https://quantivity.files.wordpress.com/2011/12/return-decomp-mixture-densities-skewt2.png" medium="image">
  868. <media:title type="html">return-decomp-mixture-densities-skewt</media:title>
  869. </media:content>
  870. </item>
  871. <item>
  872. <title>Risk Pragmatics</title>
  873. <link>https://quantivity.wordpress.com/2011/12/17/risk-pragmatics/</link>
  874. <comments>https://quantivity.wordpress.com/2011/12/17/risk-pragmatics/#comments</comments>
  875. <dc:creator><![CDATA[quantivity]]></dc:creator>
  876. <pubDate>Sun, 18 Dec 2011 06:30:42 +0000</pubDate>
  877. <category><![CDATA[Uncategorized]]></category>
  878. <guid isPermaLink="false">http://quantivity.wordpress.com/?p=8737</guid>
  879.  
  880. <description><![CDATA[Risk is deeply underappreciated. Moreover, it is misunderstood&#8212;even by many who have smelled it up close personally via big trading loses on hedged positions. Aaron Brown&#8217;s most recent text, Red-Blooded Risk, explains why. In doing so, it is simultaneously brilliant and flawed. For the former, Brown deserves credit; for the latter, the publisher presumably deserves [&#8230;]]]></description>
  881. <content:encoded><![CDATA[<p><a href="https://quantivity.files.wordpress.com/2011/12/redblood.png"><img loading="lazy" data-attachment-id="8738" data-permalink="https://quantivity.wordpress.com/2011/12/17/risk-pragmatics/redblood/" data-orig-file="https://quantivity.files.wordpress.com/2011/12/redblood.png" data-orig-size="348,530" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}" data-image-title="Red Blooded Risk" data-image-description="" data-image-caption="" data-medium-file="https://quantivity.files.wordpress.com/2011/12/redblood.png?w=197" data-large-file="https://quantivity.files.wordpress.com/2011/12/redblood.png?w=348" src="https://quantivity.files.wordpress.com/2011/12/redblood.png?w=196&#038;h=300" alt="" title="Red Blooded Risk" width="196" height="300" class="alignright size-medium wp-image-8738" srcset="https://quantivity.files.wordpress.com/2011/12/redblood.png?w=196 196w, https://quantivity.files.wordpress.com/2011/12/redblood.png?w=98 98w, https://quantivity.files.wordpress.com/2011/12/redblood.png 348w" sizes="(max-width: 196px) 100vw, 196px" /></a> Risk is <em>deeply</em> underappreciated.</p>
  882. <p>Moreover, it is misunderstood&mdash;even by many who have smelled it up close personally via big trading loses on hedged positions. Aaron Brown&#8217;s most recent text, <a href="http://books.google.com/books?id=X3sGahpmkQ0C"><cite>Red-Blooded Risk</cite></a>, explains why.</p>
  883. <p>In doing so, it is <em>simultaneously brilliant and flawed</em>. For the former, Brown deserves credit; for the latter, the publisher presumably deserves most of the blame.</p>
  884. <p><span id="more-8737"></span></p>
  885. <p>First, the brilliance; summarized in one word, with two intended meanings: <em>pragmatics</em>. Oh yeah, the book includes 漫画-style comic strips, helpfully provided as idiot self-detectors.</p>
  886. <p>First, well-known meaning is the philosophical tradition linking practice and theory. Arguably unique for risk books, Brown builds deep intuition around the concept of risk and its manifestation from structural to marked positions to historical roots in tulips. Brown has clearly lived and breathed risk management for many years (self-proclaimed from its modern origin in the 1980s), and that wisdom shines through via first-person prose combining insight, intuition, arrogance, pride, greed, humility, regret, condescension, and insecurity. Perhaps the first book ever to make VaR sound geek-sexy&mdash;<em>with nary a technical definition</em>.</p>
  887. <p>Second, lesser-known meaning is the subfield of linguistics which investigates ways in which context contributes to meaning. Unlike technical risk texts, Brown spends much of the book deep diving into context and letting meaning emanate from therein. As he states, &#8220;different aspects are easier to understand from different vantages&#8221; (p. 57). As a reader who never personally worked at a big bank, this is deeply informative for attuning mental models (akin to <a href="http://books.google.com/books?id=Rd9hDRR1Yx4C">Harris</a> for trading mechanics, <a href="http://books.google.com/books?id=HD9P6L2zX48C">Rebonato</a> for derivatives, and <a href="http://books.google.com/books?id=-5-OldaTjVQC">Taleb</a> for hedging). Explaining the lineage of quant hedge funds through the corresponding frequentist versus Bayesian disposition of their founders is fascinating, and indeed makes sense in retrospect. Slicing away the credibility mystique and exposing the raw underbelly of banks, down to explaining front, middle, and back office in depth. For readers familiar with disciplined metrics-driven tech companies, the apparent intellectual and technical sloppiness of big banks is simply jaw dropping.</p>
  888. <p>One excerpt simply must be quoted, beginning of Chapter 4, as it is perhaps the most accurate and beautiful summary of self-entitlement believed by geeks with <img src="https://s0.wp.com/latex.php?latex=4%5Csigma&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=4%5Csigma&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=4%5Csigma&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="4&#92;sigma" class="latex" />-IQ time immemorial:</p>
  889. <blockquote><p>The rocket scientists came together on Wall Street in the 1980s and began the process that eventually explained the modern concept of probability and reconstructed the global financial system. We were not individually ambitious. All we wanted was to make more money than any rational person could spend, without ever putting on a tie or being polite to anyone we didn&#8217;t like. We didn&#8217;t have any use for the money, except for maybe some books and cool computer equipment. We didn&#8217;t want to throw (or go to) fancy parties or buy political power&mdash;and we didn&#8217;t spend it on cars, jewelry, or places to live, and least of all on clothes. We&#8217;d probably give the money away, but until then, it would give us the power to say &#8220;f- you&#8221; to anyone, except that we were mostly pretty soft-spoken and civil in our expressions</p></blockquote>
  890. <p>Now, the flawed parts.</p>
  891. <p>One reviewer caveat worth advance mention is 9 books out of 10 read by Quantivity have content dense with math, code, or both. On the positive side, reading of Brown&#8217;s book indicates positive noteworthiness due to its statistical abnormality (given it has neither); on the negative side, any review is biased through such lens.</p>
  892. <p>First, <em>lots</em> of effort was expended by the publisher making this text appeal to a mass audience, clearly rushing to fill the void of perceived post-financial crisis publishing opportunity. From the ridiculous title (and cover) to the silly use of &#8220;secret history&#8221; meme to hilarious tongue-in-cheek back cover reviewer comments by Gatheral, Taleb, Wilmott, and Thorp. Parts of the book are prone to hyperbole, which read like they were edited in for sales effect. While these nuisances detract credibility, such can be ignored and arguably contributes the positive benefit of reducing its purchase price to mass market (<em>i.e.</em> under $25).</p>
  893. <p>Second, the book lacks unifying organization. While Brown provides the following disclaimer for such, the editor equally deserves some blame (p. 57):</p>
  894. <blockquote><p>If I had all the theory worked out, I could write a textbook organized in logical sequence. Instead, I&#8217;m going to intersperse theoretical discussions with accounts of the development of the ideas.</p></blockquote>
  895. <p>While this makes sense, it is admittedly a bit jarring to see that disclaimer juxtaposed alongside supposition of having &#8220;explained the modern concept of probability&#8221;. Thus, the reader is left wondering whether perhaps either of the following may be true: </p>
  896. <ul>
  897. <li>Brown has a theory of risk, but was refused in editing due to overabundance of equations</li>
  898. <li>Brown has a new theory of probability, but could not muster a theory of risk</li>
  899. </ul>
  900. <p>Either are intriguing, although perhaps the former seems more likely as Brown includes the following tongue-in-cheek disclaimer regarding use of a tiny bit of high school-level math included in Chapter 5 (p. 73):</p>
  901. <blockquote><p>Warning, this chapter contains a little math. It&#8217;s nothing intimidating, mostly multiplication and some simple algebra, but I know a lot of people don&#8217;t like it. If that describes you, I urge you to read the chapter anyway. It&#8217;s one of the most important in the book. You can skip the math and get the ideas anyway.</p></blockquote>
  902. <p>Having never met Brown and thus unfamiliar with his personality, cannot escape the sense that he is making gentle fun of readers which possess such bias. Either way, it&#8217;s amusing.</p>
  903. <p>While modest disorganization is a textual flaw, astute readers may perhaps perceive it as <em>subtle financial opportunity</em>: if such theory was sufficiently well-defined to warrant standard textbook treatment, then there would undoubtedly be much less juice possible from doing it really well.</p>
  904. <p>In either case, remedy for this shortcoming is to read the book in as few distinct sittings as possible. Having read it in two sittings, the wisdom was able to percolate together and expand personal mental models nicely. Well worth the read.</p>
  905. ]]></content:encoded>
  906. <wfw:commentRss>https://quantivity.wordpress.com/2011/12/17/risk-pragmatics/feed/</wfw:commentRss>
  907. <slash:comments>8</slash:comments>
  908. <media:content url="https://1.gravatar.com/avatar/a9ee4f38c7bbbbf864d24e654111565e7559b8ab5d6740d90efc36077b8b6555?s=96&#38;d=identicon&#38;r=G" medium="image">
  909. <media:title type="html">quantivity</media:title>
  910. </media:content>
  911.  
  912. <media:content url="https://quantivity.files.wordpress.com/2011/12/redblood.png?w=196" medium="image">
  913. <media:title type="html">Red Blooded Risk</media:title>
  914. </media:content>
  915. </item>
  916. <item>
  917. <title>Index Return Decomposition</title>
  918. <link>https://quantivity.wordpress.com/2011/12/14/index-return-decomposition/</link>
  919. <comments>https://quantivity.wordpress.com/2011/12/14/index-return-decomposition/#comments</comments>
  920. <dc:creator><![CDATA[quantivity]]></dc:creator>
  921. <pubDate>Wed, 14 Dec 2011 08:23:16 +0000</pubDate>
  922. <category><![CDATA[Uncategorized]]></category>
  923. <guid isPermaLink="false">http://quantivity.wordpress.com/?p=8678</guid>
  924.  
  925. <description><![CDATA[Unmasking a phenomenon into its constituent parts , via functional decomposition , is one of the great beauties of mathematics: &#160;&#160;&#160; This technique finds surprisingly often use in quant models. Ongoing analysis and trading based on proxy hedging, exemplified by series beginning with Proxy / Cross Hedging, suggests potential for an equity decomposition model based [&#8230;]]]></description>
  926. <content:encoded><![CDATA[<p>Unmasking a phenomenon <img src="https://s0.wp.com/latex.php?latex=f&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=f&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=f&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="f" class="latex" /> into its constituent parts <img src="https://s0.wp.com/latex.php?latex=%5Ctextbf%7Bg%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Ctextbf%7Bg%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Ctextbf%7Bg%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;textbf{g}" class="latex" />, via <em>functional decomposition</em> <img src="https://s0.wp.com/latex.php?latex=%5Cphi&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cphi&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cphi&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;phi" class="latex" />, is one of the great beauties of mathematics:</p>
  927. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=f%28%5Ctextbf%7Bx%7D%29+%3D+%5Cphi%28g_1%28%5Ctextbf%7Bx%7D%29%2C+g_2%28%5Ctextbf%7Bx%7D%29%2C+%5Cdots%2C+g_n%28%5Ctextbf%7Bx%7D%29%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=f%28%5Ctextbf%7Bx%7D%29+%3D+%5Cphi%28g_1%28%5Ctextbf%7Bx%7D%29%2C+g_2%28%5Ctextbf%7Bx%7D%29%2C+%5Cdots%2C+g_n%28%5Ctextbf%7Bx%7D%29%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=f%28%5Ctextbf%7Bx%7D%29+%3D+%5Cphi%28g_1%28%5Ctextbf%7Bx%7D%29%2C+g_2%28%5Ctextbf%7Bx%7D%29%2C+%5Cdots%2C+g_n%28%5Ctextbf%7Bx%7D%29%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="f(&#92;textbf{x}) = &#92;phi(g_1(&#92;textbf{x}), g_2(&#92;textbf{x}), &#92;dots, g_n(&#92;textbf{x})) " class="latex" /></p>
  928. <p>This technique finds surprisingly often use in quant models.</p>
  929. <p>Ongoing analysis and trading based on proxy hedging, exemplified by series beginning with <a href="https://quantivity.wordpress.com/2011/10/02/proxy-cross-hedging/">Proxy / Cross Hedging</a>, suggests potential for an equity decomposition model based on the relationship between returns of a stock <img src="https://s0.wp.com/latex.php?latex=r_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=r_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=r_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="r_t" class="latex" /> and its corresponding index <img src="https://s0.wp.com/latex.php?latex=i_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=i_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=i_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="i_t" class="latex" />:</p>
  930. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=r_t+%3D+s_t+%5Cleft%5B+%5Calpha_t+%7C+z_t+%7C+%2B+%281+-+%5Calpha_t%29+%5Cbeta+%7C+i_t+%7C+%5Cright%5D+%2B+%5Cepsilon_t+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=r_t+%3D+s_t+%5Cleft%5B+%5Calpha_t+%7C+z_t+%7C+%2B+%281+-+%5Calpha_t%29+%5Cbeta+%7C+i_t+%7C+%5Cright%5D+%2B+%5Cepsilon_t+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=r_t+%3D+s_t+%5Cleft%5B+%5Calpha_t+%7C+z_t+%7C+%2B+%281+-+%5Calpha_t%29+%5Cbeta+%7C+i_t+%7C+%5Cright%5D+%2B+%5Cepsilon_t+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="r_t = s_t &#92;left[ &#92;alpha_t | z_t | + (1 - &#92;alpha_t) &#92;beta | i_t | &#92;right] + &#92;epsilon_t " class="latex" /></p>
  931. <p>To explain this model, let&#8217;s build it up from intuition.</p>
  932. <p><span id="more-8678"></span></p>
  933. <p>To begin, consider a trading observation: interday returns of individual stocks have a subtle relationship with their corresponding index. On some days, return for a given stock follows its index; other days, returns of stock and index diverge strongly. This distinction in behavior is commonly attributed to stock-specific &#8220;news&#8221;, interpreted broadly&mdash;whether known publicly or only privately. </p>
  934. <p>This intuition can be formalized into two-state regime:</p>
  935. <ul>
  936. <li><strong>Uninformed regime</strong>: stock return <img src="https://s0.wp.com/latex.php?latex=r_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=r_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=r_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="r_t" class="latex" /> follows an index <img src="https://s0.wp.com/latex.php?latex=i_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=i_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=i_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="i_t" class="latex" />, scaled by a proportional factor <img src="https://s0.wp.com/latex.php?latex=%5Cbeta&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cbeta&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cbeta&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;beta" class="latex" /></li>
  937. <li><strong>Informed regime</strong>: stock return <img src="https://s0.wp.com/latex.php?latex=r_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=r_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=r_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="r_t" class="latex" /> follows an idiosyncratic path <img src="https://s0.wp.com/latex.php?latex=z_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=z_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=z_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="z_t" class="latex" />, conditionally independent of its index</li>
  938. </ul>
  939. <p>Relationship between regimes can be modeled in two ways via <img src="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha" class="latex" />. A switching model arises when regimes are binary: <img src="https://s0.wp.com/latex.php?latex=%5Calpha+%5Cin+%5C%7B+0%2C+1+%5C%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha+%5Cin+%5C%7B+0%2C+1+%5C%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha+%5Cin+%5C%7B+0%2C+1+%5C%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha &#92;in &#92;{ 0, 1 &#92;}" class="latex" />. An ensemble model arises when regimes are smooth: <img src="https://s0.wp.com/latex.php?latex=%5Calpha+%5Cin+%5B+0%2C+1+%5D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha+%5Cin+%5B+0%2C+1+%5D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha+%5Cin+%5B+0%2C+1+%5D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha &#92;in [ 0, 1 ]" class="latex" />. For the latter, <img src="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha" class="latex" /> can be understood as proportional decomposition weighting of the respective return series, and thus can provide smooth mixing between the regimes. Finally, sign of returns are explicitly decomposed as <img src="https://s0.wp.com/latex.php?latex=s_t+%5Cin+%5C%7B+-1%2C+1+%5C%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=s_t+%5Cin+%5C%7B+-1%2C+1+%5C%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=s_t+%5Cin+%5C%7B+-1%2C+1+%5C%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="s_t &#92;in &#92;{ -1, 1 &#92;}" class="latex" />, acknowledging greater regularity of absolute-valued return series.</p>
  940. <p>Worth noting is the following are <em>latent</em> variables: idiosyncratic path <img src="https://s0.wp.com/latex.php?latex=z_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=z_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=z_t&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="z_t" class="latex" /> from the informed regime, proportional factor <img src="https://s0.wp.com/latex.php?latex=%5Cbeta&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cbeta&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cbeta&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;beta" class="latex" />, and regime parameter <img src="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha" class="latex" />. Obviously, challenge of this model lies in their estimation. One potential trick is to exploit triangular relationships, as described below.</p>
  941. <p>One stylized fact <em>not</em> explicitly accommodated by this model is well-known <em>asymmetry of uninformed regimes</em>, arising from analysis of market breadth: stocks uniformly go down together (think big down days), but much less often uniformly go up together (majority of rallies). Unclear whether this fact naturally arises via <img src="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Calpha&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;alpha" class="latex" /> or needs to be explicitly modeled.</p>
  942. <p>Readers familiar with machine learning (ML) may recognize how to reformulate this as an <em>additive model</em>:</p>
  943. <p>&nbsp;&nbsp;&nbsp;<img src="https://s0.wp.com/latex.php?latex=r%28%5Ctextbf%7Bx%7D%29+%3D+%5Csum%5Climits_%7Bi%3D1%7D%5E2+w_i+f_i%28%5Ctextbf%7Bx%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=r%28%5Ctextbf%7Bx%7D%29+%3D+%5Csum%5Climits_%7Bi%3D1%7D%5E2+w_i+f_i%28%5Ctextbf%7Bx%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=r%28%5Ctextbf%7Bx%7D%29+%3D+%5Csum%5Climits_%7Bi%3D1%7D%5E2+w_i+f_i%28%5Ctextbf%7Bx%7D%29+&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="r(&#92;textbf{x}) = &#92;sum&#92;limits_{i=1}^2 w_i f_i(&#92;textbf{x}) " class="latex" /></p>
  944. <p>Where <img src="https://s0.wp.com/latex.php?latex=%5Ctextbf%7Bx%7D+%5Cequiv+%5C%7B+z%2C+i%2C+%5Calpha%2C+%5Cbeta+%5C%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Ctextbf%7Bx%7D+%5Cequiv+%5C%7B+z%2C+i%2C+%5Calpha%2C+%5Cbeta+%5C%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Ctextbf%7Bx%7D+%5Cequiv+%5C%7B+z%2C+i%2C+%5Calpha%2C+%5Cbeta+%5C%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;textbf{x} &#92;equiv &#92;{ z, i, &#92;alpha, &#92;beta &#92;}" class="latex" />.</p>
  945. <p>This model can be interpreted in numerous ML ways, depending on the desired objective. For example, <img src="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="z" class="latex" /> and <img src="https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="i" class="latex" /> can be interpreted as basis functions. Alternatively, boosting can be applied by interpreting them as weak classifiers. Graphical models can be applied by introducing conditional dependence between <img src="https://s0.wp.com/latex.php?latex=r&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=r&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=r&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="r" class="latex" />, <img src="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="z" class="latex" />, and <img src="https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="i" class="latex" />. Hierarchical models and decision trees naturally arise when <img src="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="z" class="latex" /> and <img src="https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=i&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="i" class="latex" /> are further functionally decomposed.</p>
  946. <p>Given this model, an interesting question is how to use it <em>predicatively</em>&mdash;whether directional or not. For example, combining models for two stocks which share a common index to introduce the notion of equity triangle arbitrage on the joint <img src="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=z&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="z" class="latex" />.</p>
  947. ]]></content:encoded>
  948. <wfw:commentRss>https://quantivity.wordpress.com/2011/12/14/index-return-decomposition/feed/</wfw:commentRss>
  949. <slash:comments>14</slash:comments>
  950. <media:content url="https://1.gravatar.com/avatar/a9ee4f38c7bbbbf864d24e654111565e7559b8ab5d6740d90efc36077b8b6555?s=96&#38;d=identicon&#38;r=G" medium="image">
  951. <media:title type="html">quantivity</media:title>
  952. </media:content>
  953. </item>
  954. <item>
  955. <title>Update: Curated Quant Research Feed</title>
  956. <link>https://quantivity.wordpress.com/2011/11/04/update-curated-quant-research-feed/</link>
  957. <comments>https://quantivity.wordpress.com/2011/11/04/update-curated-quant-research-feed/#comments</comments>
  958. <dc:creator><![CDATA[quantivity]]></dc:creator>
  959. <pubDate>Fri, 04 Nov 2011 13:47:09 +0000</pubDate>
  960. <category><![CDATA[Uncategorized]]></category>
  961. <guid isPermaLink="false">http://quantivity.wordpress.com/?p=8559</guid>
  962.  
  963. <description><![CDATA[Quantivity is pleasantly surprised to discover an increasing number of folks are deriving value from the Curated Quant Research Feed on @Quantivity. Indeed, the combo of daily curated feed with single-source retrospective search has become indispensable for personal research. Towards understanding why, Kedrosky provides nice explanation in his Curation is the New Search is the [&#8230;]]]></description>
  964. <content:encoded><![CDATA[<p>Quantivity is pleasantly surprised to discover an increasing number of folks are deriving value from the <a href="https://quantivity.wordpress.com/2011/07/28/curated-research-feed/">Curated Quant Research Feed</a> on <a href="http://twitter.com/quantivity">@Quantivity</a>. Indeed, the combo of daily curated feed with <em>single-source</em> retrospective search has become indispensable for personal research. Towards understanding why, Kedrosky provides nice explanation in his <a href="http://paul.kedrosky.com/archives/2011/01/curation_is_the.html">Curation is the New Search is the New Curation</a> post earlier this year:</p>
  965. <blockquote><p>Head back to curation and watch new algos emerge on top of that next-gen curation again. Think of Twitter as a new stab at curation. Curated sites will re-seed a new generation of algorithmic search sites. In short, curation is the new search.</p></blockquote>
  966. <p>Indeed, intent of curation here is to maintain <em>high signal-to-noise ratio</em> for a mix of preprint and classics in a <em>highly-specialized</em> literature (<em>i.e.</em> combo of retail <img src="https://s0.wp.com/latex.php?latex=%5Cmathbb%7BP%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cmathbb%7BP%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cmathbb%7BP%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;mathbb{P}" class="latex" /> and prop <img src="https://s0.wp.com/latex.php?latex=%5Cmathbb%7BQ%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002" srcset="https://s0.wp.com/latex.php?latex=%5Cmathbb%7BQ%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002 1x, https://s0.wp.com/latex.php?latex=%5Cmathbb%7BQ%7D&#038;bg=ffffff&#038;fg=333333&#038;s=0&#038;c=20201002&#038;zoom=4.5 4x" alt="&#92;mathbb{Q}" class="latex" />) for which strong motivation exists elsewhere to obfuscate; and search over the stream provides ability to both rewind time and to integrate <em>conceptual connectivity</em> spanning time.</p>
  967. <p><span id="more-8559"></span></p>
  968. <p>One addition being contemplated is keyword search over all literature cited in feed, providing <em>deep content search</em> over the feed. Although, unclear yet what is the best technical avenue to implement this (please comment, if you have suggestions).</p>
  969. <p>So, with this positive start, curation input set is being modestly expanded to coincide with increased personal research activity and availability of several new quant sources&mdash;<em>while maintaining the same focus and high signal-to-noise goal</em>. Specifically, curation is expanding to include the following SSRN working papers: <a href="http://papers.ssrn.com/sol3/JELJOUR_Results.cfm?form_name=journalbrowse&amp;journal_id=1681611">ARPM Series</a> and <a href="http://www.aeaweb.org/jel/jel_class_system.php">JEL Codes</a> G11 (Portfolio Choice), G12 (Asset Pricing), G13 (Contingent Pricing; Futures Pricing), G14 (Information and Market Efficiency), C21 (Cross-Sectional Models), C22 (Time-Series Models), C51 (Model Construction and Estimation), and C53 (Forecasting and Other Model Applications). Selection of JEL codes is data-driven: feed links were ranked by JEL classification and most cited classifications were chosen.</p>
  970. <p>Authors are encouraged to ensure correct use of JEL codes, to ensure your articles are picked up.</p>
  971. <p>Curious what readers think? Are there other high-value sources worth adding to curation input set? What else could make this more useful?</p>
  972. ]]></content:encoded>
  973. <wfw:commentRss>https://quantivity.wordpress.com/2011/11/04/update-curated-quant-research-feed/feed/</wfw:commentRss>
  974. <slash:comments>9</slash:comments>
  975. <media:content url="https://1.gravatar.com/avatar/a9ee4f38c7bbbbf864d24e654111565e7559b8ab5d6740d90efc36077b8b6555?s=96&#38;d=identicon&#38;r=G" medium="image">
  976. <media:title type="html">quantivity</media:title>
  977. </media:content>
  978. </item>
  979. </channel>
  980. </rss>
  981.  

If you would like to create a banner that links to this page (i.e. this validation result), do the following:

  1. Download the "valid RSS" banner.

  2. Upload the image to your own server. (This step is important. Please do not link directly to the image on this server.)

  3. Add this HTML to your page (change the image src attribute if necessary):

If you would like to create a text link instead, here is the URL you can use:

http://www.feedvalidator.org/check.cgi?url=https%3A//quantivity.wordpress.com/feed/

Copyright © 2002-9 Sam Ruby, Mark Pilgrim, Joseph Walton, and Phil Ringnalda