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

Re: [amibroker] RUTVOL 800 bars test/TC2000



PureBytes Links

Trading Reference Links




Gary, 
 
You really did read the posts in amibroker-beta group 
:-))))))
Thank you very much.
 
Best regards,Tomasz Janeczkoamibroker.com
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Gary 
  A. Serkhoshian 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Cc: <A title=rboroff@xxxxxxxxxxx 
  href="">RICHARD L. BOROFF 
  Sent: Sunday, November 23, 2003 3:07 
  AM
  Subject: Re: [amibroker] RUTVOL 800 bars 
  test/TC2000
  
  Dalengo,
   
  I hope Tomasz reads this as my response below will prove that I actually 
  paid attention and read his posts on the AmiBroker Beta board : 
  )))))))))))))
   
  I'm glad that you took the time to ask these questions as they are 
  critical to understand, and as in prior posts those not familiar with 
  portfolio tester open up your ears and listen in as this is basic stuff 
  elaborated in the read-me and if you ask Tomasz he will find you and club 
  you over the head for not reading the read-me : )  Lemme save you the 
  headache, and hopefully save Tomasz the time.
   
  Let's tackle your e-mail in three parts:
   
  1.  Why you are not getting results when using old backtester and 
  RUTVOL on cash Russell 2K index.
   
  2.  Why are arrows showing up in the equity graph for the old 
  backtester.
   
  3.  Your basket testing returns compared to mine.
   
  Okay #1:
   
  The reason you are not getting results is driven by settings in the code 
  governing initial equity, position size, min size, and round lot size.
   
  Let's go through each of these in the order they occur in the code.
   
  
  SetOption(<FONT color=#ff00ff 
  size=2>"InitialEquity", <FONT 
  color=#ff00ff size=2>100000<FONT 
  color=#000000>);
  Straightforward.  This is cash we 
  start with.  Why code it versus using the GUI?  Because different 
  systems require different captial requirements.  This allows you to 
  customize.
  RoundLotSize = 100<FONT 
  size=2>;
  All trades must occur in blocks of 100 
  shares.  I think this is fair.  It you wanna try odd lots, good for 
  you.  I don't.<FONT 
  color=#0000ff size=2>
  SetOption(<FONT color=#ff00ff 
  size=2>"MinShares",<FONT color=#ff00ff 
  size=2>100);
  Minimum size must be 100 shares.  
  You'll see how this is important in a sec.<FONT 
  color=#000000>
   
  MaxPos = Optimize<FONT 
  size=2>("Max Positions"<FONT 
  size=2>,5,<FONT 
  color=#ff00ff size=2>1,<FONT color=#ff00ff 
  size=2>15,1<FONT 
  size=2>);<FONT 
  color=#0000ff size=2>
  SetOption(<FONT color=#ff00ff 
  size=2>"MaxOpenPositions"<FONT 
  size=2>,MaxPos);
  Allow 5 open positions at one time if cash 
  is avail.  I've given you the ability to optimize this via MaxPos 
  variable.
   
  PositionSize = -100<FONT 
  size=2>/MaxPos;
  If there is a " -" in from of the number that means we are designating 
  percent.  In this case positon size for one position can not exceed 20% 
  of total portfolio equity.
   
  Okay, here's the punchline:  Trading the RUT cash index around 400 or 
  so
  400 x 100 min share size = $40,000 position which is bigger than $20,000 
  position size limit.  So the position never gets put on.
  If you want to run this in the old backtest, comment out the positionsize 
  line, and it will run.  You'll want to increase initial equity, 
  too.  Run it on the IWM to be realistic.
   
  2.  Regarding why you are getting arrows in the old backtester equity 
  curve is that the equity curve for the old backtester is taking all the code 
  from the aa window and including in the equity line code.  This means the 
  indicator code at the bottom of the system code actually plots buy sell arrows 
  which makes the equityline indicator hard to read.  If you are going to 
  run this in the old backteser, comment out the indicator code.  Be 
  careful not to comment out anything important : )
  3.  Okay now the  meat and potatoes.  The returns.  
  Don't get worried about the returns, because I'm going to show you how to 
  make them better.
  1/01 - 11/03 trading IWM (no portfolio trading):
  CAR:  7.27
  MaxDD: -8.23%
   
  Same Period basket trading with BB selection:
  CAR:  5.25%
  MaxDD = -28.9%
  Now for some detail.  We must keep in mind that this is a long only 
  system over what was primarily a bearish period.  The basket trading 
  return was horrible.  The important message is the Bollinger Band 
  selection method is not the best.  It was an example to get you going, 
  but in the spirit of more code and less talk (an idea which I hope all of our 
  more verbose contributors will espouse...you know who you are) let's show 
  you the ncAlpha selection method:
  Same Period basket trading with ncAlpha selection:
  CAR:  49%
  MaxDD = -22.79
  Woah.  Not bad, eh?  CAR went way up and we reduced maxdd.  
  At least we are in >2 MAR country which Fred has taught me is a good place 
  to be.  Again this was an all long system over a lot of bear market 
  moves.  There are better signals out there, but RUTVOL isn't a bad place 
  to start.
  Here's the code for ncAlpha to play with (early X-Mas present so 
  be nice till Jan 1 ; )<FONT color=#008000 
  size=2>
  //GLOBAL SYMBOLS
  INDEXSYM = ParamStr<FONT 
  size=2>("INDEX SYM"<FONT 
  size=2>,"!RUT"<FONT 
  size=2>);
  RAWINDEX = Foreign<FONT 
  size=2>(INDEXSYM,"C"); 
  //CLOSING PRICE OF INDEX<FONT 
  size=2>
  RAWFUND = C; //CLOSING PRICE OF 
  FUND
  LB = Param<FONT 
  size=2>("LOOKBACK PERIOD"<FONT 
  size=2>,126,<FONT 
  color=#ff00ff size=2>0,<FONT color=#ff00ff 
  size=2>1008,<FONT color=#ff00ff 
  size=2>10);
  //NC ALPHA
  //COMPUTE DAILY STDEV & APPLY MONTHLY CONVERSION FACTOR<FONT 
  size=2>
  SDF = StDev<FONT 
  size=2>(ROC<FONT 
  size=2>(RAWFUND,1),LB) * 
  sqrt(<FONT 
  color=#ff00ff size=2>22);
  SDI = StDev<FONT 
  size=2>(ROC<FONT 
  size=2>(RAWINDEX,1),LB) 
  * sqrt(<FONT 
  color=#ff00ff size=2>22);
  RELSD = SDF / SDI; //RATIO IS SAME 
  REGARDLESS OF WHETHER WE USE DAILY OR MONTHLY SD VALUES<FONT 
size=2>
  NCALPHA = MA<FONT 
  size=2>(ROC<FONT 
  size=2>(RAWFUND,1),LB) - 
  RELSD * MA(<FONT 
  color=#0000ff size=2>ROC(RAWINDEX,<FONT 
  color=#ff00ff size=2>1),LB); <FONT color=#008000 
  size=2>//DAILY ncALPHA
  I need to get back to work so I'll spare you a definition of ncAlpha, but 
  go to Werner's site, and you'll get a better definition than I can ever 
  give.
  Also, I'd strongly encourage you to get out to Clearwater because there 
  will be a good presentation by Bruce Robinson on blending a signals like 
  RUTVOL with simple to complex filters to create better long signals, and 
  tradeable short signals.  I'll also be running through a lot of these 
  signals in terms of analyzing them through the portfolio backtester with 
  various baskets of stocks as well as optimization analysis. <A 
  href="">www.ftmonitor.com has details.
  Hopefully I've left enough for you to play with.
  Hope this helps,
  Gary
   
   
   
  
  
  Do you Yahoo!?<A 
  href="">Free 
  Pop-Up Blocker - Get it now Send 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------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. 







Yahoo! Groups Sponsor


  ADVERTISEMENT 









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 the Yahoo! Terms of Service.