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

[EquisMetaStock Group] Re: Rules Management for Trading System



PureBytes Links

Trading Reference Links

Hi MG Ferreira:
I found and fixed the error of the negative value for the weighting
factor, but there are a lot of rooms for improvement, such as

- DR daily return
- P2 penalty function
- PC percentage to penalise with
- BUY and SELL signals for System Tester

I think that the most important issue is how to define the daily
return and the penalty function, because both are the learning
factors to select any indicators to be used. Do you have more
information about this issue?

Since the negative value of weight has been fixed, the results for
weighting factors will resend to your email address. There is some
problem on my metastock, it cannot be able to display the equity line
after plotting it on the chart, I think I need to reinstall it, but
you can run it and see the result.

Do you have any suggestion?
Thank you
Eric :>

=================>B=================
{Normalization - Sample - Moving Average}
Ss:=Cross(Mov(C,20,S),C);
Sl:=Cross(C,Mov(C,20,S));
ST:=1;
ST:=Ss+Sl+(Ss=0)*(Sl=0)*Ref(ST,-1);
Vs:=C-Mov(C,20,S);
Vl:=C-Mov(C,20,S);
TT:=Min(0,Vs)*(ST<0)+Max(0,Vl)*(ST>0);
TT/Highest(TT);
=================>B=================
{Normalization - Sample - RSI}
II:=RSI(14);
Ss:=-(II<70)*(Ref(II,-1)>=70);
Sl:=+(II>30)*(Ref(II,-1)<=30);
ST:=If(Ss=0 AND Sl=0,PREV,Ss+Sl);
Vs:=II-70;
Vl:=II-30;
TT:=Min(0,Vs)*(ST<0)+Max(0,Vl)*(ST>0);
TT/Highest(TT);
=================>B=================
{Normalization - Sample - STO}
II:=Stoch(5,3);
Ss:=-(II<80)*(Ref(II,-1)>=80);
Sl:=+(II>20)*(Ref(II,-1)<=20);
ST:=If(Ss=0 AND Sl=0,PREV,Ss+Sl);
Vs:=II-80;
Vl:=II-20;
TT:=Min(0,Vs)*(ST<0)+Max(0,Vl)*(ST>0);
TT/Highest(TT);
=================>B=================
{Kalman Filter}
PC:=Input("Penalise % : ",0,100,10)/100;
T1:=Fml("Normalization - Sample - STO");
T2:=Fml("Normalization - Sample - RSI");
T3:=Fml("Normalization - Sample - MA");
W1:=1000;
W2:=1000;
W3:=1000;
DR:=(C/Ref(C,-1)-1)*C;
P1:=DR*((T1>0)-(T1<0));
P2:=DR*((T2>0)-(T2<0));
P3:=DR*((T3>0)-(T3<0));
W1:=If(P1=0,PREV,W1+(P1*(1+PC)));
W2:=If(P2=0,PREV,W2+(P2*(1+PC)));
W3:=If(P3=0,PREV,W3+(P3*(1+PC)));
WA:=W1+W2+W3;
TA:=(W1*T1+W2*T2+W3*T3)/(WA);
TA;
=================>B=================
BUY
TA:=FmlVar("Normalization - Sample","TA");
CROSS(TA,0);

BUY EXIT
TA:=FmlVar("Normalization - Sample","TA");
CROSS(0,TA);

SELL
TA:=FmlVar("Normalization - Sample","TA");
CROSS(0,TA);

SELL EXIT
TA:=FmlVar("Normalization - Sample","TA");
CROSS(TA,0);
=================>B=================



--- In equismetastock@xxxxxxxxxxxxxxx, "MG Ferreira" <quant@xxxx>
wrote:
> Eric,
>
> Had another look at the results. Again, it appears to be quite
stable
> and the behaviour is a lot better than some other such results I
have
> looked at. You could consider smoothing it a bit more - although it
> appears stable it does appear a bit choppy. Also, at one stage one
of
> the weights take on a negative value, which should not be possible
if
> you calculate it correctly. Please give the formula for any of the
> weights just again so that I can look at it. If you want I'd love
to
> have the full Metastock formula file as well, so if you could mail
> that to me I'd appreciate it!
>
> Regards
> MG Ferreira
> TsaTsa EOD Programmer and trading model builder
> http://www.ferra4models.com
> http://fun.ferra4models.com





------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/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/