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

Re: [amibroker] Suggestion for better backtesting/optimization



PureBytes Links

Trading Reference Links


Thanks, Ken. I haven't been doing much backtesting lately (been busy with, 
yuk, work from my real job!!), so I probably wonldn't be a good beta testerfor 
Dale right now. When will the final package be done? I'm very interested. 
 
Al Venosa
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
Ken Close 
To: <A title=amibroker@xxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Sunday, September 29, 2002 3:27 
PM
Subject: RE: [amibroker] Suggestion for 
better backtesting/optimization

Al, 
others:  you would not believe how easy walkforward testing is with the 
new Rx - Report Extractor from Dale Wingo.  It was annouced several days 
ago how Dale is looking for additional beta testers (although I can say the 
program is a pretty darn stable version right now).  This is a tremendous 
time saver as you set up some codes within your AFL file, make all your 
settings, code arrangements, etc in the AA window.  You press BackTest - 
Report, change the date range (as in your example below), press Backtest 
again, then Report again.  Very easy to do quarterly or half-year (or 
more) rolling window testing.
<SPAN 
class=360451319-29092002> 
Switch to Rx, 
follow some screen commands, and presto, there are all of your results from 
the two runs, in two (or more, if you did more than two tests) rows of Excel, 
with all documentation of settings, formula, etc. You can even put some 
"comment" code lines in the AFL code (and change it before each run)and 
these comments will be captured as a field and put into the spreadsheet 
also.  Very easy to compare all of the fields of data and draw your 
conclusions. You can do it probably faster than it has taken me to type this 
note.
<SPAN 
class=360451319-29092002> 
Interestingly, 
if you decide to vary a few more parameters, you make those new runs, and 
then click a different box in Rx and it appends the last data right behind the 
data of the first runs.  I keep several master excel files, one for each 
system test I do, and the results of each test are appended right below the 
last run, but with all settings, etc, including the formula, so I know just 
what each result row refers to.  It even can let me type in some 
conclusionary notes in Column A, last empty row, and the next system testrow 
is appended below my notes.  One of my master file has 35 rows of data, 
representing 35 different tests done over several weeks. Of course, it also 
captures the date of the test.
<SPAN 
class=360451319-29092002> 
Folks, if you 
have juggled html reports and tried copying certain fields from them to paste 
into a spreadsheet in order to keep track of different system tests, and 
gotten all mixed up about it, then I assure you the Rx program will literally 
amaze you.
<SPAN 
class=360451319-29092002> 
Dalemay still 
need some more beta testers.
<SPAN 
class=360451319-29092002> 
Ken 

<FONT face=Tahoma 
size=2>-----Original Message-----From: Avcinci 
[mailto:avcinci@xxxx]Sent: Sunday, September 29, 2002 2:01 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] 
Suggestion for better backtesting/optimization
You can do walk-forward testing now with AB. Simply optimize from, 
say, 1997 to 2000, then using the optimum parameter values from that 
optimization, backtest on the same stocks from 2000 to present (out of sample 
data). You can vary the time periods to do your optimizations and backtests. 
Of course, this is 2 steps, but it's not that hard. TJ has said that, later 
this year, he will be incorporating in his graphics engine 3-D graphics that 
enable the user to view the robustness of an optimization in a manner similar 
to but better than the Excel add-in that Herman developed and uploaded 
earlier. You would choose parameter values from a flat area of the 
optimization graph where the parameter values and equity curve would not 
change much from one set to another. 
 
Al V.
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
lel4866 
To: <A title=amibroker@xxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Sunday, September 29, 200212:29 
PM
Subject: [amibroker] Suggestion for 
better backtesting/optimization
My suggestion is for support for walk forward 
optimization. This is what we all actually do in real life. Since we 
can't look into the future, we test/optimize based on the past, then 
apply the results to the following days trading. We then look at the 
results and make additional changes.There are 2 simple 
variables: 1) The length of time we look back, and the length of time 
(or other conditions) we wait until we re-optimize.There's a 
3rd, more complicated variable - how we choose the optimium parameters 
from the last optimization run. My suggestion is for a "score" formula 
that takes into account things like: maximum % drawdown, best compound 
rate of return, highest minimum of the running 1 year returns (or 
whatever period you like).I particularly like the last one - I 
always look at a graph of the 1 year returns (Equity() - Ref(Equity(), 
-253)). Ideally, it should be as flat as possible (or maybe rising). 
I've been treating this a little like analysis of variance - it should 
look like white noise with a given mean and standard deviation - any 
periods that don't bear investingation.Right now I use AmiBroker 
for experiments, but when I find an idea I like, I must write my own 
program to do walk-forward testing.Larry 
LewisPost 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. 
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. 
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.