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

Re: [amibroker] Real World Systems - Multiple Sub Signals



PureBytes Links

Trading Reference Links

Sid

***************
/*
Merwin Oscillator
written by Sid Kaiser, 27 Aug 2001

A voting scheme for early exits originally proposed by Roy Merwin with 
modifications by Sid Kaiser.
Doesn't make a very good trading system...
*/

/* Set some parameters */
fastper = 5; //Optimize("fastper", 15, 2, 15, 1);
slowper = 13; //Optimize("slowper", 34, 8, 34, 1);
rs = 0.2; //Optimize("rs", 0.2, 0.1, 2, 0.1);
rsper = 23; //Optimize("rsper", 17, 8, 47, 1);
rsilvl = 50; //Optimize("rsilvl", 56, 26, 70, 2);
stolvl = 50; //Optimize("stolvl", 58, 26, 70, 2);
buylvl = 2.0; //Optimize("buylvl", 2.5, 1.0, 5.0, 0.1);
selllvl = 3.8; //Optimize("selllvl", 1.5, 1.0, 4.7, 0.2);
blb = 3; //Optimize("blb",4, 1, 8, 1);
slb = 3; //Optimize("slb", 4, 1, 8, 1);

fastma = EMA(Close, fastper);
slowma = EMA(Close, slowper);

relma = fastma/slowma;

/* Relative strength vs a high fixed rate of return. */
relstr = (Close / ValueWhen(DateNum() ==991130,Close,1)) / exp(Cum(1)*rs/365);
relstr2 = relstr - EMA(relstr, rsper);

relmacd = MACD() - Signal();

MO = IIf( relma > 1, 1, 0) + IIf( relstr2 > 0, 1, 0) + IIf( RSI(14) > 
rsilvl, 1, 0) + IIf( StochD(14) > stolvl, 1, 0) + IIf(relmacd > 0, 1, 0);
Bvote = MO > buylvl;
Svote = MO < selllvl;

/***** system  *****/

/* if MAs cross first */
Btrig = Cross(fastma, slowma);
Strig = Cross(slowma, fastma);

/* if MACD crosses first */
Btrig2 = Cross(MACD(), Signal());
Strig2 = Cross(Signal(), MACD());

//Buy = Cross(EMA(C,11), EMA(C,34));
Buy = Bvote; //and BarsSince(Btrig2) <= blb or Btrig and BarsSince(Bvote) 
<= blb;
Sell = Svote;//and BarsSince(Strig2) <= slb or Strig and BarsSince(Svote) 
<= slb;

Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);

/* exploration */
Filter = 1;
NumColumns = 6;
Column0 = relma;
Column0Name = "rel_ma";
Column1 = relstr2;
Column1Name = "relstr2";
Column2 = RSI(14);
Column2Name ="RSI";
Column3 = StochD(14);
Column3Name = "Stoch";
Column4 = relmacd;
Column4Name = "macd histo";
Column5 = MO;
Column5Name = "Merwin Osc";


Multiple Sub Signals: - here is a real world trading approach that I have 
never seen mentioned here.  I would like to get some reaction.  This is 
based on some real world trading that is happening on another platform that 
I am helping port over to AB.

>
>
>The idea is to have signals for multiple subsystems and then take your 
>trading signal when a majority of the subsignals line up.
>
>
>
>For discussion purposes, visualize a mov avg cross over   AND
>
>A volume oscillator   AND
>
>An advance decline curve   AND
>
>Perhaps a VIX type signal.
>
>
>
>If you let each one be a buy or sell, and call each S1, S2, S3, S4
>
>
>
>then your buy statement could be
>
>
>
>Buy = S1 AND S2 AND S3 AND S4.
>
>
>
>This might be a little too stringent, so perhaps you code it to give a buy 
>if 3 of the 4 signals are a buy and you do not care which ones.
>
>
>
>In the work that I am doing with this approach, I am seeing that each S(i) 
>has a return and a dd over a long period of time, but as you add 
>combinations of the signals, the return increases a little bit but the dd 
>seems to drop and drop quite a bit.  An example might be returns for each 
>one individually of say 8-10% CAR and 13-15% dd, but when 3 out of 4 are 
>combined as I describe above, the resulting return might be 9-12% CAR and 
>6-9% dd.   These are not barn burners, and those seeking or actually 
>trading 50-100% CAR systems will laugh as they hit delete, but for some 
>folks who are risk adverse, or managing retirement portfolios, or 
>whatever, this kind of approach might have some appeal.
>
>
>
>In the work I have done so far, there has been NO OPTIMIZATION of the 
>parameters within the subsystems.  Any In sample period compares favorably 
>with OOS periods.  The results look steady over 12 years of data, with 
>variations due to changing market conditions.  (I am not sure IS and 
>OOSapply when no optimization has been done, but what I mean is that 
>breaking the total time period up into sections shows no real degradation 
>or blowupof one period relative to the other.)

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get a FREE REFINANCE QUOTE - click here!
http://us.click.yahoo.com/2CXtTB/ca0FAA/i5gGAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.471 / Virus Database: 269 - Release Date: 04/10/2003