- Joined
- 12 February 2006
- Posts
- 202
- Reactions
- 0
// Explorer Output for TradeSim
// Trades may need to be delayed
Buy = Ref(Buy,-1); Sell = Ref(Sell, -1);
Cover = 0; Short = 0;
TradeStop = exit;// Initial stop for TradeSim - alter as necessary
Equity( 1 ); // evaluates trades and stops
Filter = Sell;// OR Cover; // Not set up for short trades at this stage
IsLong = Sell;
dt = DateTime();
// Determine values for Explorer
EntryDate = IIf( IsLong, ValueWhen( Buy, dt ), ValueWhen( Short, dt ) );
ExitDate = dt;
EntryPrice = IIf( IsLong, ValueWhen( Buy, BuyPrice ), ValueWhen( Short, ShortPrice ) ); // Set buy and sell prices to Open for TradeSim
ExitPrice = IIf( IsLong, SellPrice, CoverPrice );
EntryLow = IIf( IsLong, ValueWhen( Buy, L ), ValueWhen( Short, L ) );
EntryHigh = IIf( IsLong, ValueWhen( Buy, H ), ValueWhen( Short, H ) );
EntryVolume = IIf( IsLong, ValueWhen( Buy, Ref(V,-1) ), ValueWhen( Short, Ref(V, -1) ) );
InitialStop = IIf( IsLong, ValueWhen( Buy, TradeStop ), ValueWhen( Short, TradeStop ) );
ExitLow = L;
ExitHigh = H;
SetOption("NoDefaultColumns", True );
AddTextColumn( Name(), "Symbol" );
AddColumn( IIf( IsLong, 76, 83 ), "Long/Short", formatChar ); // L or S letter
AddColumn( EntryDate, "EntryDate", formatDateTime);
AddColumn( ExitDate, "ExitDate", formatDateTime);
AddColumn( InitialStop, "Initial Stop", 1.3 );
AddColumn( EntryPrice, "EntryPrice", 1.3 );
AddColumn( ExitPrice, "ExitPrice", 1.3 );
AddColumn( EntryLow, "EntryLow", 1.3 );
AddColumn( EntryHigh, "EntryHigh", 1.3 );
AddColumn( L, "ExitLow", 1.3 );
AddColumn( H, "ExitHigh", 1.3 );
AddColumn( EntryVolume, "EntryVolume", 0.0);
Stevo,
I have always thought AB was the perfect reply to Metastock/TradeSim. Does AB have backtesting limitations compared to Metastock/TradeSim because I have the latter. Thinking about buying AB. Do I need it or am I about to waste my money?
Thanks Chorlton,
I gues I should get AmiBroker - I really like the look of it. The coding worries me a bit but I think I will be able to learn enough - just have to put the hours in.
Hey is your forum name taken from kids show from over 30 years ago with a dragon named Chorlton, the wheelies, the spikies and a witch that lived in a kettle?
Cam
I haven't been visiting ASF for some time. AB is definitely not a waste of money. I did have Metastock for some years but changed over in 2003 (or thereabouts). No regrets since AB is an excellent product.
Anything that MS and Tradesim can do AB can do (although sometimes not as flexible), but old habits die hard and I still will double check a system on TradeSim. You can also have a lot of fun with AB and Excel or similar software as shown by the charts below.
AB cannot do Monte Carlo fast enough so they down play that feature and instead promote portfolio optimization and walk forward testing which is an over simplification of an otherwise complex problem and totally flawed IMHO.
We added a Parametric Sweep function to the latest version of TradeSim Enterprise and this requires even more computational resources. For example, stepping a parameter 20 times in AB optimization would require 20 simulations. With the Parametric sweep facility and 5000 simulations per step would require 100,000 simulations. This is quite easily accommodated with TradeSim without having to wait months to finish it and provides infinitely more information which is hidden by an otherwise over simplified optimization process.
http://www.compuvision.com.au/ParmetricSweep.htm
David,
Firstly, Great Job !!! TradeSim is evolving from strength to strength and this latest addition will only help to reinforce that!!
One question though. With the Parametric Sweep feature, I am correct in assuming that one will need to use new MS functions to be able to capture the relevant data (ie. the variables to be optimised) from MS, for use within TradeSim?
I ask as I currently use AB & TradeSim (instead of the recommened MS-TradeSim combo) and consequently, I'm concerned that I won't be able to utilise these new features.
The other option is to purchase MS but this would then mean that I would need to recode all my strategies into MS and given some of their complexity this is probably beyond my scope.
The parameters being stepped are the trading parameters within TradeSim itself so it doesn't matter how the trade database is created.
Later on we will add the ability to do a similar thing with a list of different trade databases created from stepping the system variables as is done in the normal optimization procedure. However unlike a conventional optimization each time a variable is stepped a Monte Carlo analysis is run.
As you can see there is a lot more information that is obtained using this method and even after running a sweep it is not just a simple matter of picking an optimum value due to the statistical variance from each Monte Carlo run.
Regards
David
Tradesim
Nice!
With Monte Carlo TradeSim is very fast when compared to Amibroker.
I am wondering if it's possible to implement the Parametric Sweep with Amibroker / Tradesim combination? I will have to have a look (and upgrade my TradeSim version as well).
stevo
hi guys
looking to buy tradesim with either bullcharts or amibroker (probably both).
Is tradesims enterprise version worth the extra for a private trader?
Any opinions would be appreciated.
thanks guys
Thanks Chorlton
Did it take you a while to learn the program?
Have been using MS eod 7 for just on 10 years and looking to change to bullcharts or amibroker and test some ideas using tradesim.
Might just start off with the pro version and see how it goes.
cheers
Hi Tradezy --
I have made several posts related to TradeSim over the past several years. Search for them, read them, think about how you will be using TradeSim.
Tools are definitely improving. There are several options for doing Monte Carlo analysis related to trading system development that were not available when some of the posts were made, and there are new and much more powerful tools coming. Post back with what you hope to accomplish.
Best regards,
Howard
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?