{"id":124294,"date":"2022-02-16T11:36:55","date_gmt":"2022-02-16T16:36:55","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=124294"},"modified":"2022-11-21T09:51:49","modified_gmt":"2022-11-21T14:51:49","slug":"trend-following-filters-part-5","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/trend-following-filters-part-5\/","title":{"rendered":"Trend-Following Filters \u2013 Part 5"},"content":{"rendered":"\n<p><em>The article &#8220;Trend-Following Filters \u2013 Part 5&#8221; first appeared on <a href=\"https:\/\/alphaarchitect.com\/2022\/02\/15\/trend-following-filters-part-5\/\">Alpha Architect Blog<\/a>.  <\/em><\/p>\n\n\n\n<p><strong><em>Excerpt<\/em><\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-1-introduction\">1. Introduction<\/h2>\n\n\n\n<p>Previous articles in this series examine, from a digital signal processing (DSP) frequency domain perspective, various types of digital filters used by quantitative analysts and market technicians to analyze and transform financial time series for&nbsp;<a href=\"https:\/\/alphaarchitect.com\/2015\/08\/13\/avoiding-the-big-drawdown-with-trend-following-investment-strategies\/\">trend-following<\/a>&nbsp;purposes.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><a href=\"https:\/\/alphaarchitect.com\/2020\/08\/13\/an-introduction-to-digital-signal-processing-for-trend-following\/\" target=\"_blank\" rel=\"noreferrer noopener\">An Introduction to Digital Signal Processing for Trend Following<\/a><\/li><li><a href=\"https:\/\/alphaarchitect.com\/2020\/12\/29\/trend-following-filters-part-1-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">Trend-Following Filters \u2013 Part 1<\/a><\/li><li><a href=\"https:\/\/alphaarchitect.com\/2021\/01\/21\/trend-following-filters-part-2-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">Trend-Following Filters \u2013 Part 2<\/a><\/li><li><a href=\"https:\/\/alphaarchitect.com\/2021\/04\/08\/trend-following-filters-part-3\/\" target=\"_blank\" rel=\"noreferrer noopener\">Trend-Following Filters \u2013 Part 3<\/a><\/li><li><a href=\"https:\/\/alphaarchitect.com\/2022\/01\/11\/trend-following-filters-part-4\/\" target=\"_blank\" rel=\"noreferrer noopener\">Trend-Following Filters \u2013 Part 4<\/a><\/li><\/ol>\n\n\n\n<p><a href=\"https:\/\/alphaarchitect.com\/2022\/01\/11\/trend-following-filters-part-4\/\">Part 4<\/a>\u00a0of this series, along with this article, examines the application of the Kalman filter to financial time series. The Kalman filter is a statistics-based algorithm used to perform estimation of random processes<a><sup>(1)<\/sup><\/a>. Estimation of processes in noisy environments is a critical task in many fields, such as communications, process control, track-while-scan radar systems, robotics, and aeronautical, missile, and space vehicle guidance. The Kalman filter is a real-time algorithm that operates iteratively in the discrete-time domain and is used in a variety of complex random process estimation applications.<\/p>\n\n\n\n<p>There are two general types of Kalman filter models: steady-state and adaptive. A steady-state filter assumes that the statistics of the process under consideration are constant over time, resulting in fixed, time-invariant filter gains. The gains of an adaptive filter, on the other hand, are able to adjust to processes that have time-varying dynamics, such as financial time series which typically display volatility and non-stationarity.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"2-two-state-noise-adaptive-kalman-filter\">2.&nbsp;<strong>Two State Noise-Adaptive Kalman Filter<\/strong><\/h2>\n\n\n\n<p>This article assumes familiarity with Part 4, which includes an overview of the Kalman filter and describes an adaptive covariance matching method originally proposed by Myers and Tapley&nbsp;<a><sup>(2)<\/sup><\/a>&nbsp;and re-stated with some modification by Stengel&nbsp;<a><sup>(3)<\/sup><\/a>. The Stengel version is employed in both articles. The method estimates the process and measurement noise covariances directly from the Kalman filter algorithm, replacing, for example, the need for assumed or externally-derived noise covariance estimates.<\/p>\n\n\n\n<p>To more easily illustrate adaptive filter concepts and calculations, the Kalman filter algorithm described in Part 4 has one state variable, x(t), modeled on a first-order process that has a locally constant mean value&nbsp;<em><\/em><em>a<\/em>&nbsp;contaminated by additive random noise \u03b5(t)<sup>~<\/sup>N(0, \u03c3<sub>\u03b5<\/sub><sup>2<\/sup>):<\/p>\n\n\n\n<p>y(t) =&nbsp;<em>a<\/em>&nbsp;+ \u03b5(t)<\/p>\n\n\n\n<p>The filter described in this article has two state variables, x<sub>1<\/sub>(t) and x<sub>2<\/sub>(t), modeled on a second-order process that has mean value&nbsp;<em>a<\/em>&nbsp;and locally constant linear trend&nbsp;<em>b<\/em>&nbsp;contaminated by additive random noise:<\/p>\n\n\n\n<p>y(t) =&nbsp;<em>a<\/em>&nbsp;+&nbsp;<em>b<\/em>*t + \u03b5(t)<\/p>\n\n\n\n<p>More specifically, the process models in both articles are based on the assumption that financial asset prices follow the general Newtonian equation of motion&nbsp;<a><sup>(4)<\/sup><\/a>:<\/p>\n\n\n\n<figure class=\"wp-block-image img-twothird\"><img decoding=\"async\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2022\/02\/alpha-architect-filter-5.png\" alt=\"\" class=\"wp-image-124302 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\"><\/figure>\n\n\n\n<p>where p is the position (analogous to a financial asset price), v is the velocity (analogous to what is commonly called \u201cmomentum\u201d by quantitative analysts and market technicians), a is the acceleration (change in velocity), j is the jerk (change in acceleration), etc. State variable x<sub>1<\/sub>(t) is equivalent to the second-order process mean value&nbsp;<em><\/em><em><\/em><em>a<\/em>&nbsp;as well as to Newtonian position p. State variable x<sub>2<\/sub>(t) is equivalent to second-order process linear trend&nbsp;<em>b<\/em>&nbsp;as well as to Newtonian velocity v (i.e., it is assumed that acceleration a = 0, jerk j = 0, etc.).<\/p>\n\n\n\n<p>The two-state noise-adaptive Kalman filter process and measurement model equations, variable initialization, algorithm steps, and noise estimate calculations are shown in Appendix 1 where:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>the number of state variables n = 2,<\/li><li>the two state variables are position x<sub>1<\/sub>(t) and velocity x<sub>2<\/sub>(t),<\/li><li>the number of measurements m = 1 since only position (i.e., price) measurements z(t) are assumed to be available,<\/li><li>the time step is 1 trading day,<\/li><li>since the Newtonian motion equations that include only position p and velocity v are p(t) = p(t-1) + v*\u0394t and v(t) = v(t-1), respectively, the state transition matrix is:<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image img-twothird\"><img decoding=\"async\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2022\/02\/alpha-architect-filter-5-2.png\" alt=\"\" class=\"wp-image-124304 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\"><\/figure>\n\n\n\n<p class=\"has-text-align-center\"><em>where \u0394t = 1-time step<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>the process noise inputs g<sub>1<\/sub>&nbsp;= \u00bd and g<sub>2<\/sub>&nbsp;= 1, based on the process model assumption that the velocity is locally constant and subject to random acceleration noise&nbsp;<a><sup>(5)<\/sup><\/a>,<\/li><li>the state measurement input vector H = (1 0) since only position is measured,<\/li><li>the filter gains k<sub>1<\/sub>(t) and k<sub>2<\/sub>(t) range between 0 and 1, and<\/li><li>the number of process and measurement noise samples N in the sliding time window is 10 trading days.<\/li><\/ul>\n\n\n\n<p>The noise-adaptive method estimates the measurement and process noise covariances simultaneously with the state estimates. Since only measurements z(t) of position are available, the noise-adaptive method uses a set of measurement noise samples r(t), also called \u201cresiduals\u201d, where:<\/p>\n\n\n\n<p>r(t) = z(t) \u2013 x<sub>1<\/sub><sup>\u2013<\/sup>(t)<\/p>\n\n\n\n<p>made over a sliding time window of length N time steps (N &gt; 1) to estimate the measurement noise mean r\u2019(t) and variance R(t). That is, the most recent set of N noise samples made over time steps t-N+1 to t is used in the calculations at each time step t. It uses sets of approximate position and velocity process noise samples q<sub>1<\/sub>(t) and q<sub>2<\/sub>(t), respectively, where:<\/p>\n\n\n\n<p>q<sub>1<\/sub>(t) = [x<sub>1<\/sub><sup>+<\/sup>(t) \u2013 (x<sub>1<\/sub><sup>+<\/sup>(t-1) + x<sub>2<\/sub><sup>+<\/sup>(t-1))] \/ g<sub>1<\/sub><\/p>\n\n\n\n<p>q<sub>2<\/sub>(t) = [x<sub>2<\/sub><sup>+<\/sup>(t) \u2013 x<sub>2<\/sub><sup>+<\/sup>(t-1)] \/ g<sub>2<\/sub><\/p>\n\n\n\n<p>and g<sub>1<\/sub>&nbsp;and g<sub>2<\/sub>&nbsp;are the position and velocity process noise input scalars, respectively, made over the sliding time window to estimate the process noise means q<sub>1<\/sub>\u2019(t) and q<sub>2<\/sub>\u2019(t) and covariances Q<sub>11<\/sub>(t), Q<sub>12<\/sub>(t), Q<sub>21<\/sub>(t), and Q<sub>22<\/sub>(t). The measurement and process noise means and covariances are re-estimated each time the window is shifted forward by one time step.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"3-two-state-noise-adaptive-kalman-filter-examples\">3. Two State Noise-Adaptive Kalman Filter Examples<\/h2>\n\n\n\n<p>The following charts illustrate the application of the two-state noise-adaptive Kalman filter method to the daily closing values of a stock index, a bond index, a currency, a commodity index, and a volatility index for the year 2020. The upper chart of each example shows the index or FX rate input z(t) and the state estimate measurement update outputs x<sub>1<\/sub><sup>+<\/sup>(t) and x<sub>2<\/sub><sup>+<\/sup>(t), the middle chart shows the filter gains k<sub>1<\/sub>(t) and k<sub>2<\/sub>(t), and the lower chart shows the associated Q(t) and R(t) covariances.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"s-p-500-stock-index\">S&amp;P 500 Stock Index<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2022\/02\/alpha-architect-trend-following-filter-5-1-1100x565.png\" alt=\"\" class=\"wp-image-124344 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1100px; aspect-ratio: 1100\/565;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2022\/02\/alpha-architect-trend-following-filter-5-2-1100x553.png\" alt=\"\" class=\"wp-image-124345 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1100px; aspect-ratio: 1100\/553;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2022\/02\/alpha-architect-trend-following-filter-5-3-1100x553.png\" alt=\"\" class=\"wp-image-124348 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1100px; aspect-ratio: 1100\/553;\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\">For the three charts above:<br>The results are hypothetical results and are NOT an indicator of future results and do NOT represent returns that any investor actually attained. Indexes are unmanaged, do not reflect management or trading fees, and one cannot invest directly in an index.<\/p>\n\n\n\n<p><strong>Bloomberg U.S. Aggregate Bond Index<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2022\/02\/alpha-architect-trend-following-filter-5-4-1100x551.png\" alt=\"\" class=\"wp-image-124356 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1100px; aspect-ratio: 1100\/551;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2022\/02\/alpha-architect-trend-following-filter-5-5-1100x549.png\" alt=\"\" class=\"wp-image-124358 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1100px; aspect-ratio: 1100\/549;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2022\/02\/alpha-architect-trend-following-filter-5-6-1100x550.png\" alt=\"\" class=\"wp-image-124359 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1100px; aspect-ratio: 1100\/550;\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\">For the three charts above:<br>The results are hypothetical results and are NOT an indicator of future results and do NOT represent returns that any investor actually attained. Indexes are unmanaged, do not reflect management or trading fees, and one cannot invest directly in an index.<\/p>\n\n\n\n<p><strong>Euro<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2022\/02\/alpha-architect-trend-following-filter-5-7-1100x546.png\" alt=\"\" class=\"wp-image-124371 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1100px; aspect-ratio: 1100\/546;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2022\/02\/alpha-architect-trend-following-filter-5-8-1100x550.png\" alt=\"\" class=\"wp-image-124372 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1100px; aspect-ratio: 1100\/550;\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2022\/02\/alpha-architect-trend-following-filter-5-9-1100x552.png\" alt=\"\" class=\"wp-image-124373 lazyload\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1100px; aspect-ratio: 1100\/552;\" \/><\/figure>\n\n\n\n<p class=\"has-text-align-center\">For the three charts above:<br>The results are hypothetical results and are NOT an indicator of future results and do NOT represent returns that any investor actually attained. Indexes are unmanaged, do not reflect management or trading fees, and one cannot invest directly in an index.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Notes:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The filter equations in Appendix 1 are shown in non-matrix form for clarity.<\/li><li>Because the measurement noise variance R(t) and process noise covariance Q(t) may in actual practice become negative definite when performing the estimate calculations, the absolute values of the summation terms of R(t), Q<sub>11<\/sub>(t), and Q<sub>22<\/sub>(t) are used&nbsp;<a><sup>(6)<\/sup><\/a>.<\/li><li>In order to minimize potential problems in the initialization process, an expanding time window, i.e., including noise samples at time steps 1 to t, is used to calculate the process noise and measurement noise mean and covariance estimates for time steps 1 through N-1, after which the sliding time window of length N is used.<\/li><li>In order to minimize potential roundoff errors, the Joseph stabilized form of the state estimate covariance measurement update P<sup>+<\/sup>(t) equations is used.<\/li><\/ul>\n\n\n\n<p>References<\/p>\n\n\n\n<p>1. Kalman, R. E., \u201cA New Approach to Linear Filtering and Prediction Problems\u201d, Journal of Basic Engineering, 82 (1), 35-45, March 1960.<br><br>2. 6. Myers, K. A. and Tapley, B. D., \u201cAdaptive Sequential Estimation with Unknown Noise Statistics\u201d, IEEE Transactions on Automatic Control, AC-21 (4), 520-523, August 1976.<br><br>3. Stengel, R. F., Optimal Control and Estimation, Dover Publications, Inc., 1994.<br><br>4. Lopez de Prado, M. and Rebonato, R., \u201cKinetic Component Analysis\u201d, Journal of Investing, 25 (3), 142-154, Fall 2016. <br><br>5. Kalata, P. R., \u201cThe Tracking Index: A Generalized Parameter for \u03b1-\u03b2 and \u03b1-\u03b2-\u03b3 Target Trackers\u201d,&nbsp;<em>IEEE Transactions on Aerospace and Electronic Systems<\/em>, AES-20 (2), 174-182, March 1984.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The noise-adaptive method estimates the measurement and process noise covariances simultaneously with the state estimates.<\/p>\n","protected":false},"author":575,"featured_media":29793,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[339,338,341,352,344],"tags":[4922,1006,4272,11066,1291,5761],"contributors-categories":[13651],"class_list":{"0":"post-124294","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science","8":"category-ibkr-quant-news","9":"category-quant-development","10":"category-quant-north-america","11":"category-quant-regions","12":"tag-econometrics","13":"tag-fintech","14":"tag-kalman-filter","15":"tag-noise-adaptive-kalman-filter","16":"tag-technical-analysis","17":"tag-trend-following","18":"contributors-categories-alpha-architect"},"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Trend-Following Filters \u2013 Part 5 | IBKR Quant<\/title>\n<meta name=\"description\" content=\"The noise-adaptive method estimates the measurement and process noise covariances simultaneously with the state estimates.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/124294\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Trend-Following Filters \u2013 Part 5 | IBKR Quant Blog\" \/>\n<meta property=\"og:description\" content=\"The noise-adaptive method estimates the measurement and process noise covariances simultaneously with the state estimates.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/trend-following-filters-part-5\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-16T16:36:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-21T14:51:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/trend-compas.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"540\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Henry Stern\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Henry Stern\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/trend-following-filters-part-5\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/trend-following-filters-part-5\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Henry Stern\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/30f94162d86f3b7bb5d5068c0d04f8d4\"\n\t            },\n\t            \"headline\": \"Trend-Following Filters \u2013 Part 5\",\n\t            \"datePublished\": \"2022-02-16T16:36:55+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:51:49+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/trend-following-filters-part-5\\\/\"\n\t            },\n\t            \"wordCount\": 1365,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/trend-following-filters-part-5\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/12\\\/trend-compas.jpg\",\n\t            \"keywords\": [\n\t                \"Econometrics\",\n\t                \"fintech\",\n\t                \"Kalman filter\",\n\t                \"Noise-Adaptive Kalman Filter\",\n\t                \"technical analysis\",\n\t                \"Trend Following\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Quant\",\n\t                \"Quant Development\",\n\t                \"Quant North America\",\n\t                \"Quant Regions\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/trend-following-filters-part-5\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/trend-following-filters-part-5\\\/\",\n\t            \"name\": \"Trend-Following Filters \u2013 Part 5 | IBKR Quant Blog\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/trend-following-filters-part-5\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/trend-following-filters-part-5\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/12\\\/trend-compas.jpg\",\n\t            \"datePublished\": \"2022-02-16T16:36:55+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:51:49+00:00\",\n\t            \"description\": \"The noise-adaptive method estimates the measurement and process noise covariances simultaneously with the state estimates.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/trend-following-filters-part-5\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/trend-following-filters-part-5\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/12\\\/trend-compas.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/12\\\/trend-compas.jpg\",\n\t            \"width\": 900,\n\t            \"height\": 540,\n\t            \"caption\": \"Trend Following\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/30f94162d86f3b7bb5d5068c0d04f8d4\",\n\t            \"name\": \"Henry Stern\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/henrystern\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Trend-Following Filters \u2013 Part 5 | IBKR Quant","description":"The noise-adaptive method estimates the measurement and process noise covariances simultaneously with the state estimates.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/124294\/","og_locale":"en_US","og_type":"article","og_title":"Trend-Following Filters \u2013 Part 5 | IBKR Quant Blog","og_description":"The noise-adaptive method estimates the measurement and process noise covariances simultaneously with the state estimates.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/trend-following-filters-part-5\/","og_site_name":"IBKR Campus US","article_published_time":"2022-02-16T16:36:55+00:00","article_modified_time":"2022-11-21T14:51:49+00:00","og_image":[{"width":900,"height":540,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/trend-compas.jpg","type":"image\/jpeg"}],"author":"Henry Stern","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Henry Stern","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/trend-following-filters-part-5\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/trend-following-filters-part-5\/"},"author":{"name":"Henry Stern","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/30f94162d86f3b7bb5d5068c0d04f8d4"},"headline":"Trend-Following Filters \u2013 Part 5","datePublished":"2022-02-16T16:36:55+00:00","dateModified":"2022-11-21T14:51:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/trend-following-filters-part-5\/"},"wordCount":1365,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/trend-following-filters-part-5\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/trend-compas.jpg","keywords":["Econometrics","fintech","Kalman filter","Noise-Adaptive Kalman Filter","technical analysis","Trend Following"],"articleSection":["Data Science","Quant","Quant Development","Quant North America","Quant Regions"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/trend-following-filters-part-5\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/trend-following-filters-part-5\/","name":"Trend-Following Filters \u2013 Part 5 | IBKR Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/trend-following-filters-part-5\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/trend-following-filters-part-5\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/trend-compas.jpg","datePublished":"2022-02-16T16:36:55+00:00","dateModified":"2022-11-21T14:51:49+00:00","description":"The noise-adaptive method estimates the measurement and process noise covariances simultaneously with the state estimates.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/trend-following-filters-part-5\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/trend-following-filters-part-5\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/trend-compas.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/trend-compas.jpg","width":900,"height":540,"caption":"Trend Following"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/30f94162d86f3b7bb5d5068c0d04f8d4","name":"Henry Stern","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/henrystern\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/trend-compas.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/124294","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/575"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=124294"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/124294\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/29793"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=124294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=124294"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=124294"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=124294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}