SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
Armansky
Topic Author
Posts: 5
Joined: January 9th, 2018, 3:25 pm

Pairs trading questions

October 29th, 2019, 11:35 am

Hi all,

Could someone please help me with solving the following questions ?

I formed a stock universe where the program seeks cointegrated pairs using python (stocks from SP500). Also there are functions to plot the spread.
So I defined z-score, linear regression and price ratio functions. 
Here are GILD/WFC pair, for instance. The slope for our combination is 0.74
1. What exactly positions should I open using the z-score plot at the current moment (when z-score below 0 , around -2)? Should it be opened short WFC vs long 0.74*GILD or long WFC vs short 0.74*GILD ?
 
Thank's in advance.
Attachments
print.jpg
defplotzscore.jpg
defplotlr.jpg
Last edited by Armansky on October 29th, 2019, 11:54 am, edited 1 time in total.
 
Armansky
Topic Author
Posts: 5
Joined: January 9th, 2018, 3:25 pm

Re: Pairs trading questions

October 29th, 2019, 11:36 am

+ plotting
Attachments
plotzscore.jpg
plotlr.jpg
graph.jpg
 
Armansky
Topic Author
Posts: 5
Joined: January 9th, 2018, 3:25 pm

Re: Pairs trading questions

October 29th, 2019, 11:37 am

+ ticker a and b
Attachments
ticker-a.jpg
 
Armansky
Topic Author
Posts: 5
Joined: January 9th, 2018, 3:25 pm

Re: Pairs trading questions

October 29th, 2019, 11:42 am

and the second question about fitting the spread to OU process. Here are the formula to compute the speed of mean-reversion in attachment. 
B - slope = 0.74
So in our example : the speed = -lnB/t = -ln0.74/1/252 = 0.3/0.00396 = 75.75 days for reverting to the equilibrium level , are these arguments correct ?
Attachments
speed.jpg
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On