{"id":155278,"date":"2022-08-31T10:42:00","date_gmt":"2022-08-31T14:42:00","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=155278"},"modified":"2022-11-21T09:57:50","modified_gmt":"2022-11-21T14:57:50","slug":"pairs-trading-basics-correlation-cointegration-and-strategy-part-i","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\/","title":{"rendered":"Pairs Trading Basics: Correlation, Cointegration And Strategy &#8211; Part I"},"content":{"rendered":"\n<p>A pairs trading strategy is one of the most popular strategies when it comes to finding trading opportunities between the two stocks that are co-integrated.<\/p>\n\n\n\n<p>How do the stocks co-integrate? How to take advantage of their co-integration with a pairs trading strategy? This blog discusses it all as it covers:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>What is pairs trading?<\/li><li>History of pairs trading<\/li><li>What is the logic behind pairs trading?<\/li><li>Essential terms used in pairs trading<\/li><li>Correlation<\/li><li>Cointegration<\/li><li>Z-score<\/li><li>Augmented Dickey Fuller Test<\/li><li>Steps for pairs trading<\/li><li>Select stocks for pairs trading<\/li><li>Entry points<\/li><li>Defining exit points<\/li><li>Pairs trading strategy using Excel and Python<\/li><li>Advantages of pairs trading<\/li><li>Disadvantages of pairs trading<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-pairs-trading\">What is pairs trading?<\/h2>\n\n\n\n<p>In a pairs trading strategy, usually, a pair of stocks is traded in a market-neutral strategy, i.e. it doesn\u2019t matter whether the market is trending upwards or downwards, the two open positions for each stock hedge against each other. The key challenges in pairs trading are to:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Select a pair which will give you good&nbsp;<a href=\"https:\/\/blog.quantinsti.com\/statistical-arbitrage\/\">statistical arbitrage<\/a>&nbsp;opportunities over time<\/li><li>Select the entry\/exit points<\/li><\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"history-of-pairs-trading\">History of pairs trading<\/h2>\n\n\n\n<p>Pairs trading was first introduced in the mid-1980s by a group of technical analyst researchers that were employed by Morgan Stanley. The pairs trading strategy uses statistical and technical analysis to seek out potential market-neutral profits.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-the-logic-behind-pairs-trading\">What is the logic behind pairs trading?<\/h2>\n\n\n\n<p>In the case of a pairs trading strategy, the two stocks or the financial instruments need to be trending at a similar mean price and remain close to each other. But, on certain occasions, one of the instruments may go through a short period of deviation from another in terms of price.<\/p>\n\n\n\n<p>In this short period, the trader can take the opportunity to go long on one of the financial instruments while shorting the other. The positions are based on the current market price of both the stocks and their standard deviation.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"essential-terms-used-in-pairs-trading\">Essential terms used in pairs trading<\/h2>\n\n\n\n<p>Some of the essential terms that are used in pairs trading strategy are-<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"correlation\">Correlation<\/h3>\n\n\n\n<p>Correlation is quantified by the correlation coefficient \u03c1, which ranges from -1 to +1. The correlation coefficient indicates the degree of correlation between the two variables.<\/p>\n\n\n\n<p>The value of +1 means there exists a perfect positive correlation between the two variables, -1 means there is a perfect negative correlation and 0 means there is no correlation.<\/p>\n\n\n\n<p>A perfect positive correlation is when one variable moves in either an upward or downward direction and the other variable also moves in the same direction with the same magnitude.<\/p>\n\n\n\n<p>Whereas a perfect negative correlation is when one variable moves in the upward direction and the other variable moves in the downward (i.e. opposite) direction with the same magnitude.<\/p>\n\n\n\n<p>The correlation coefficient for the two variables is given by:<\/p>\n\n\n\n<p><strong>Correlation(X,Y) = \u03c1 = COV(X,Y) \/ SD(X).SD(Y)<\/strong><\/p>\n\n\n\n<p>where,<br>cov (X, Y) = the covariance between X &amp; Y<br>SD (X) and SD(Y) = the standard deviation of the respective variables<\/p>\n\n\n\n<p>If the correlation is high, say 0.8, traders may choose that pair for pairs trading. This high number represents a strong relationship between the two stocks. So if A goes up, the chances of B going up are also quite high.<\/p>\n\n\n\n<p>Based on this assumption a market neutral strategy is played where A is bought and B is sold; bought and sold decisions are made based on their individual patterns.<\/p>\n\n\n\n<p>Just looking at&nbsp;<a href=\"https:\/\/blog.quantinsti.com\/covariance-correlation\/\">correlation<\/a>&nbsp;might give you spurious results. For instance, if your pairs trading strategy is based on the spread between the prices of the two stocks, it is possible that the prices of the two stocks keep on increasing without ever&nbsp;<a href=\"https:\/\/blog.quantinsti.com\/mean-reversion-strategies-introduction-building-blocks\/\">mean-reverting<\/a>.<\/p>\n\n\n\n<p><strong>Spread = log(a) \u2013 nlog(b)<\/strong><\/p>\n\n\n\n<p>where \u2018a\u2019 and \u2018b\u2019 = prices of stocks A and B respectively<\/p>\n\n\n\n<p>For each stock of A bought, you have sold n number of stocks of B.<\/p>\n\n\n\n<p>Now, both \u2018a\u2019 and \u2018b\u2019 increase in such a way that the value of the spread decreases. This will result in a loss since stock A is increasing at a rate lower than stock B and you are short on stock B.<\/p>\n\n\n\n<p>Thus, one should be careful of using only correlation for determining the pairs of the stocks while performing the pairs trading strategy.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"cointegration\">Cointegration<\/h3>\n\n\n\n<p>\u200b\u200bThe most common test for Pairs Trading is the cointegration test.&nbsp;<a href=\"https:\/\/quantra.quantinsti.com\/glossary\/Cointegration\" target=\"_blank\" rel=\"noreferrer noopener\">Cointegration<\/a>&nbsp;is a statistical property of two or more time-series variables which indicates if a linear combination of the variables is stationary.<\/p>\n\n\n\n<p>Let us understand the statement above. The two time series variables, in this case, are the log of prices of stocks A and B. Linear combination of these variables can be a linear equation defining the spread:<\/p>\n\n\n\n<p>As you know,<\/p>\n\n\n\n<p><strong>Spread = log(a) \u2013 nlog(b)<\/strong><\/p>\n\n\n\n<p>where \u2018a\u2019 and \u2018b\u2019 are prices of stocks A and B respectively.<\/p>\n\n\n\n<p>For each stock of A bought, you have sold n stocks of B.<\/p>\n\n\n\n<p>If A and B are cointegrated, the equation above is stationary. A stationary process has very valuable features which are required to model pairs trading strategies.<\/p>\n\n\n\n<p>For instance, in this case, if the equation above is stationary, that suggests that the mean and variance of this equation remain constant over time.<\/p>\n\n\n\n<p>So if we start with \u2018n\u2019, which is called the hedge ratio, so that spread = 0, the property of stationary implies that the expected value of spread will remain as 0. Any deviation from this expected value is a case for statistical abnormality, hence a case for pairs trading!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"z-score\">Z-score<\/h3>\n\n\n\n<p>Given a normal distribution of raw data points, the z-score is calculated so that the new distribution is a normal distribution with a mean of 0 and a standard deviation of 1. Having such a distribution ~ N(0, 1) is very useful for creating threshold levels.<\/p>\n\n\n\n<p>For instance, in pairs trading, we have a distribution of spread between the prices of stocks A and B. We can convert these raw scores of spread into z-scores as explained below.<\/p>\n\n\n\n<p>This new distribution will have a mean of 0 and a standard deviation of 1. It is easy to create threshold levels for this distribution such as 1.5 sigma, 2 sigma, 2.5 sigma, and so on.<\/p>\n\n\n\n<p>The formula for z-score is as follows:<\/p>\n\n\n\n<p><strong>z = (x \u2013 mean) \/ standard deviation<\/strong><\/p>\n\n\n\n<p>where,<br>x = a raw data point<br>z = the z-score<\/p>\n\n\n\n<p>Mean and standard deviation can be rolling statistics for a period of \u2018t\u2019 days or minutes or time intervals.<\/p>\n\n\n\n<p><em>Stay tuned for the next installment in which Chainika Thakar will discuss Augmented Dickey Fuller Test.<\/em><\/p>\n\n\n\n<p><em>Visit QuantInsti to read the full article: <a href=\"https:\/\/blog.quantinsti.com\/pairs-trading-basics\/\">https:\/\/blog.quantinsti.com\/pairs-trading-basics\/<\/a>.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A pairs trading strategy is one of the most popular strategies when it comes to finding trading opportunities between the two stocks that are co-integrated.<\/p>\n","protected":false},"author":368,"featured_media":47191,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[339,343,349,338,350,341,344],"tags":[12631,1988,1006,8445,1291],"contributors-categories":[13654],"class_list":{"0":"post-155278","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science","8":"category-programing-languages","9":"category-python-development","10":"category-ibkr-quant-news","11":"category-quant-asia-pacific","12":"category-quant-development","13":"category-quant-regions","14":"tag-cointegration","15":"tag-correlation","16":"tag-fintech","17":"tag-pairs-trading","18":"tag-technical-analysis","19":"contributors-categories-quantinsti"},"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>Pairs Trading Basics: Correlation, Cointegration And Strategy &#8211; Part I<\/title>\n<meta name=\"description\" content=\"A pairs trading strategy is one of the most popular strategies when it comes to finding trading opportunities between the two stocks that are...\" \/>\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\/155278\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Pairs Trading Basics: Correlation, Cointegration And Strategy - Part I | IBKR Quant Blog\" \/>\n<meta property=\"og:description\" content=\"A pairs trading strategy is one of the most popular strategies when it comes to finding trading opportunities between the two stocks that are co-integrated.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-31T14:42:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-11-21T14:57:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/06\/candles-trading-e1678382468475.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"506\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Chainika Thakar\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Chainika Thakar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 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\\\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Chainika Thakar\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/c97b4c6a477fa019494f67cff50fcb10\"\n\t            },\n\t            \"headline\": \"Pairs Trading Basics: Correlation, Cointegration And Strategy &#8211; Part I\",\n\t            \"datePublished\": \"2022-08-31T14:42:00+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:57:50+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\\\/\"\n\t            },\n\t            \"wordCount\": 1091,\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\\\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/06\\\/candles-trading-e1678382468475.jpg\",\n\t            \"keywords\": [\n\t                \"Cointegration\",\n\t                \"correlation\",\n\t                \"fintech\",\n\t                \"Pairs Trading\",\n\t                \"technical analysis\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Python Development\",\n\t                \"Quant\",\n\t                \"Quant Asia Pacific\",\n\t                \"Quant Development\",\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\\\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\\\/\",\n\t            \"name\": \"Pairs Trading Basics: Correlation, Cointegration And Strategy - Part I | 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\\\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/06\\\/candles-trading-e1678382468475.jpg\",\n\t            \"datePublished\": \"2022-08-31T14:42:00+00:00\",\n\t            \"dateModified\": \"2022-11-21T14:57:50+00:00\",\n\t            \"description\": \"A pairs trading strategy is one of the most popular strategies when it comes to finding trading opportunities between the two stocks that are co-integrated.\",\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\\\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\\\/\"\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\\\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/06\\\/candles-trading-e1678382468475.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/06\\\/candles-trading-e1678382468475.jpg\",\n\t            \"width\": 900,\n\t            \"height\": 506\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\\\/c97b4c6a477fa019494f67cff50fcb10\",\n\t            \"name\": \"Chainika Thakar\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/chainikathakar\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Pairs Trading Basics: Correlation, Cointegration And Strategy &#8211; Part I","description":"A pairs trading strategy is one of the most popular strategies when it comes to finding trading opportunities between the two stocks that are...","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\/155278\/","og_locale":"en_US","og_type":"article","og_title":"Pairs Trading Basics: Correlation, Cointegration And Strategy - Part I | IBKR Quant Blog","og_description":"A pairs trading strategy is one of the most popular strategies when it comes to finding trading opportunities between the two stocks that are co-integrated.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\/","og_site_name":"IBKR Campus US","article_published_time":"2022-08-31T14:42:00+00:00","article_modified_time":"2022-11-21T14:57:50+00:00","og_image":[{"width":900,"height":506,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/06\/candles-trading-e1678382468475.jpg","type":"image\/jpeg"}],"author":"Chainika Thakar","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Chainika Thakar","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\/"},"author":{"name":"Chainika Thakar","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/c97b4c6a477fa019494f67cff50fcb10"},"headline":"Pairs Trading Basics: Correlation, Cointegration And Strategy &#8211; Part I","datePublished":"2022-08-31T14:42:00+00:00","dateModified":"2022-11-21T14:57:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\/"},"wordCount":1091,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/06\/candles-trading-e1678382468475.jpg","keywords":["Cointegration","correlation","fintech","Pairs Trading","technical analysis"],"articleSection":["Data Science","Programming Languages","Python Development","Quant","Quant Asia Pacific","Quant Development","Quant Regions"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\/","name":"Pairs Trading Basics: Correlation, Cointegration And Strategy - Part I | IBKR Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/06\/candles-trading-e1678382468475.jpg","datePublished":"2022-08-31T14:42:00+00:00","dateModified":"2022-11-21T14:57:50+00:00","description":"A pairs trading strategy is one of the most popular strategies when it comes to finding trading opportunities between the two stocks that are co-integrated.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/pairs-trading-basics-correlation-cointegration-and-strategy-part-i\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/06\/candles-trading-e1678382468475.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/06\/candles-trading-e1678382468475.jpg","width":900,"height":506},{"@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\/c97b4c6a477fa019494f67cff50fcb10","name":"Chainika Thakar","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/chainikathakar\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/06\/candles-trading-e1678382468475.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/155278","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\/368"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=155278"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/155278\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/47191"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=155278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=155278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=155278"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=155278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}