Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 600 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 2 of 3 1 2 3
Re: Market Meanness Index [Re: bfleming] #445734
09/22/14 11:32
09/22/14 11:32
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
We've tested this also, but it won't improve a CT strategy. Reason is that "more mean" can also mean "more random".

Re: Market Meanness Index [Re: jcl] #449494
03/22/15 10:48
03/22/15 10:48
Joined: Feb 2015
Posts: 45
Italy
forexcoder Offline
Newbie
forexcoder  Offline
Newbie

Joined: Feb 2015
Posts: 45
Italy
Thanks Jcl for the code. You are GREAT!!!!!

Re: Market Meanness Index [Re: forexcoder] #449500
03/22/15 14:21
03/22/15 14:21
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
Good work, but please, some marketing please! You should have called it Market Madness Index laugh

Re: Market Meanness Index [Re: MatPed] #449512
03/22/15 17:59
03/22/15 17:59
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Quote:
The theory behind it is that in a completely uncorrelated price series, the probability of a price to revert to the mean is exactly 75%

Can someone please tell me where this statement comes from? A hint to its math. base might be also sufficient.

Thanks, Sphin

Re: Market Meanness Index [Re: Sphin] #449525
03/23/15 03:48
03/23/15 03:48
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline
Senior Member
boatman  Offline
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
Quote:
The theory behind it is that in a completely uncorrelated price series, the probability of a price to revert to the mean is exactly 75%


Uncorrelated with what? Or are you referring to a random walk process?

Re: Market Meanness Index [Re: boatman] #449576
03/24/15 15:09
03/24/15 15:09
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Yes. Uncorrelated with itself, i.e. Price(today) has no correlation to Price(yesterday). Then you'll get the 75% mean reversion probability.

You can prove this with a simple geometrical consideration. Suppose you have a set of today's prices Pt, and a set of yesterday's price Py. By definition, half the prices from Pt are below the median and half are above the median; same for Py. Now combine the two sets to a 2 dimensional set of vectors with coordinates (Pt,Py). Every such vector represents a possible price change from Py yesterday to Pt today. This set of price changes can then be split by the median lines into 4 sub-sets:

1. (Pt < Median, Py < Median)
2. (Pt < Median, Py > Median)
3. (Pt > Median, Py < Median)
4. (Pt > Median, Py > Median)

The 4 subsets have exactly the same number of elements when Pt and Py are uncorrelated. The value of the median does not matter.

Now, mean reversion, or more precisely moving in direction to the median value means the following condition:

(Pt > Py and Py < Median) // yesterdays Price was below the median and rises, i.e. todays price is higher
or
(Pt < Py and Py > Median) // yesterdays Price was above the median and falls


The first condition is fulfilled in half of subset 1 (the other half had Pt < Py) and in the full subset 3 (because Pt > Py always in subset 3). So, this happens for 1/2*1/4 + 1/4 = 3/8 of all elements.

The second condition is fulfilled in half of subset 4 (the other half had Pt > Py) and in the full subset 2 (because Pt < Py always in subset 2). This is true for another 3/8 of all elements.

3/8 + 3/8 = 6/8 = 75%.

Re: Market Meanness Index [Re: jcl] #449624
03/26/15 02:47
03/26/15 02:47
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline
User
GPEngine  Offline
User
G

Joined: Sep 2013
Posts: 504
California
Then, would it be accurate to say
"The theory behind [MMI] is that in an uncorrelated price series, the probability of a price to revert to the median on the next sampled bar is exactly 75%"

Re: Market Meanness Index [Re: GPEngine] #449630
03/26/15 14:39
03/26/15 14:39
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline OP

Chief Engineer
jcl  Offline OP

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Yes, that is correct.

Re: Market Meanness Index [Re: jcl] #449671
03/27/15 22:55
03/27/15 22:55
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline
User
Sphin  Offline
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Sometimes I need a little longer, sorry for that. But mean reversion can be tricky and I'm interested in understanding your derivation.

Quote:
Suppose you have a set of today's prices Pt, and a set of yesterday's price Py. By definition, half the prices from Pt are below the median and half are above the median; same for Py.

You are talking of 2 sets of prices Pt/Py like in bars of today/yesterday and there are 2 medians, one for the set Pt and one for the set Py?

Quote:
Now combine the two sets to a 2 dimensional set of vectors with coordinates (Pt,Py).

Combining arbitrarily or each one of Pt with each one of Py?

Thanks, Sphin

Re: Market Meanness Index [Re: Sphin] #449674
03/28/15 03:16
03/28/15 03:16
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline
User
GPEngine  Offline
User
G

Joined: Sep 2013
Posts: 504
California
The 2 medians should be substantially the same. The Py is calculated from all the same values as Pt, except 2, at the edges. So is safe to speak of only one median.

... and in pairs in the natural order so that the sense of each pair is (Pt,Py), over time.

Page 2 of 3 1 2 3

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1