Because markets fluctuate, there will always be some rise and some fall (e.g. 
rise > 0 and fall >0) in each period, but these are not necessarily meaningful 
signals. You need to establish some  thresholds ( i.e. rise > .2 and fall  > .2 
then buy). One way to establish those thresholds is to use empirical approach: 
set them as parameters in JBT and use JBT's parameter optimization utility.
--------------------------------------------
Another way is statistical. In a random market you would expect both, rise and 
fall equal to .5. 


Compute the standard deviation of rise and fall in the trailing 30 or more 
periods. 


The value of standard deviation will be less than .5 (if you get a larger 
number, you have made a mistake somewhere). If your standard deviation is .15 
and your present value of rise is .8 or more, then your rise this period is 
greater than 95% of rises observed before. (  (.8 - .5) / .15 = 2 , i.e you are 
two standard deviations away from the average and that means that 95 % of 
values 
are less than that).

That means that the price experienced significant rise.
Same with the fall.

If both, the rise and the fall were significant, you have had a peak.
---------------------------------------------------

Another way is to rank the rises and falls in the last 30 windows and if the 
ranks of your present rise and fall are in the top 5 % of all ranks, you have 
had a peak.



________________________________
From: Javier <[email protected]>
To: JBookTrader <[email protected]>
Sent: Fri, January 7, 2011 12:05:52 PM
Subject: [JBookTrader] Re: peak and reversal detection -> help needed

> rise = (max - first)/(max - min)
> fall = (max - last)/(max - min)
>
> The values of the above ratios will be between 0 and 1. The first ratio will
> tell you if the tension has been rising and how much. The second if it
> subsequently fell and how much. Define thresholds for each ratio that are
> meanignful to you (I would recommend using some multiple of the standard
> deviation of the tension over the window to avoid spurious signals due to
> changing volatility). 
>
> IF rise > threshold and fall > threshold THEN peak = true


Astor, I like your approach and currently I'm testing it but I don't
have a clear idea on setting the threshold to some multiple of the
standard deviation (STD).

E.g. if rise & fall range between 0-1 and the STD can range between
0-9 (or more), which should be the threshold to match both parameters?

-- 
You received this message because you are subscribed to the Google Groups 
"JBookTrader" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jbooktrader?hl=en.


      

-- 
You received this message because you are subscribed to the Google Groups 
"JBookTrader" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jbooktrader?hl=en.

Reply via email to