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

Re: [amibroker] Re: a few considerations about optimization



PureBytes Links

Trading Reference Links


Interesting code, Sam. I'll try it. 
 
Here's another idea. Last January, Van Tharp on his forum discussed his 
high efficiency stocks as being good candidates for successful trading. High 
efficiency is defined as the change in price of a stock over n periods divided 
by the change in the ATR of that stock over the same period. The higher the 
resulting number, the more efficient the stock is (i.e., the greater the price 
increase without a concurrent volatility increase). He uses an average of 4 
different efficiency indices to come up with a composite efficieny index (EI). 
There is no magic to the 4 different indices making up the 
composite. They're just empirical. You can use anything you want and define 
it in whatever way you want. His was just a suggestion, which he never divulged 
but which I was able to figure out. Here is the AFL code I used, which you can 
use as a filter:
 
EI20=(C-ref(C,20))/ma(ATR(1),20);EI45=(C-ref(C,45))/ma(ATR(1),45);EI20=(C-ref(C,90))/ma(ATR(1),90);EI20=(C-ref(C,180))/ma(ATR(1),180);AvgEI=(EI20+EI45+EI90+EI180)/4;
 
The AvgEI should be positive if going long (perhaps greater than +10 or +15 
or so), negative if going short. The filter would be AvgEI>=x; where you can 
optimize x. Just another thought.
 
AV
 
 
----- Original Message ----- 
<BLOCKQUOTE 
>
<DIV 
>From: 
samgrayy 
To: <A title=amibroker@xxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Friday, November 01, 2002 12:34 
PM
Subject: [amibroker] Re: a few 
considerations about optimization
Ok some more testing on this idea: Add the 
following to your potential system: DMAPeriodSlow =  30 ; 
//Optimize( "DMAPeriodSlow ", 45, 5 , 100, 5 );  
DMAPeriodFast=   10 ; //Optimize( "DMAPeriodFast", 10, 5 , 100, 
5 );  delta=C-Ref(C,-1);MAd1=MA(abs(delta),DMAPeriodSlow 
);MAd2=MA(abs(delta), DMAPeriodFast);Then Buy = BUY AND 
(MAd2 > MAd1); Short= Short AND (MAd2 > MAd1); See what 
happens, better returns and a lower system drawdown,Excellent ideas, keep 
'em coming Sam Gray--- In amibroker@xxxx, "goldfreaz" 
<goldfreaz@xxxx> wrote:> Interesting...> > 
delta=C-Ref(C,-1);> md=MA(delta,45);> 
MAd=MA(abs(delta),45);> > Graph1=MAd;> 
Graph1Style=1;> Graph1Color=colorGreen;> > > --- 
In amibroker@xxxx, "Avcinci" <avcinci@xxxx> wrote:> > 
Franco,> > > > Recently I was talking to a professional 
trader who told me that > some stocks simply don't behave well in any 
system and others do > extremely well (in backtesting). He attributes 
this to a term called > the "fractal efficiency ratio," coined by Perry 
Kaufman. A stock has > to have some non-random movement to be 
predictable.  It's the total > change in price over a given 
period, divided by the sum of the > absolute values of all the daily 
changes in price.  If a stock has > too small a directional 
component, then it's a poor candidate for any > system, regardless 
of how many filters or refinements you add.  > You're better off 
using all that firepower on a better target. I've > been testing alot 
of stocks lately individually, finding that many > simply give very bad 
backtest results and very non-robust parameter > coefficients. So,I 
eliminate them from my watchlist and concentrate > on those stocksthat 
behave well. This seems to be working well. I > haven't had time to 
write any code yet to see if the good-performing > stocks have a higher 
fractal efficiency ratio (personality as you > call it?) than the poor 
performing ones, but it's worth a try. You > must test over a long 
enough period of time to encompass bullish, > bearish, and sideways 
markets, like 1/1/97 (or even earlier) to > present time. If you try 
this idea out, let me know how successful > you are. I'm very 
interested in this concept. When I get a chance, > I'll try it myself. 
But, in theory, it seems to have merit. > > > > Al 
Venosa> > > >   ----- Original Message ----- 
> >   From: Franco Fornari > >   To: 
amibroker@xxxx > >   Sent: Friday, November 01, 2002 6:15 
AM> >   Subject: [amibroker] a few considerations about 
optimization> > > > > >   
Hello,> > > >   trying to optimize any trading 
system, I think we all have > thought, sometime, we would like to avoid 
such a tedious process or > to do it once and for all.> 
>   It could be possible? This question badgered me for a long 
time, > unfortunately with no success, yet I feel there must be a 
solution.> >   Why I say that? Because a peculiarity of 
each stock, > called "personality" by someone, wich seems stable 
enough. In other > words, I think if we were able to mathematically 
represent this > characteristic, we could automatically optimize any 
trading systems.> >   But, the big matter is: what isthis 
characteristic (long term > volatility, frequency of peaks and troughs, 
price)? How could we > assess or measure it? And, first of all, does 
such a feature exist or > is it only a mirage? How do you think 
about?> > > >   Best regards,> > 
> >   Franco> > > 
>         Yahoo! Groups Sponsor 
> 
>               
ADVERTISEMENT> 
>              
> >        > 
>        > > > 
>   Post AmiQuote-related messages ONLY to: amiquote@xxxx 
> >   (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)> 
> > >   Check group FAQ at: > <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> > > >   Your use of Yahoo! Groups is subject 
to the Yahoo! Terms of > Service.Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.