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

[amibroker] IWM 01-01-01_11-21-03 [was RUTVOL 800 bars]



PureBytes Links

Trading Reference Links

Gary,
Many thanks for your comments. I've now changed only
MaxPos = Optimize("Max Positions",1,1,15,1);
//MaxPos = Optimize("Max Positions",5,1,15,1);
(and commented out the Indicator) to have 100k available for the code 
(I am using AB 4.40.4).
My results seem to be much more optimistic: [52% total 
return/account], 16% CAR, MDD=-12%. Actual equity ended up at 
$137,634 (# of lots?), so the real 3 year return (with 0.5% slippage) 
is 38%.
I would like to know if we are getting similar, or different results, 
and what might cause the difference.
________________________
System: I need to play with the modifications you mentioned but a 
couple of things seems obvious: (i) the system is lagging quite a 
bit, and missed the mother of all bottoms in Oct'02, (ii) very 
recently, it tended to buy high and sell low, giving back 14k out of 
36k hard-earned on a bull run Apr-Jul'03. The point (ii) is really 
frustrating, and needs a correction for market choppiness, at least 
in terms of %portfolio management, I guess.
Thanks for invitation to come to AB conf - I enjoy learning from 
people's talks, it's fastest for me, - and I am grateful for your 
comments. Not sure I can make it, but still. -D.    8-D.
________________________
Report:
Total net profit: 52651.02   Total commissions paid: 0.00 
Return on account: 52.65 %    Open position gain/loss 0.00 
Buy&Hold profit: 12880.00   Bars (avg. days) in test: 726 (1054) 
Buy&Hold % return: 12.88%   System to Buy&Hold index: 308.78% 
  
Annual system % return: 15.78%   Annual B&H % return: 4.28% 
  
System drawdown: -1720.00   B&H drawdown: -27810.00 
Max. system drawdown: -20187.00   B&H max. drawdown: -40150.00 
Max. system % drawdown: -11.80%   B&H max. % drawdown: -35.42% 
Max. trade drawdown: -13024.00       
Max. trade % drawdown: -7.61%       
Trade drawdown: -9184.00       
  
Total number of trades: 11   Percent profitable: 63.6% 
Number winning trades: 7   Number losing trades: 4 
Profit of winners: 70326.01   Loss of losers: -17674.99 
Total # of bars in winners: 215   Total # of bars in losers: 50 
Commissions paid in winners: 0.00   Commissions paid in losers: 0.00 
  
Largest winning trade: 36244.00   Largest losing trade: -5114.99 
# of bars in largest winner: 90   # bars in largest loser: 10 
Commission paid in largest winner: 0.00   Commission paid in largest 
loser: 0.00 
___________________________________________________

Scan from 01-01-01 to 11-21-03 :
IWM	Sell	13.02.2001	99.85
IWM	Buy	27.04.2001	96.90
IWM	Sell	17.05.2001	100.76
IWM	Buy	15.10.2001	85.40
IWM	Sell	28.11.2001	90.05
IWM	Buy	10.12.2001	94.11
IWM	Sell	26.12.2001	97.50
IWM	Buy	12.03.2002	99.24
IWM	Sell	13.03.2002	98.40
IWM	Buy	30.04.2002	101.30
IWM	Sell	10.05.2002	98.13
IWM	Buy	25.10.2002	74.44
IWM	Sell	11.12.2002	78.65
IWM	Buy	21.03.2003	74.77
IWM	Sell	29.07.2003	94.85
IWM	Buy	29.08.2003	99.21
IWM	Sell	26.09.2003	96.60
IWM	Buy	13.10.2003	105.45
IWM	Sell	24.10.2003	101.25
IWM	Buy	04.11.2003	107.44
IWM	Sell	18.11.2003	103.76



--- In amibroker@xxxxxxxxxxxxxxx, "Gary A. Serkhoshian" 
<serkhoshian777@xxxx> wrote:
> 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("InitialEquity", 100000);
> 
> 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;
> 
> 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.
> 
> SetOption("MinShares",100);
> 
> Minimum size must be 100 shares.  You'll see how this is important 
in a sec.
> 
>  
> 
> MaxPos = Optimize("Max Positions",5,1,15,1);
> 
> SetOption("MaxOpenPositions",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/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 ; )
> 
> //GLOBAL SYMBOLS
> 
> INDEXSYM = ParamStr("INDEX SYM","!RUT");
> 
> RAWINDEX = Foreign(INDEXSYM,"C"); //CLOSING PRICE OF INDEX
> 
> RAWFUND = C; //CLOSING PRICE OF FUND
> 
> LB = Param("LOOKBACK PERIOD",126,0,1008,10);
> 
> //NC ALPHA
> 
> //COMPUTE DAILY STDEV & APPLY MONTHLY CONVERSION FACTOR
> 
> SDF = StDev(ROC(RAWFUND,1),LB) * sqrt(22);
> 
> SDI = StDev(ROC(RAWINDEX,1),LB) * sqrt(22);
> 
> RELSD = SDF / SDI; //RATIO IS SAME REGARDLESS OF WHETHER WE USE 
DAILY OR MONTHLY SD VALUES
> 
> NCALPHA = MA(ROC(RAWFUND,1),LB) - RELSD * MA(ROC
(RAWINDEX,1),LB); //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. www.ftmonitor.com has details.
> 
> Hopefully I've left enough for you to play with.
> 
> Hope this helps,
> 
> Gary
> 
>  


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/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/