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

[amibroker] Re: Backtest using equity curve (TradeSim)



PureBytes Links

Trading Reference Links

Glenn
Here is one way (I'm sure there are others) to do an equity feedback 
on your system.
1. Run your portfolio backtest without any equity feedback.
2. locate the ticker ~~~equity (usually last ticker in your 
workspace list).
3. Rename ~~~equity to ~system1 (or whatever). To rename - R mouse 
click ~~~equity -> information -> change symbol.
4. Go back to your Backtest.  In the AFL include these lines

SysEqu = Foreign("~system1","C");
SellCond = SysEqu < MA(SysEqu,100);
BuyCond = SysEqu > MA(SysEqu,100);
Sell = SellCond or "your sell" ;
Buy = BuyCond and "your buy" ;

5. Rerun portfolio backtest.
Hope this gives you something to start with.  As I said, I'm sure 
there are other ways of doing this, for instance look at Dimitris 
latest posts for ideas.
Andrew 

--- In amibroker@xxxxxxxxxxxxxxx, "Glenn" <glennokb@xxxx> wrote:
> Hi Andrew,
> 
> > TradeSim is a great product. 
> 
> Yes, it is a great product but I would like to test my system out 
using 
> feedback from its equity curve. I have no idea if the idea really 
works as 
> I haven't been able to test it well.
> 
> I had setup a spreadsheet with the exported trade data from 
Tradesim 
> and placed an adaptive moving average on it and when the equity 
curve 
> dropped below the AMA I removed new trades from the Tradesim 
> database to simulate the idea. Too messy!! I would also like to 
test it 
> using the Monte Carlo.
> 
> I've ask David if he would include this in Tradesim 6 months ago 
but 
> updates are not as quick as Tomasz with Amibroker! Anyway, David 
said 
> it would be difficult and it sounds like the best he can do is add 
a feature 
> to have a percentage from the equity curve as a stop ...not a 
moving 
> average or whatever.
> 
> > There are users of AB that use TradeSim also, myself included.
> > Chuck Rademacher has written some code which you will find in
> > the files section - Convert.exe
> 
> Yes I've also used it to optimise my system in AB. Mainly to see 
how it 
> compares with my Metastock exploration numbers.
> 
> > (I haven't tried it with new backtester but I suspect it may
> > not work - Please correct me if I'm wrong Chuck).
> 
> I don't think it would make a difference as you can do 
an "explore" in 
> Amibroker where you can setup the buy's, sell's, initial stop, 
volume etc 
> in Tradesim's data format.
> 
> > As AB improves I find myself using TradeSim less, but I still
> > test any potentially favorable system with TradeSim.
> > The Monte Carlo analysis, worst case scenarios and the ability
> > to exclude those exceptional large winning trades from the 
> > analysis, along with pyramiding etc adds to the confidence one
> > has in a system.
> 
> I'm the same, using Metastuck/Tradesim less and less (hardly ever 
start 
> Metastuck now!). I see that Monte Carlo and pyramiding will soon 
be in 
> Amibroker. Maybe Tomasz could add those other things you mention 
to 
> the list!
> 
> It would be good to see the backtesting results more graphic too. 
I 
> guess you could set this up in AB already similar to Tradesim ie: 
monthly 
> charts etc
> 
> Cheers Glenn
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Andrew" <a.perrin@xxxx> wrote:
> > Glenn
> > TradeSim is a great product.  There are users of AB that use 
> > TradeSim also, myself included.  Chuck Rademacher has written 
> some 
> > code which you will find in the files section - Convert.exe - 
which 
> > converts the Old AB Backtests to TradeSim Data Files ( I haven't 
> > tried it with new backtester but I suspect it may not work - 
Please 
> > correct me if I'm wrong Chuck).  Other options are to use the 
one of 
> > the table handling Pluggins such as Osaka to build a Text Trade 
> > Database file for use in TradeSim.  This option also enables you 
to 
> > make full use of TradeSims ranking capabilities.  As AB improves 
I 
> > find myself using TradeSim less, but I still test any 
potentially 
> > favorable system with TradeSim.  The Monte Carlo analysis, worst 
> > case scenarios and the ability to exclude those exceptional 
large 
> > winning trades from the analysis, along with pyramiding etc adds 
to 
> > the confidence one has in a system.
> > Andrew


------------------------ 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/