PureBytes Links
Trading Reference Links
|
Hi Kut2k2,
Thanks for your reply.
A friend of mine who is statistician told me it would be interesting to use
the median. But, with the standard language, it seems difficult to
implement.
Regards,
Karile
----- Original Message -----
From: "kut2k2" <kut2k2@xxxxxxxxx>
To: <Metastockusers@xxxxxxxxxxxxxxx>
Sent: Friday, May 09, 2003 4:38 AM
Subject: [Metastockusers] Re: How to calculate this ?
> --- In Metastockusers@xxxxxxxxxxxxxxx, "Karile" <karile@xxxx> wrote:
> >
> > Hi Kut2k2,
> >
> > Thanks for your reply.
> >
> > As you said, I think it is going to be difficult to implement in
> Metastock.
> > The formula you gave to me is different.
> >
> > The main purpose is to classify (ascending order) a time series (ie
> : 100
> > values) and then pick the 50th(x) and 51th(y) values.
> >
> > Then, the result (median) would be :(x+y)/2
> >
> > The median returns a number which divides in two the sample (values
> above
> > it/below it).
> >
> > Thanks for your help,
> >
> > Regards,
> >
> > Karile
>
> Hi again, Karile.
>
> Sometimes I'm too subtle for my own good. What I should have said was
> that a 100-bar median filter would be a lot of work for very little
> gain (if any) over an ordinary 100-bar MA. FWIW I personally would use
> a 3-bar median filter followed by an MA of the length you desire. And
> you might want to ask yourself what's so special about '100'. Are you
> just copying what some trading "guru" recommended without really
> thinking about whether it makes sense for your needs? One final piece
> of trading advice I can offer you: Question everything you read and
> hear.
>
> HTH,
> kut2k2
>
> > ----- Original Message -----
> > From: "kut2k2" <kut2k2@xxxx>
> > To: <Metastockusers@xxxxxxxxxxxxxxx>
> > Sent: Tuesday, May 06, 2003 6:44 PM
> > Subject: [Metastockusers] Re: How to calculate this ?
> >
> > > --- In Metastockusers@xxxxxxxxxxxxxxx, "Karile" <karile@xxxx>
> wrote:
> > > >
> > > > Hi,
> > > >
> > > > I would like to know if it is possible with Mestatock to
> calculate a
> > > median
> > > > (statistically speaking) :
> > > >
> > > > The median is the middle number (value) in any given set of
> numbers
> > > (values)
> > > > :
> > > >
> > > > For example :
> > > >
> > > > A set of values :
> > > >
> > > > 20 45 10 3 90 19
> > > >
> > > > 1) We have to classify (rising order) these values : so
> > > >
> > > > 3 10 19 20 45 90
> > > >
> > > > 2) Because we have an even set of numbers ( 6 values) :
> > > >
> > > > We take the value 19 and the value 20 :
> > > >
> > > > (19+20)/2 = 19.5 = MEDIAN
> > > >
> > > > 3) for an odd set of numbers
> > > >
> > > > Let's take the same set of numbers but with 5 values (odd
> number) :
> > > >
> > > > 20 45 10 3 90
> > > >
> > > > We classify :
> > > >
> > > > 3 10 20 45 90
> > > >
> > > > MEDIAN = 20 (the number which divides in two the set of numbers)
> > > >
> > > >
> > > > Is it possible to do the same thing thing with Metastock (I
> would
> > > like to do
> > > > it with 100 values) ?
> > > >
> > > > Any help appreciated,
> > > >
> > > > Regards,
> > > >
> > > > Karile
> > >
> > > Hi, Karile
> > >
> > > I don't know what exactly your intention here is of course but if
> your
> > > 100 values represent the lookback period of a time series, you're
> > > probably defeating your purpose. A 100-bar median filter would
> have
> > > approximately the same result as a 100-bar moving average with the
> > > same disadvantage: about 50 bars of lag.
> > >
> > > I use a 3-bar median filter as a "prefilter" or "preprocessor"
> when I
> > > make indicators of price velocity in order to "snap off the
> jaggies"
> > > because velocity is noisier than raw price. The cost is only one
> bar
> > > of lag, but that is more than paid back by being able to use a
> shorter
> > > MA on the smoother output of the prefilter.
> > >
> > > There is a general-purpose median algorithm somewhere on the Net
> but
> > > it is pretty complicated and probably involves looping. For short
> > > medians, there are more efficient algorithms.
> > >
> > > For the 3-bar median filter:
> > >
> > > Median := Max(Max(Min(P, Ref(P,-1)),Min(P, Ref(P,-2))),
> Min(Ref(P,-1),
> > > Ref(P,-2)));
> > >
> > > HTH,
> > > kut2k2
>
>
>
>
> To unsubscribe from this group, send an email to:
> Metastockusers-unsubscribe@xxxxxxxxxxx
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/uetFAA/zMEolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|