PureBytes Links
Trading Reference Links
|
The formula for a parabola is:
y = ax^2 + bx + c
You can get the slope of this curve at any point by taking the first
derivative d/dx and it is:
d/dx = 2ax + b
x is the time axis, y is the price axis.
The reason you need to normalize the price to some constant value is
that slope has the units of "price change per day". So if you had a
$10 stock that changed $1 you would get a slope of $1 per day. If you
had a $100 stock that changed $1 you would STILL get a slope of $1 per
day. But the $10 stock would have appreciated 10% and the $100 would
have gone up only 1%.
So I convert price change per day to % change per day by just:
100 * (close() - close(-1)) / close(-1) = % change per day
You will need some method for calculating the least squares fit to a
parabola. I used Gaussian Elimination and coded in AmiBroker Formula
Language. (Jose Silva has said it is possible in MS-FL in a previous
post.) I reduced the generalized rules of Gauss to closed form
algebraic equations for a, b, and c, which were much simpler to code
as opposed to a generalized solution.
I had trouble with the code "blowing up" occasionally. I solved it by
creating a pseudo time axis to keep the large numbers on the time axis
within reasonable values. Another work-around is to use a language
where you could control which calculations are in double precision -
like JavaScript or Fortran-90.
Ed Hoopes
--- In equismetastock@xxxxxxxxxxxxxxx, "Daniele Del Monte"
<daniele_delmonte@xxxx> wrote:
>
> Hi, how you normalize the price and how you calculate the first
derivative of the quadratic??
>
> Your idea is really interesting, I use a system on the relative
strenght on stocks, in which I normalize a particular macd
(mov1-mov2)/mov2 and than rank the stock. If someone would comment
this idea, I appreciate very much.
>
> thank in advance
>
>
> ----- Original Message -----
> From: david
> To: equismetastock@xxxxxxxxxxxxxxx
> Sent: Wednesday, November 23, 2005 9:33 AM
> Subject: RE: [EquisMetaStock Group] Re: Parabolic trend "line"
>
>
> Thanks for the info Ed, it is always interesting to here from real
traders,
> and finding out what works for them.
>
> Thanks
>
> Dave
>
>
> -----Original Message-----
> From: equismetastock@xxxxxxxxxxxxxxx
[mailto:equismetastock@xxxxxxxxxxxxxxx]
> On Behalf Of Ed Hoopes
> Sent: Wednesday, 23 November 2005 5:43 AM
> To: equismetastock@xxxxxxxxxxxxxxx
> Subject: [EquisMetaStock Group] Re: Parabolic trend "line"
>
> The goal of many indicators is to determine the true trend of the
> security in the presence of noise.
>
> MS has pre-programmed 3 indicators that fit price to a straight line:
>
> Lin Reg Ind
> Lin Reg Slope
> Lin Reg Trendline
>
> My observation was that prices rarely move in a straight line, much
> more common is that the price action is curved - like a section of a
> parabola. (A straight line is a special case of a parabola with the
> x^2 term equal to zero)
>
> After programming the fit to a quadratic, I found that it more
> accurately determined the markets trend, with significantly less lag
> than a fit to a straight line.
>
> After normalizing prices to $100 and calculating the first derivative
> of the quadratic at the most recent bar, I found that I had a
> accurate, fast responding ranking system that worked well with ETF's.
> My portfolio of the top 4 ranked ETF's (out of a universe of 20 ) is
> up 22% YTD with a max drawdown of 6%.
>
> I trade the above system in 5 accounts for my family. I am a private
> investor - nothing for sale - no website.
>
> Ed Hoopes
>
>
> --- In equismetastock@xxxxxxxxxxxxxxx, "david" <dwei9361@xxxx> wrote:
> >
> > If anyone uses parabolic trend lines as part of a systematic
approach I
> > would be very interested, as I can not see the logic behind them
... it
> > seems to me 'curve fitting' literally.
> >
> > Regards
> >
> > Dave
> >
> > -----Original Message-----
> > From: equismetastock@xxxxxxxxxxxxxxx
> [mailto:equismetastock@xxxxxxxxxxxxxxx]
> > On Behalf Of Jose Silva
> > Sent: Tuesday, 22 November 2005 5:17 PM
> > To: equismetastock@xxxxxxxxxxxxxxx
> > Subject: [EquisMetaStock Group] Re: Parabolic trend "line"
> >
> > Ron, Ed, plotting a parabolic fit is not impossible using MSFL - it
> > just requires a little imagination and a lot of free time.
> >
> > However, since abstract mathematical plots are generally
considered an
> > absolute waste of *valuable time* and effort, and since it has
little
> > or nothing to do with actual trading, you won't find much of that
> > around here.
> >
> > For complex parabolical(!) plots, try dedicated maths software
such as
> > Statistica 7. http://www.statsoft.com/v7.htm
> >
> >
> > jose '-)
> > http://www.metastocktools.com
> >
>
>
>
>
> SPONSORED LINKS Business finance course Business finance online
course Business finance class
> Small business finance Business finance schools Business
finance small software
>
>
>
------------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
> a.. Visit your group "equismetastock" on the web.
>
> b.. To unsubscribe from this group, send an email to:
> equismetastock-unsubscribe@xxxxxxxxxxxxxxx
>
> c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
>
------------------------------------------------------------------------------
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/
|