profitable trade equation using pair trading

Marketopedia / Trading System: All You Need to Know / profitable trade equation using pair trading

Trade Identification

– Trading the equation

We’ve gone over all the relevant background material on Pair trading, and now it’s time to combine everything we’ve learned to gain insight into how such trades work.

Let us once more review this equation from a trader’s viewpoint. Consider how to potentially reap gains from it. By doing so, we can bring everything together.

y = M*x + c

This equation has two different interpretations, depending on your point of view. It all boils down to what angle you approach it from.

As a statistician

As a trader

When dealing with two stocks, a statistician may regard this as an equation in which the price of a dependent stock (labelled ‘y’) is illustrated in terms of an independent stock (labelled ‘x’). This form of ‘price illustration’ produces two other variables – the slope (or beta) ‘M’ and the intercept ‘c’.

In an optimal scenario, the stock price of y would be equal to Beta multiplied by X plus the intercept.

It is a fallacy to assume that the predicted stock price of Y is the same as its actual stock price. Variance in this equation produces a difference between them, also called the ‘residual’ or error term.

We can enhance the equation by factoring in the residuals, giving it a new form –

y = M*x + c + ε

Here, ε denotes the residual of the equation; furthermore, its stationarity adds credibility to it.

A trader might view this equation by considering the components involved. Analysing the variables, costs, and movements in pricing can help them develop an understanding of how to calculate potential profits or losses on trades.

y = M*x + c + ε

Let us reduce this equation to smaller components.

This equation y = M*x essentially tells us that the price of the dependent stock ‘y’ is determined by the independent stock price ‘x’, multiplied by the slope M. The slope in this case stands for the beta and it determines how many stocks of x are equivalent to the price of y.

As an illustration, here is the linear regression of HDFC Bank (y) against ICICI Bank (x) –

Here is a snapshot of ICICI and HDFC prices

Therefore, the cost of HDFC Bank is equivalent to that of ICICI multiplied by the Beta, with 1914 being equal to 291 times 7.61.

Don’t leap into those calculations; they clearly don’t work out.

If we accept that this equation is valid, it implies that for every one share of HDFC, there are 7.61 shares of ICICI. This is a crucial deduction.

By going long on one share of HDFC and shorting 7.61 shares of ICIC, I’m effectively hedging away a significant amount of directional risk. As a reminder, it is only because these two stocks are co-integrated that we even considered this strategy in the first place.

To summarise, here’s the equation.

y = M*x + c + ε

By taking long and short positions on x and y, we can manage the directional risk associated with this equation.

This brings us to the second portion of the equation: c plus ε.

As you’re aware, C is the intercept. I’m now asking you to reflect on the Error Ratio that we discussed in chapter 10.

Error Ratio = Standard Error of Intercept / Standard Error.

We previously discussed the importance of a lower error ratio, and, mathematically speaking, we are aiming for pairs with a low intercept.

It is essential for you to remember that we are selecting the pairs in order to have a minimal standard error of the intercept.

Remember, we’re trying to set up a trade or hedge for each element of y = M*x + c + ε. We want to hedge y with Mx, and reduce the intercept (c) as much as possible since this is not being traded or hedged. The lower c gets, the better it is for us.

The only thing that remains is the ε.

Remember, the residual is a stationary time series. We have validated this and we can now apply the properties of normal distribution with confidence. All that remains is to track the residuals and trigger a trade when it hits either the upper or lower standard deviation!

Typically, a trade is initiated when

Long on the pair (buy y, sell x) when the residuals hit -2 standard deviation (-2SD)

When the residuals reach two standard deviations, it’s time to short the pair (sell y, buy x).

In the first method, we initiate a trade at the  2nd standard deviation and keep the trade open until it returns to the average. We will set our stop loss at 3 standard deviations for both trades. We’ll discuss this in more detail in the next chapter.

This chapter is concise and I don’t want to overload your mind with any more information, so I’ll end it here.

It is highly essential to view this equation from a trader’s eye view and identify whatever you’re trading. Maintaining the intercept low, we are only trading the residuals and hedging away the stock price of y through x.

The residual is tradable due to its stationary nature and subsequent predictability. In the upcoming chapter, I’ll delve into the practicalities of pair trading by applying it in a practical situation.

    captcha