PDA

View Full Version : Survivorship Bias


jalsero
1st April 2009, 11:31 PM
Hi,

I upgraded to the latest version of TradeSim. I am able to import all the various Indices that I want to test against. However, I'm just wondering, is this utility only useful for Metastock users, or can BullChart owners also somehow make use of it

Thanks

Robert

David Samborsky
2nd April 2009, 12:32 AM
Yes it should work with BullCharts but your BullScan trade database exploration will have to be written in BullScript in order to use the function.

There is an example SBF table file(tbl) for the A&P/ASX20 that you can use which should be installed in the following directory:-

C:\TradeSimData\TableFiles\SBF\ASX20\

Check the following document on how to create and edit trade database BullScripts in BullCharts

http://www.compuvision.com.au/Downloads/Docs/TradeSim%20Quick%20Start%20Tutorial%20for%20BullCh arts.pdf

Although I haven't tested this you can try the following MACD trade database BullScript to generate a trade database which is survivorship bias free. It assumes that the SBF table file "16-JAN-2009_ASX20.tbl" is stored in the following directory:-

C:\TradeSimData\TableFiles\SBF\ASX20\

{Generated BullScript for "TradeSim Sample Scan" scan}
{Condition: return all securities }
filter := true;
filter;
{-- Trading System : "Sample MACD System" --}
_var1 := formula("MACD", 12, 26, 9);
_var2 := formula("MACD[2]", 12, 26, 9);
EntryTrigger := (cross(_var1, _var2));
EntryPrice := Open;
ExitTrigger := (cross(_var2, _var1));
ExitPrice := Open;
InitialStop := 0;
[visible=no]
ExtFml("TradeSim.Initialize");
ExtFml("TradeSim.EnableDelayOfEntryByOneBar");
ExtFml("TradeSim.EnableDelayOfAllExitsByOneBar");
ExtFml("TradeSim.SetVolumeInfoType",LOWEST);

ExtFml( "TradeSim.ApplySBFTable","C:\TradeSimData\TableFiles\SBF\ASX20\16-JAN-2009_ASX20.tbl",RemoveUnwantedTrades);

[name="Sample MACD System Trades"; dp=0; visible=yes]
ExtFml("TradeSim.RecordTrades",
"TradeSim Sample Scan",
LONG,
EntryTrigger,
EntryPrice,
InitialStop,
ExitTrigger,
ExitPrice,
START);