PureBytes Links
Trading Reference Links
|
Hi Stephen - Thank you for the kind words. Please see my replies to your
questions below:
----- Original Message -----
From: "Stephen Almond (T)" <s.almond@xxxxxxxxx>
To: "Ami" <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, April 04, 2003 5:15 AM
Subject: [amibroker] Steve Dugas
> Steve, congratulations on you excellent .DLL. I would like to make a
couple
> of comments:
>
> 1. On the attached chart of your TRIX indicator, the buy/sell signals seem
> too good to be true. Seems the programme picks the peak before the
> subsequent down day which defines that peak (same for troughs, of course).
> Can you introduce a couple of days delay to make the trades more 'real'?
>
The chart shows the trade signals while the reported results are based on
the actual trades. TRIX uses a reversal system, so the indicator will change
color on the day that it reverses - you can confirm this by hovering the
cursor over the day that it changes color, and also the 2 days before, and
reading the values in the tool tips. I deliberately programmed the charts to
show the signals so that it would alert me to signals on the current bar.
Actually, the signal is given on the day that the DOT (not the line) changes
color. I added the dots because in line mode, AB uses the new color to
connect the signal bar to the previous bar, possibly giving the impression
that the signal occurred the day before it actually did. In real time it
doesnt matter because the color change for the latest bar will will show up
on the dot and the line at the same time, but when looking at past signals,
it is the first DOT of a new color that signals the reversal.
You can select when the actual trades take place, similar to AA settings, by
setting the TradePrice and TradeDelay variables at the top of the code. They
are preset to execute the trade on the open of the day following the signal,
but for example, if your style is to trade at the close on the day of the
signal, just change TradePrice to "Close" and TradeDelay to "0".
> 2. I notice that if I use 63 days (~1/4 year) for my Testbars and get a
> return of 12%, then the Annual return is shown as 48%. Is the lack of
> compounding correct, or are you simply erring on the conservative side?
The program uses 2 methods to figure annual return, one if you are
reinvesting initial equity and the other if you are reinvesting compounded
equity. If you want to reinvest compounded equity (and also calculate annual
return based on this method), just set ReInvest variable to "2".
>
> 3. I note in you help document that you say the backtest isn't completely
> consistent with the explorations. Do you hope to remedy this? As an
example
> if I use testbars =126, should I be able to backtest over 126 bars and at
> least get the same number of trades as indicated by the exploration?
>
Well, actually, the DLL has its own built-in backtester, which it runs when
you do an exploration. That is how it determines the optimal parameters - it
tests all combinations you select and returns the most profitable one. I
dont think that the results will ever be identical to AB's backtester
because there are a number of variables to consider and I dont know exactly
how Tomasz handles them all in his code. For example, AB calculates interest
when you are out of the market - I didnt bother to add interest in the DLL
because it seems like a relatively minor amount these days, but maybe I will
add it in the future. Another example is if you choose to reinvest initial
equity, the DLL will actually reinvest the lesser of initial equity or
actual equity (in case you lose money on the first trade for example, this
is more realistic) I think this would correspond to using AB "positionsize"
with "allow shrinking" turned on . Another example is that the DLL allows
you to open a trade on the first bar of the test period if you want to,
rather than wait for the first signal to occur. If you select this method,
it will look backwards from the 1st test bar to find the previous signal and
then enter the trade on the 1st bar of the test period. I added this because
I usually concentrate on what the stock has been doing very recently and if
some stocks make me wait for half the test period before opening a trade,
that makes it hard to make a valid comparison over such a short time. To get
as close to AB results as possible, you can set all parameters to be as
close to AB settings as possible. In my limited testing of this, I have seen
that it is possible to come pretty close.
> Thanks for the great programme
You are welcome : - )
>
>
> 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/
>
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
FREE Cell Phones with up to $400 Cash Back!
http://us.click.yahoo.com/_bBUKB/vYxFAA/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/
|