Course Name: Data & Feature Engineering for Trading, Section No: 5, Unit No: 4, Unit type: Notebook
We compare pair price series from a certain stock universe to identify which pairs have identical prices on the same day. We then count the number of identical price days and set a threshold of 20 days. Those with identical price days greater than 20 will be further investigated for redundancy. I still don't uderstand what are the runs. Are they the number of time that the sign of the daily price movement changes during redundant period?
Hi Molefe,
The runs are the number of 'regimes' where the prices were the same or different. For e.g. the price is the same from days 1-30, then that's one run for the "True" counter. Then if prices are different from days 31-70 (say) that's a run, but for the "False" counter.
So runs in this particular code segment is the number of uninterrupted periods where the prices are the same for more than 20 days.
Hope this helps!
Basically, If the stock pairs have the same CLOSING price for 20 times in a row, it will be counted as 1 run.
Meaning, CBG & CBRE have total of 9 times that their closing price are the same for 20 times in a row
Was looking for this too. jupyter notebook should explain it better than just stating 'run'
Thanks Gaurav!
Thank Dwi for the feedback!
We will change the explanation in the notebook soon to enhance clarity.