range vs trend and how to predict it

Yes, exactly, I used an array formula in excel, and I calculated the range between midnight and 9.30 am. Same for volume. It can all be done at the functions level. No need for vba.
 
travis, i missed what sample period you are using - i saw you posted something for 2005-2006 - are you just using these 300-400 daily observations? have you computed any statistical significance/confidence values for your conclusions, what are they?
 
ummm..some people use the ADX indicator to keep them out of chop...but I guess you know that...

This is what you do...run your automation on the simulator and get it to report to you what your ADX 14 values are at the time the trigger is pulled. See if you can find some relationships, correlations...or Holy Grail crumbs :)...

Ohhh....how much money I could lose if I were a programmer and an automator...but thats just me...please no replies as to how biased and unfair this post was to this forum...

Michael B.
 
Newbie2006,

I must say I'm impressed that that you know about delta thing even though you just started. Wished I was that advanced when I first started out.

BTW, what software are you using to do the calculations?

Ok, for my calculation :

Trades at ask or above ask= +ve delta and vice versa
For trades b/w bid & ask--the software will somehow allocate them to either bid or ask (maybe based on previous quote), but I think the difference should be immaterial.

The type of stocks you selected are pretty similar to mine.

Not sure what you mean by not resetting the market delta variable. I take it to mean that the definition remains the same?

The logic for market trending up= more aggressive buyers and number keeps getting higher if trend is maintained and vice versa does make sense. However, somehow my limited sample size does not necessarily agree with the above logic. In fact it seems that I can't really make a consistent and frequently occuring strategy out of this general logic.

1 of the main thing that I tend to agree with my sample size is that generally there is a positive bias on delta.

Question :You mentioned that if the delta is around 30% of the average volume needed to move the stock one cent, you will consider it as marketdelta being zero? Can you elaborate how you come out with the 30%? Thanks.

Well, at least this is my experience with delta. Hope this helps.


Quote from newbie2006:

billp,
let me elaborate more.

First let me clarify how I count market delta:

1- I define a variable "currentMidLine" its simply (bidPrice+AskPrice)/2 , of course this value changes whenever level1 quote changes, ie whenever the bid or the ask changes.

2- I watch for all the prints (all ticks), if the print is above the currentMidLine I increment the marketDelta with the volume of that print and if its below the currentMidLine I decrement the marketDelta with the volume of that print

3- I don't reset this marketDelta variable ever for the day

From the above you can conclude that if the print occurs exactly midway between the bid and ask I just discard it as I have no way of knowing whether it was aggressive buyer or seller, but when a print occurs between the bid and the ask but tends to one side I count it on that side.

This marketDelta variable represents the net difference between aggressive buyers and sellers (in terms of volume) from the start of the day up until now.

so now we have 3 cases:

1- the market is trending up, this means that there are more aggressive buyers than sellers so the market delta should be a positive number and this number increases as time goes on as long as the market is still trending in this direction

2- the market is trending down, this means that there are more aggressive sellers than buyers so the market delta should be a negative number and this number increases as time goes on as long as the market is still trending in this direction

3- the market is going side ways, this means neither buyers nor sellers have upper hand and this put the net marketDelta in the zero region

Notes:
1- Saying the marketDelta is zero doesn't mean exactly zero, it means its within a range and this range is different from a stock to another, for me I consider it zero if its in a range of only 30 multiples of the average volume needed to move the stock one cent

2- For the 30 minutes I mentioned, usually the first 30 minutes are trending to define the initial range of the day, I don't consider this a part of the real trend, usually in a trending day you will find extension to this range beyond those 30 minutes, in range days you find the price fluctuating within this range.. Almost.

3- I have tested this for few volatile stocks like AAPL

This is my humble explanation and I am very interested to know your input regarding the above whether you agree or not
 
billp,
please see my comments below

Quote from billp:

Newbie2006,

I must say I'm impressed that that you know about delta thing even though you just started. Wished I was that advanced when I first started out.

I am a newbie and will always be , I believe this is the only way to keep on learning and survive in the market's massacre :)


BTW, what software are you using to do the calculations?


I use my own built software using Java, I just use the broker's api to get the quotes



Ok, for my calculation :

Trades at ask or above ask= +ve delta and vice versa
For trades b/w bid & ask--the software will somehow allocate them to either bid or ask (maybe based on previous quote), but I think the difference should be immaterial.

This is exactly what I do but my rule for allocating prints occurring between the bid and the ask is just to allocate it to the nearest side, for example the bid at $77.34 the ask at $77.35 if I get a print at $77.341 then I allocate it to the bid and vice versa, the only situation I dont count a print is when its exactly in the middle of the bid and ask or when someone is locking the quote, ie bid=ask and the print occurs at that level as I would have no way to know where to allocate it

The type of stocks you selected are pretty similar to mine.

Not sure what you mean by not resetting the market delta variable. I take it to mean that the definition remains the same?


What I mean is that I measure the net value of market delta as the day goes, the day starts with this value at zero then I keep adding and subtracting to it, this is not a market delta at specific bid or ask and is not a market delta during the last 5 minutes, its simply the market delta from the start of the day up till now, if this is still not clear I can give you a complete example

The logic for market trending up= more aggressive buyers and number keeps getting higher if trend is maintained and vice versa does make sense. However, somehow my limited sample size does not necessarily agree with the above logic. In fact it seems that I can't really make a consistent and frequently occurring strategy out of this general logic.

1 of the main thing that I tend to agree with my sample size is that generally there is a positive bias on delta.


One thing I learned in my journey, nothing is constant, but the key is to identify high probability patterns.

For example, you can see at some point the market delta increases in the positive side while the ask never goes higher, this means there is a very tough resistance, usually one very big seller sitting at that ask showing only 1 lot while hiding thousands, so this explains the situations where the common logic doesn't apply here which is breaking the ask if many people hit it



The above situation for example is a very high probability trade, just go short in this case :)

If you want to discuss strategies based on market delta I think we should dedicate other thread for it


Question :You mentioned that if the delta is around 30% of the average volume needed to move the stock one cent, you will consider it as marketdelta being zero? Can you elaborate how you come out with the 30%? Thanks.


I am sorry I wasn't clear about this one, you got me wrong.
for each stock there is a certain average number of shares needed to hit the bid or ask in order to break this level, for example the average for AAPL is round 1500, for QQQQ is much much higher, and this average is not a constant number through out the day, I calculate it as the average of the number of shares needed to break the last 50 levels

If the market delta is within the range of 30X this average I consider it zero, take AAPL for example, if the current average is 1500 shares then I consider the delta to be zero if its in the range of 1500 x 30 = 45000
you might think this is a big number to be considered zero, but actually in a trending day you will find this number to be wayyyyyy bigger than this


Well, at least this is my experience with delta. Hope this helps.


your input is always welcomed as I always try to learn from others.

And sorry for my bad language, English is not my first language


 
Travis you are doing well with your analysis. There are a few more things you may want to add so you can have 70% accuracy or better in predicting these days. I cant tell you everything, but you may also want to check out the average true range. As far as day of week analysis, you have to be careful because the market is organic. Six years ago, mondays were the best for a trending day, but the past few years it has been wednesdays. But it is a nice feature to use as confirmation and synergy. You may just want to give it a lower ranking. You could also create a matrix with all the inputs and weight them accordingly to establish a clear bias of what the probabilities are for the day.
 
hi everybody, my first post here on ET.

as i have done quite a bit of research regarding trendDays, range, etc., i’ll post some findings in the hope to provide a basis for further discussion, comments and research ideas.

i analysed the sp500 future from 1990 to 2004 (so i have an out-of-sample period beginning with 2005).
first, i calculated the “trendiness” of each bar which is defined as: (abs(open-close))/(high-low). this gives a value between 0 and 1. for instance, a doji would have a value near zero. a day that opens at the low and closes at the high would have a value of 1 (the same is true for the opposite, a day that opens at the high and closes at the low).

a trendDay is then defined as follows:

trendiness > 0.70
range > average range of the last 10 days

on average, 16.5% of all days are trendDays according to the above definition, the average trendiness of all bars was 0.471. the average high – low range was 1.34% over this time period.

the next step was to find conditions which have an influence on the trendiness, the range and the probability for a trendDay.

some interesting results:

the range is higher when prices decline. for instance, when the close is below the EMA(100), the average range is 1.74% on the next day (1261 observations), when the close is above this moving average the avg.range is only 1.14% (2522 obs). so this is a difference of more than 50%. with a p-value of 0 and a t-value of 23.4 (!) this difference is significant at all levels.

the same effect is visible when using a short term RSI over 5 days:

RSI between / avg.range / # of observations
0 – 25 / 1.9% / 302
25 – 50 / 1.5% / 1306
50 – 75 / 1.2% / 1613
75 – 100 / 1.0% / 563

while there are many effects that change the expectation for tomorrows range, the trendiness is rather difficult to forecast. using the above condition with the EMA(100), a close below the moving average increases the expectation for tomorrows trendiness (0.488) while a close above the EMA decreases it to 0.463. though this difference is significant from a statistical point of view (p-value 0.01, t-value 2.7) it is very small and probably only of little value when it comes to trading.

overall, after testing ~ 250 different conditions, the forecast for the trendiness ranges only from 0.515 to 0.435. interestingly, both the highest and the lowest value include weekday effects. if today is an upThrustDay (close above yesterdays high) and tomorrow is friday, the expected trendiness is 0.435. on the contrary, if the next day is monday and the market made 2 consecutive lower closes the expected trendiness for monday is 0.515. however, there are only 207 observations for the first condition and 164 for the second. and as previously mentioned, weekday effects might change rather often.


another interesting thing regarding trendiness and trendDays is the following observation:

while the average trendiness increases only slightly after 1 or 2 days with a low trendiness, the probability for a trendDay increases after 1 day with a trendiness below 0.30 to 19.2%, after 2 consecutive days with a trendiness below 0.30 it increases to 21.2%. this means that on average the trendiness remains small on most days, but at the same time the probability for a trendDay increases.
 
Back
Top