Serving the Quantitative Finance Community

 
User avatar
kfcnhl
Topic Author
Posts: 9
Joined: July 28th, 2009, 3:56 pm

Looking for ideas to identify a certain pattern

November 10th, 2011, 2:27 pm

Say I got the EOD price of a stock for the past 50 business days and the stock is trading its 50 day high.I want to know if this stock has been trading in a tight range and broke out just in the last 1 or 2 days.In other words, I want to filter out the stocks reached a 50 day high because it is continuously going up with minor reactions.I thought about various ideas:1. counting the # of turns: a temp high follow by a few declining days2. compare the range of 50 day high/low with the range of avg price in the 50 days +/- 2*sd3.Maybe identify support/resistance level? But this could be very different from my objective.but there are draw backs to each approach.Any suggestions?
 
User avatar
kfcnhl
Topic Author
Posts: 9
Joined: July 28th, 2009, 3:56 pm

Looking for ideas to identify a certain pattern

November 10th, 2011, 4:14 pm

Example of behavior that I want to identify:50 52 55 57 54 52 49 50 53 49.5 53 55 57 52.5 53 57 61So it's been trading between 49 and 57 but jumps to 61 suddenly.
 
User avatar
undergrad86
Posts: 0
Joined: October 29th, 2007, 8:24 pm

Looking for ideas to identify a certain pattern

November 10th, 2011, 4:29 pm

Take your rolling windows (say 50 business days), sort each day by the magnitude of returns smallest magnitude to largest. Calculate the Gini coefficient for this ordering. The closer the value is to 1, the more of the volatility was concentrated in a few days. The closer to zero the more the volatility's distributed across days. This isn't a directional measure, but if its a stock that's reached a new high and has a high Gini coefficient then you're almost certain that most of the jumps were to the upside.http://en.wikipedia.org/wiki/Gini_coefficient
 
User avatar
drm7
Posts: 1
Joined: April 13th, 2010, 11:32 am

Looking for ideas to identify a certain pattern

November 14th, 2011, 1:49 pm

You would need more data, but you can compute time in days since last 50 day high. The longer the time, the wider the "base." You would then have to use some judgement/backtesting to figure out how wide a base you want.
 
User avatar
DominicConnor
Posts: 41
Joined: July 14th, 2002, 3:00 am

Looking for ideas to identify a certain pattern

November 19th, 2011, 1:35 pm

Surely mean reversion is the idea here ?
 
User avatar
kfcnhl
Topic Author
Posts: 9
Joined: July 28th, 2009, 3:56 pm

Looking for ideas to identify a certain pattern

November 24th, 2011, 3:08 pm

QuoteOriginally posted by: DominicConnorSurely mean reversion is the idea here ?I am looking for prices that have been mean reverting in the past maybe 40/50 days but breaking the pattern in the last 10 days.
 
User avatar
blade
Posts: 0
Joined: June 18th, 2002, 3:28 pm

Looking for ideas to identify a certain pattern

November 24th, 2011, 4:04 pm

Looks to me that you want to identify a break in regime ? Have you looked at statistical process techniques such as CUSUM techniques ? Before you bombard me with questions, I looked at this before and did some work on it, but am not an expert. I was looking at it to try and catch when equity pair ratios would blow up on me.
 
User avatar
kfcnhl
Topic Author
Posts: 9
Joined: July 28th, 2009, 3:56 pm

Looking for ideas to identify a certain pattern

November 25th, 2011, 1:54 pm

Which measure of dispersion should I choose between mean difference and standard deviation in this scenario?