Unsupervised Learning for Pairs Trading in the National Stock Exchange of India

2021 ◽  
Vol 23 (06) ◽  
pp. 1068-1082
Author(s):  
Chetan Tayal ◽  
◽  
Lalitha V.P ◽  

Pairs Trading is a widely known and used market-neutral trading strategy that utilizes the concept of statistical arbitrage. It is based on the idea of mean-reverting time series and relies on the spread between two assets to demonstrate that property to buy an asset at a relatively undervalued price and an asset at a relatively overvalued price. This allows investors to manage risk if the market moves strongly in only one direction by making money on one side of the bet. The main challenge of pairs trading is selecting pairs that have an actual underlying relationship and their spread has real statistical significance. In this paper, we present the use of machine learning, specifically unsupervised clustering to construct our search space for pair selection and compare it against a traditional way of selecting pairs. We see that not only are we able to pick out more profitable pairs, these pairs are also less volatile and have less exposure to the market.

2020 ◽  
Vol 38 (3) ◽  
Author(s):  
Ainhoa Fernández-Pérez ◽  
María de las Nieves López-García ◽  
José Pedro Ramos Requena

In this paper we present a non-conventional statistical arbitrage technique based in varying the number of standard deviations used to carry the trading strategy. We will show how values of 1 and 1,2 in the standard deviation provide better results that the classic strategy of Gatev et al (2006). An empirical application is performance using data of the FST100 index during the period 2010 to June 2019.


2015 ◽  
Vol 2 (1) ◽  
pp. 140-148 ◽  
Author(s):  
Saloni Gupta

Statistical arbitrage is a popular device among hedge fund managers and assets management professionals. It refers to simultaneous buying and selling two different capital assets to earn super-normal profit. By identifying persistent anomalies that violate the efficient market hypothesis, statistical methods can be used to create a trading strategy to generate profit with high probability. A pair trading is one such trading strategy which is based on statistical arbitrage process. Pairs trading can be simple in concept, but can be one of the most complex types of trading in practice. The starting point of this strategy is that stocks that have historically had the same trading patters will have so in future as well. If there is a deviation from the historical mean this creates a trading opportunity, which can be exploited. Gains are earned when the price relationship is resorted. The basic premise of this strategy is that stock prices follow a mean reverting process. The objective of this paper is to identify arbitrage opportunities and calculating profits earned through these opportunities by using statistical tools. Many questions need to be answered before one can implement such strategy viz. which pair of stocks should be traded, how much do we buy/sell of each stock, how to catch the signal of an opportunity (i.e opening a position) and when to close the position so that profit could be earned. In this paper we have taken daily closing prices from 1/1/2010 to 1/1/2011 of thirty scrips of BSE-Sensex to form pairs. Pairs are formed on the basis of minimum distances between two stocks. We have decided not to invest anything. That is, purchase the same rupee amount of the long stock as we sell of the short stock so that strategy is self-financing. We open a position when the absolute value of the difference gets larger than two of its historical standardization.  To unwind the position, we wait until the first time it crosses zero. To calculate the profit/loss of this strategy, we have used “R-Software”. It is observed that profit could be earned through pairs trading if it is applied without losing patience. By identifying persistent anomalies that violate the efficient market hypothesis, statistical methods can be used to create a trading strategy to generate profit with high probability.


2020 ◽  
Vol 12 (17) ◽  
pp. 6791
Author(s):  
Seungho Baek ◽  
Mina Glambosky ◽  
Seok Hee Oh ◽  
Jeong Lee

This study applies machine learning methods to develop a sustainable pairs trading market-neutral investment strategy across multiple futures markets. Cointegrated pairs with similar price trends are identified, and a hedge ratio is determined using an Error Correction Model (ECM) framework and support vector machine algorithm based upon the two-step Engle–Granger method. The study shows that normal backwardation and contango do not consistently characterize futures markets, and an algorithmic pairs trading strategy is effective, given the unique predominant price trends of each futures market. Across multiple futures markets, the pairs trading strategy results in larger risk-adjusted returns and lower exposure to market risk, relative to an appropriate benchmark. Backtesting is employed and results show that the pairs trading strategy may hedge against unexpected negative systemic events, specifically the COVID-19 pandemic, remaining profitable over the period examined.


2015 ◽  
Vol 54 (3) ◽  
pp. 215-244
Author(s):  
Laila Taskeen Qazi ◽  
Atta Ur Rahman . ◽  
Saleem Gul

Pairs Trading refers to a statistical arbitrage approach devised to take advantage from short term fluctuations simultaneously depicted by two stocks from long run equilibrium position. In this study a technique has been designed for the selection of pairs for pairs trading strategy. Engle-Granger 2-step Cointegration approach has been applied for identifying the trading pairs. The data employed in this study comprised of daily stock prices of Commercial Banks and Financial Services Sector. Restricted pairs have been formed out of highly liquid log share price series of 22 Commercial Banks and 19 Financial Services companies listed on Karachi Stock Exchange. Sample time period extended from November 2, 2009 to June 28, 2013 having total 911 observations for each share prices series incorporated in the study. Out of 231 pairs of commercial banks 25 were found cointegrated whereas 40 cointegrated pairs were identified among 156 pairs formed in Financial Services Sector. Furthermore a Cointegration relationship was estimated by regressing one stock price series on another, whereas the order of regression is accessed through Granger Causality Test. The mean reverting residual of Cointegration regression is modeled through the Vector Error Correction Model in order to assess the speed of adjustment coefficient for the statistical arbitrage opportunity. The findings of the study depict that the cointegrated stocks can be combined linearly in a long/short portfolio having stationary dynamics. Although for the given strategy profitability has not been assessed in this study yet the VECM results for residual series show significant deviations around the mean which identify the statistical arbitrage opportunity and ensure profitability of the pairs trading strategy. JEL classifications: C32, C53, G17 Keywords: Pairs Trading, Statistical Arbitrage, Engle-Granger 2-step Cointegration Approach, VECM.


The pairs trading, one of the techniques of the statistical arbitrage, is a market-neutral trading strategy that employs time series methods to identify relative mispricing between securities based on the expected values of these assets. The main objective of this study was to investigate the profitability and risks of pairs trading based on the selection of pairs through minimising the sum of squared deviation (distance method) and the selection based on cointegration tests (cointegration method) using the future daily prices of commodities traded and listed on The Multi Commodity Exchange of India (MCX) over 2011-2017 on a rolling basis. The pairs trading strategy was performed in two stages: the formation period and the trading period. The strategy involved long position in one commodity and short position in other commodity of the pair identified. The study revealed that pairs trading in commodities were significantly profitable, with average annualised profitability of up to 59 percent, including transaction costs.


2021 ◽  
Author(s):  
Ilan Sousa Figueirêdo ◽  
Tássio Farias Carvalho ◽  
Wenisten José Dantas Silva ◽  
Lílian Lefol Nani Guarieiro ◽  
Erick Giovani Sperandio Nascimento

Abstract Detection of anomalous events in practical operation of oil and gas (O&G) wells and lines can help to avoid production losses, environmental disasters, and human fatalities, besides decreasing maintenance costs. Supervised machine learning algorithms have been successful to detect, diagnose, and forecast anomalous events in O&G industry. Nevertheless, these algorithms need a large quantity of annotated dataset and labelling data in real world scenarios is typically unfeasible because of exhaustive work of experts. Therefore, as unsupervised machine learning does not require an annotated dataset, this paper intends to perform a comparative evaluation performance of unsupervised learning algorithms to support experts for anomaly detection and pattern recognition in multivariate time-series data. So, the goal is to allow experts to analyze a small set of patterns and label them, instead of analyzing large datasets. This paper used the public 3W database of three offshore naturally flowing wells. The experiment used real data of production of O&G from underground reservoirs with the following anomalous events: (i) spurious closure of Downhole Safety Valve (DHSV) and (ii) quick restriction in Production Choke (PCK). Six unsupervised machine learning algorithms were assessed: Cluster-based Algorithm for Anomaly Detection in Time Series Using Mahalanobis Distance (C-AMDATS), Luminol Bitmap, SAX-REPEAT, k-NN, Bootstrap, and Robust Random Cut Forest (RRCF). The comparison evaluation of unsupervised learning algorithms was performed using a set of metrics: accuracy (ACC), precision (PR), recall (REC), specificity (SP), F1-Score (F1), Area Under the Receiver Operating Characteristic Curve (AUC-ROC), and Area Under the Precision-Recall Curve (AUC-PRC). The experiments only used the data labels for assessment purposes. The results revealed that unsupervised learning successfully detected the patterns of interest in multivariate data without prior annotation, with emphasis on the C-AMDATS algorithm. Thus, unsupervised learning can leverage supervised models through the support given to data annotation.


2021 ◽  
Vol 8 (55) ◽  
pp. 44-62
Author(s):  
Marcin Chlebus ◽  
Michał Dyczko ◽  
Michał Woźniak

Abstract Statistical learning models have profoundly changed the rules of trading on the stock exchange. Quantitative analysts try to utilise them predict potential profits and risks in a better manner. However, the available studies are mostly focused on testing the increasingly complex machine learning models on a selected sample of stocks, indexes etc. without a thorough understanding and consideration of their economic environment. Therefore, the goal of the article is to create an effective forecasting machine learning model of daily stock returns for a preselected company characterised by a wide portfolio of strategic branches influencing its valuation. We use Nvidia Corporation stock covering the period from 07/2012 to 12/2018 and apply various econometric and machine learning models, considering a diverse group of exogenous features, to analyse the research problem. The results suggest that it is possible to develop predictive machine learning models of Nvidia stock returns (based on many independent environmental variables) which outperform both simple naïve and econometric models. Our contribution to literature is twofold. First, we provide an added value to the strand of literature on the choice of model class to the stock returns prediction problem. Second, our study contributes to the thread of selecting exogenous variables and the need for their stationarity in the case of time series models.


Sign in / Sign up

Export Citation Format

Share Document