[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Re: Theta model



PureBytes Links

Trading Reference Links



Comments below,

Regards
MG Ferreira
TsaTsa EOD Programmer and trading model builder
http://tsatsaeod.ferra4models.com
http://www.ferra4models.com

--- In equismetastock@xxxxxxxxxxxxxxx, "Jose" <josesilva22@xxxx> wrote:
> 
> Please excuse my ignorance, but curiosity knocks:
> 
> 
> "...but I think that will not apply to most series studied in 
> Metastock."
> 
> Why not?

I think most people use Metastock for end-of-day or financial market
data, where there usually is not a clear seasonal trend.  I know
there are exceptions, but 'usually'....

> And what is an "optimal exponential moving average"?
> 

One where the exponential decay weight is optimised for.  This is
what many people will understand as an exponential moving average or
exponential smoothing.  Technical analysis guys do not optimise for
this weight, they specify it either by giving the length parameter
or, if the software allows it, explicitly giving the weight.

> 
> "The long term component can be interpreted as the long term or true
> value of the market, say where the market is supposed to be based on
> fundamentals."
> 
> All this from a Time Series Forecast indicator... What kind of 
> fundamentals are you referring to?
> 

Note the 'say where the market is supposed....'  Of course, no real
fundamentals are used, but it makes it nice and practical to
interpret it that way.  Note the tsf function is used as a proxy,
the real theta model is slightly more sophisticated.  I think it is
not too difficult to implement it correctly in Metastock actually,
at least the long term portion, but we often use this same approach
in practise for a variety of reasons.

> 
> Is this (Theta) theoretical stuff, or does it apply to trading the 
> real markets?  If so, does it work?
> 

Not entirely sure what you mean with 'theoretical' vs 'real markets'
and 'does it work'?  Are these supposed to be exclusive concepts?

But, acting on what I suspect you have in mind.....

Of course it works.  In a scientific study, refered to before, this
model was found to be one of the best forecasting models when
compared to many others.  3003 series from all walks of life,
financial, economic, demographic, bussiness etc. was tested, in
many different frequencies (daily, monthly etc.) and the Theta model
really fared well.  It was pitched along side every conceivable
exponential moving aveage technique (figuratively speaking), neural
networks, RBF models and others and outperformed the lot.  It is all
in that article that I referred to before if you need to check the
salient details.

Now there is a big difference between forecasting and trading, but,
if you apply the Theta model correctly, it will work in trading too.
The code I posted does not implement it as theory dictates, but is a
practical enough implementation for Metastock to handle it, yet still
in the spirit of the default Theta model (theta = 0, 2).

We usually use both the Theta lines and the Theta projection itself,
as well as an extrapolation of the latter, and had excellent results
with it.  Using the three lines referred to is a lot like using three
indicators at the same time - it gives lots of additional information
but adds a bit of subjectivity as well, which is often nice in a real
trading environment.

Finally, since I claim that, if used correctly, it will work, please
note that the usual disclaimer applies ;-) I cannot nor do I
guarantee that it will work in any circumstances and can assure you
that it sometimes won't work, even in the most ideal of circumstances,
but it sure is worth a try.

> 
> jose '-)
> http://www.metastocktools.com
> 
> 
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, "MG Ferreira" <quant@xxxx> 
> wrote:
> > 
> > 
> > Hi there,
> > 
> > Some people have asked about the Theta model.  I have not used the
> > Theta in Metastock before, but made a quick and dirty implementation
> > of it which you will find below.  The Theta model decompose the 
> series
> > into two components, a long and a short term one.  If you use 
> monthly
> > data, then it has a third component, which is the seasonality, but I
> > think that will not apply to most series studied in Metastock.  In 
> the
> > default Theta model implementation, you have theta = 0 (long term) 
> and
> > theta = 2 (short term) and you fit an optimal exponential moving 
> average
> > to the short term, but to do this in Metastock will be quite 
> difficult.
> > 
> > The long term component can be interpreted as the long term or true
> > value of the market, say where the market is supposed to be based on
> > fundamentals.  The short term component is where the market finds
> > itself based on shorter term factors.  Thus the shorter term factors
> > pushing it away from the long term line.  The projection itself is
> > exactly midway between the long and short term lines.
> > 
> > Anyhow, we normally use both the short and the long term lines in
> > strategies, as well as extrapolate the theta line itself, which is
> > very easy to do (but difficult in Metastock).
> > 
> > Regards
> > MG Ferreira
> > TsaTsa EOD Programmer and trading model builder
> > http://tsatsaeod.ferra4models.com
> > http://www.ferra4models.com
> > 
> > ------------------- Theta model Metastock code follows
> > 
> > {MG's implementation of the Theta model
> > 
> >  This is not an exact implementation,
> >  it e.g. does not optimise the theta = 2
> >  weight, assumes a theta = 2 line (as is
> >  usually assumed, reducing the whole model
> >  to a linear fit and an exponential fit to
> >  the residuals for the theta = 0 and
> >  theta = 2 lines) and the theta = 0 is not
> >  really a straight line, but the last value
> >  of length amount of straight lines fitted
> >  to the data.  But the spirit of the model
> >  is the same as that of the real theta.
> > 
> >  This is actually a forecasting model, thus
> >  the theta line is a projection of where the
> >  price is supposed to go to.  To use in
> >  practise, take it as a type of moving average.
> >  Thus if the price cross it, buy as if the price
> >  just cross above a moving average and vice
> >  versa.
> > 
> >  MG Ferreira
> >  2005
> >  http://www.ferra4models.com
> >  http://tsatsaeod.ferra4models.com
> > }
> > 
> > {Length to use when fitting}
> > length:=Input("Length",5,1000,50);
> > 
> > {Theta long term line, assume theta=0, sort of...}
> > lt:=TSF(CLOSE,length);
> > 
> > {Theta short term, assume theta=2, sort of...}
> > rs:=CLOSE-lt;
> > st:=lt+2*Mov(rs,length,E);
> > 
> > {Theta}
> > (lt+st)/2








------------------------ Yahoo! Groups Sponsor --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/