Forex Factory
  • Login

  • Username: Password:
  • 4:33am

  • Search
  • Home

  • Forums

  • Trades

  • Calendar

  • News

  • Market

  • Brokers

Options

Search
Search
Search

Subscribe to Thread

Bookmark Thread

First Page First Unread Last Page Last Post

Printable Version

Similar Threads

Changing an indicators colour depending on its value . . . 0 replies

Colour ADX Indicator depending on value 0 replies

EA wanted for sound alert depending on fractals condition 2 replies

  • Trading Discussion
  • /
  • Reply to Thread
  • 3

Probability depending on distance

  • Last Post
  • First Unread
  •  
  • 1 Page 2
  •  
  • Post# 21
  • Quote
  • Jan 3, 2013 6:42pm
  • FXEZ
    Joined Jan 2007 | 609 Posts | Status: developing...
Quoting Custos
okay, random markets anyways don't exist, but just for the sake of discussion: I think your premise is wrong (for truly random markets).
If we are talking about truly random markets, then each (e.g.) 10 pip move up or down should always have a 50% chance. For example: price moves up 10 pips, then it moves up another 10 pips, then it moves down 10 pips.
Each 10 pip move here has a 50% chance of occuring, and is not dependent on the move that happened beforehand (if we talk about truly random markets).
I did a little test on one month of data on EU in R. The data was fairly balanced up and down with mean reverting tendencies over the period. In total there were 522 10 pip moves with 260 up and 262 down, so close to 50/50 (49.8% up)
Attached Image (click to enlarge)
Click to Enlarge

Name: EU 1 Month.png
Size: 5 KB



Quote
For mean reversion strategies to work, our premise has to be that after a 10 pip move up, a 10 pip move down is more likely to occur than another 10 pip move upwards. But this is then not a random market at all.
Based on the above, I computed the statistics following an up 10 pip move: What is the probability of a 10 pip down move? Of the 260 up moves, 142 or 54.6% were followed by a 10 pip down move. Of the 261 completed down moves (the last move was down and is excluded), 141 were followed by an up move of 10 pips or 54%.

The total % over this one month period was thus 54.3% that a 10 pip move would reverse 10 pips rather than continue another 10 pips in the same direction.

This leads me to believe that there is a slight advantage to a zero intelligence mean reversion strategy such as the one you describe above based on a 10 pip move. However, the probabilities change based on the pip movement amount chosen.
  • Post# 22
  • Quote
  • Jan 3, 2013 6:55pm
  • Custos
    Joined Dec 2006 | 3,553 Posts | Status: Member
the probabilities will probably also change when you look at other months and instruments.

Quoting FXEZ
I did a little test on one month of data on EU in R. The data was fairly balanced up and down with mean reverting tendencies over the period. In total there were 522 10 pip moves with 260 up and 262 down, so close to 50/50 (49.8% up)
Attachment 1109566




Based on the above, I computed the statistics following an up 10 pip move: What is the probability of a 10 pip down move? Of the 260 up moves, 142 or 54.6% were followed by a 10 pip down move. Of the 261 completed down moves (the last move was down and is excluded), 141 were followed by...
  • Post# 23
  • Quote
  • Jan 3, 2013 7:05pm | Edited at 7:52pm
  • FXEZ
    Joined Jan 2007 | 609 Posts | Status: developing...
I reran the test on more data (about 4 months), this time splitting the data into two periods (before/after the red line).
Attached Image (click to enlarge)
Click to Enlarge

Name: EU 4 Months.png
Size: 5 KB


As you can see the first period contains a more trendy period, with 52% of 10 pip moves up, while the period after the red line is evenly balanced at 50/50.

The first period showed signs of trending. Up periods were followed by down periods and down periods were followed by up periods only 48% of the time.

In the second period the data is more mean reverting (includes some of the data from the previous post) at 54%.

Summary
First half: So during a more up trendy period (52% up 10 pip periods) there were more up than down moves and the moves tended to continue rather than revert by a slight margin (48% mean reverting or in other words 52% trend continuing).

Second half: During the more sideways movement (50% up 10 pip periods), there were an even number of up/down periods and more of a mean reverting tendency (54% mean reverting).
  • Post# 24
  • Quote
  • Jan 4, 2013 6:31am | Edited at 6:41am
  • ~bull.bear~ ● Online
    Joined Sep 2012 | 443 Posts | Status: Trade Smart !!!
Here is another useful information. I have coded VBA software to analysis the historical data. Below is part of the statistical analysis outcome. You also could find my FULL statistical analysis result at my thread "My Unique Analysis".

I take uptrend scenario for the duration as shown in screenshot. You also could view daily chart for confirmation.
Please note this is not including spread.

Legend
OH: Distant from Open to High
OL: Distant from Open to Low
CO+: Distant from Close above open
CO-: Distant from Close below open


Long and Short
Open position at daily open GMT 0000.

Long
SL: -0.70% of open price (89% Occupancy does not touch SL)
TP: 0.35% of open price (63% Occupancy touch TP)

Short
SL: 0.70% of open price (88% Occupancy does not touch SL)
TP: -0.35% of open price (63% Occupancy touch TP)


Average Expectancy
E = (0.35/2 x 0.63) - (0.70 x (1-0.885)) = 0.1102 - 0.0805 = 0.03% of open price (0.03% x 1.30 = +0.0039 pips)

I take 0.35/2 for average TP to be touch. And 0.885 is average of long and short SL (0.89+0.88)/2. The result will be around 30 pips earning per trade.
Thanks.
Attached Image (click to enlarge)
Click to Enlarge

Name: Untitled.jpg
Size: 121 KB
**Keep Simple**
  • Post# 25
  • Quote
  • Jan 4, 2013 7:02am
  • Gumrai
    Joined Oct 2012 | 685 Posts | Status: Member
I'll leave you guys to it.
This thread has now gone way beyond my level of comprehension.
Bull.bear, I see your signature and I have to smile
  • Post# 26
  • Quote
  • Jan 4, 2013 7:19am
  • ~bull.bear~ ● Online
    Joined Sep 2012 | 443 Posts | Status: Trade Smart !!!
Quoting Gumrai
I'll leave you guys to it.
This thread has now gone way beyond my level of comprehension.
Bull.bear, I see your signature and I have to smile

....OK. My past trade and experience did not allow me to keep simple. Did struggle for trading solution and high probability setup, looked for those repeating pattern. Maybe after i have those information, now think that trading is simple and may keep whatever system as simple as possible.


However this analysis is just for the assumption, i think real trade would not have the similar result. I have tried to backtest it as the above example but of course it do better without spread, but real life isn't. So i don't find it useful now for the statistical analysis, instead looking for another pattern. Now i focus on trend and SR. This would be better than anything.
**Keep Simple**
  • Post# 27
  • Quote
  • Jan 4, 2013 7:43am
  • Gumrai
    Joined Oct 2012 | 685 Posts | Status: Member
Quoting ~bull.bear~
....OK. My past trade and experience did not allow me to keep simple. Did struggle for trading solution and high probability setup, looked for those repeating pattern. Maybe after i have those information, now think that trading is simple and may keep whatever system as simple as possible.


However this analysis is just for the assumption, i think real trade would not have the similar result. I have tried to backtest it as the above example but of course it do better without spread, but real life isn't. So i don't find it useful now for the statistical...
You are obviously a very smart person.
Your previous post might as well as been in chinese as I understood none of it.
But that's my shortcomings, not yours
Now I will definitely leave this thread as my brain won't allow me to understand and I have nothing to contribute.
  • Post# 28
  • Quote
  • Jan 4, 2013 8:45am
  • PipMeUp
    Joined Aug 2011 | 130 Posts | Status: Member
Quoting Custos
For mean reversion strategies to work, our premise has to be that after a 10 pip move up, a 10 pip move down is more likely to occur than another 10 pip move upwards. But this is then not a random market at all.
Not exactly. Wikipedia explains it much better than I could http://en.wikipedia.org/wiki/Random_walk section One-dimensional random walk.
If you read French, their explanation is clearer.

It is true that markets aren't random walk but for example 7bit tried to build such a market here http://www.forexfactory.com/showthread.php?t=262827 . His idea is to produce a synthetic instrument by the way of a basket of pairs in such a way he removes (best effort) the trend. By rebalancing this basket he tries to keep this instrument the right side of FXEZ's red line. I didn't try it.
  • Post# 29
  • Quote
  • Jan 4, 2013 9:09am
  • Custos
    Joined Dec 2006 | 3,553 Posts | Status: Member
Quoting PipMeUp
Not exactly. Wikipedia explains it much better than I could http://en.wikipedia.org/wiki/Random_walk section One-dimensional random walk.
If you read French, their explanation is clearer.
Okay, I read that, and I still don't get how a mean reversion strategy should work on totally random markets. Sorry, I am too stupid for this. For mean reversion strategies to work, the probability to getting to the point of origin always has to be higher than the probability of getting further away from the point of origin.

Anyways, sorry for my stupidity.
  • Post# 30
  • Quote
  • Jan 4, 2013 10:35am
  • PipMeUp
    Joined Aug 2011 | 130 Posts | Status: Member
Quoting Custos
Okay, I read that, and I still don't get how a mean reversion strategy should work on totally random markets. Sorry, I am too stupid for this. For mean reversion strategies to work, the probability to getting to the point of origin always has to be higher than the probability of getting further away from the point of origin.

Anyways, sorry for my stupidity.
Say you're in the middle of a (very big) stair. You flip a coin to know where to go. head=UP, tail=DOWN, one step at a time. After a big enough coin flipping you will have got as many heads than tails. It means you went up as much as you went down. So, in average, you are back to square 1.
Additionally after N coin flips you will have 95% chance of being within 2.sqrt(N) steps away from your starting point: you will never be very far away of your starting point. If you are that far I can bet with high probability that you will return to where you come from before you go much further. => I could trade some sort of Bollinger Band or Keltner Channel in a never ending range.
  • Post# 31
  • Quote
  • Jan 4, 2013 11:33am
  • Custos
    Joined Dec 2006 | 3,553 Posts | Status: Member
Quoting PipMeUp
Say you're in the middle of a (very big) stair. You flip a coin to know where to go. head=UP, tail=DOWN, one step at a time. After a big enough coin flipping you will have got as many heads than tails. It means you went up as much as you went down. So, in average, you are back to square 1.
Additionally after N coin flips you will have 95% chance of being within 2.sqrt(N) steps away from your starting point: you will never be very far away of your starting point. If you are that far I can bet with high probability that you will return to where you...
I still disagree. The outcome of the last coin flip does in no way influence the outcome of the next coin flip. I always have a 50% chance of flipping either heads or tails. So guess what, if I flipped heads 100 times in a row then in my next flip I still only have a 50% chance of flipping either heads or tails for my next try. The future outcome is not dependent on the last outcomes in this case, cause each coin flip is an independent event. That's also why a mean reverse strategy doesn't work in roulette as well. If there were ten reds in a row, it doesn't mean the the probability is now higher for black to be hit, because again it is an independent event.

Of course if you were to flip a coin an infinite amount of times, then you are right. But since we can do that only a finite amount of time, the distributions can be very different in each set of say 10.000 coin flips in a row.
  • Post# 32
  • Quote
  • Jan 4, 2013 11:49am
  • pemully
    Joined Aug 2011 | 581 Posts | Status: Member
what I found pervasively funny is that the average Joe trader performs significantly worse than random...how does that happen?
  • Post# 33
  • Quote
  • Jan 4, 2013 11:56am
  • nubcake
    Joined Oct 2009 | 2,372 Posts | Status: schadenfreude tastes like joy
Quoting pemully
what I found pervasively funny is that the average Joe trader performs significantly worse than random...how does that happen?
not taking profit and then getting stopped-out instead. i believe it's just that simple.
  • Post# 34
  • Quote
  • Jan 4, 2013 11:58am
  • FXEZ
    Joined Jan 2007 | 609 Posts | Status: developing...
Quoting PipMeUp
Not exactly. Wikipedia explains it much better than I could http://en.wikipedia.org/wiki/Random_walk section One-dimensional random walk.
If you read French, their explanation is clearer.
Yes you are right, the French version (even translated by Google) was clearer than the English description. Thanks for the tip.

Quote
To form a concrete example, one can imagine an individual (or "particle") on a staircase, which takes a coin to decide whether the next move will be up or down. At each stage, there are only two choices: in this example, a step forward or a step back. The only free parameter of the problem is a real number p such that: 0 <p <1 . The physical interpretation of this parameter is as follows:
p represents the probability that the particle makes a jump forward at all times.
q = 1 - p is the probability that the particle makes a jump back at any time.
The...
Quote
Obtained such an order of magnitude of the spreading cloud of participants: for example it is expected that about 95% of participants have remained in 20 steps or less of the initial position (20 = 2*sqrt(100) ).
If you can create a stationary series with a fixed mean and variance then you effectively have a deterministic system, such as a sine wave.

Quote
It is true that markets aren't random walk but for example 7bit tried to build such a market here http://www.forexfactory.com/showthread.php?t=262827 . His idea is to produce a synthetic instrument by the way of a basket of pairs in such a way he removes (best effort) the trend. By rebalancing this basket he tries to keep this instrument the right side of FXEZ's red line. I didn't try it.
  • Post# 35
  • Quote
  • Jan 4, 2013 12:05pm
  • FXEZ
    Joined Jan 2007 | 609 Posts | Status: developing...
Quoting Custos
I still disagree. The outcome of the last coin flip does in no way influence the outcome of the next coin flip. I always have a 50% chance of flipping either heads or tails. So guess what, if I flipped heads 100 times in a row then in my next flip I still only have a 50% chance of flipping either heads or tails for my next try. The future outcome is not dependent on the last outcomes in this case, cause each coin flip is an independent event. That's also why a mean reverse strategy doesn't work in roulette as well. If there were ten reds in a row,...
So this is the reason you want to apply your strategy to a series with a fixed mean. If the mean is not moving you can still compute your confidence interval in advance and effectively "know" ahead of time how far the series will extend before reverting. If further your series has a fixed variance then you truly do have a deterministic system as your series is now stationary.
  • Post# 36
  • Quote
  • Jan 4, 2013 12:08pm
  • FXEZ
    Joined Jan 2007 | 609 Posts | Status: developing...
Quoting pemully
what I found pervasively funny is that the average Joe trader performs significantly worse than random...how does that happen?
How about this?

Quote
How many times will a random walk cross a boundary line if permitted to continue walking forever? A simple random walk Z will cross every point an infinite number of times. This result has many names: the level-crossing phenomenon, recurrence or the gambler's ruin. The reason for the last name is as follows:
Quote
a gambler with a finite amount of money will always lose when playing a fair game against a bank with an infinite amount of money. The gambler's money will perform a random walk, and it will reach zero at some point, and the game will be over.
http://en.wikipedia.org/wiki/Random_walk
  • Post# 37
  • Quote
  • Jan 6, 2013 12:54pm
  • PipMeUp
    Joined Aug 2011 | 130 Posts | Status: Member
Quoting Custos
I still disagree. The outcome of the last coin flip does in no way influence the outcome of the next coin flip. I always have a 50% chance of flipping either heads or tails. So guess what, if I flipped heads 100 times in a row then in my next flip I still only have a 50% chance of flipping either heads or tails for my next try. The future outcome is not dependent on the last outcomes in this case, cause each coin flip is an independent event. That's also why a mean reverse strategy doesn't work in roulette as well. If there were ten reds in a row,...
I'm quite bad at explaining things... First you are right on all the points. The idea is not to bet the next step is going to be up or down nor red because of a long sequence of black. That's is 50/50 per definition. Because of this 50/50 I know you will go up as many times as you will go down. So in average you don't move. This process has a mean and it is the step 1. You are right that you can still go anywhere. In fact doing it long enough you will visit each and every steps of this imaginary stair. But Central Limit Theorem says you will visit step 1
more often than any other. I know where you go. This is the mean reversion. Intuituvely the longer you are above the more likely you will go below to "balance" things. To go below you have to cross the mean: go to step 1 and hit my target.

Now the variance is small in comparison to the number of moves. 2sqrt(n) is quickly small compared to n. I could use a variance SL (volatility stop). If you are 100 steps away from step 1 I can bet 20 to win 100. RRR=1:5. If you are 10000 steps away, I bet 200 to make 10000. RRR becomes 1:50. Not only the further you are the higher my probability but my RRR also increases! A alternate universe where martingale would make sense! Sure enough I can still get a long string of losers. I can even go broker.

I have another card to play! The process has no memory. I can always pretent that the step 1 is the step you were just a few time ago. No need to trade an infinity of time.

Someone could argue that it is a pointless waste of time to design a strategy in this imaginary world... I don't think so. The real life application is that it shows that mean reversion stategies require both a small variance and of course a mean. It gives the context in which a mean rev. strategy works. The distribution of the market is not Gaussian. It is more like a Cauchy distribution. But a Cauchy distribution has no mean and an infinite variance! It is thought that the real distribution of the market is a varying stable distribution. Both the Cauchy and the Gaussian are a special case of the stable distributions. It means that sometimes the market is Gaussian or at least Gaussian enough for this strategy. It shows that a range is a required condition (to have a fixed mean) yet not sufficient (see Dickey–Fuller test for more fun).
  • Post# 38
  • Quote
  • Last Post: Jan 7, 2013 5:28am
  • PipMeUp
    Joined Aug 2011 | 130 Posts | Status: Member
Quoting pemully
what I found pervasively funny is that the average Joe trader performs significantly worse than random...how does that happen?
If the markets aren't Gaussian their distribution is quite symetrical, esp. FX. So at a low scale (a few pips move) you're still flipping a coin.

Average Joe trades the M5. True men trade the TICK you know. He targets 20 pips no more. He isn't greedy. That's bad. Yet he trades his 500 bucks account for the million dollars.

He doesn't want to let the time to the profits to grow or stay in the market too long. That's too much opportunities for the profits to vanish. Of course never overnight that's too much... random. (Monsters in the dark?). Joe knows that you don't go broke by taking profits (I let you Google this one). He cuts the winners quick to bank pips and let the losers run to have a high win/loss ratio to show up.

Joe loves his 1:1 reward/risk ratio. That's simple and comforting. He doesn't need more because he has an edge. He knows that 51% is enough to make millions... He isn't interested in the variability of his system. That sometimes it performs 53% and sometimes 47% only. Bernouilli trials, sequence of losers, maximal DD, variance and the like that's too complicated maths. Joe knows a KISS system is the best.

Joe knows he is safe because he has got a fantastic MM. He trades 1% of his account. No more. He trades like a pro. He doesn't waste his time paper trading to see what a win-loss-win sequence results in. Yet if you have a look... The winner increases the account. The next bet size is therefore bigger. The loser then loses more than the winner just banked. Now the account is smaller than at the starting point. The next bet size is smaller. Thus the next winner doesn't cover the loss. win-loss-win makes less than the first win. But Joe knows he can increase his leverage up to 400:1. He will quickly recover the loss...

Trading 50/50 with 1:1 RRR you merely bet your can keep your money. And you pay the spread to play this insane game.
Thread Tools Search this Thread
Show Printable Version Show Printable Version
Email This Thread Email This Thread
Search this Thread:

Advanced Search

  • Trading Discussion
  • /
  • Probability depending on distance
  • Reply to Thread
    • 1 Page 2
1 trader viewing now

©2013 Forex Factory, Inc. / Terms of Use / Privacy Policy

Forex Factory® is a registered trademark.

Connect

  • Facebook
  • Twitter
  • RSS

Company

  • About FF
  • FF Blog
  • Careers at FF
  • Advertising
  • Contact FF

Products

  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer

Website

  • Homepage
  • Search
  • User Guide
  • Member List
  • Online Now
  • Report a Bug