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

RE: [amibroker] Adding Buy & Hold Metric to backtest



PureBytes Links

Trading Reference Links

Just copy and paste from Tomasz's forumla on individual equity .....

if( ParamToggle("Show Buy-and-Hold?", "No|Yes", 1) )

{

   /* now buy and hold simulation */

Short=Cover=0;

Buy=Status("firstbarintest");

Sell=Status("lastbarintest");

SetTradeDelays(0,0,0,0); PositionSize = -100;

ApplyStop(0,0,0,0);

ApplyStop(1,0,0,0);

ApplyStop(2,0,0,0);

Plot( Equity( 0, -2 ), "Buy&Hold", -9 );

}


  _____  

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf
Of dmcleod1981
Sent: Saturday, 17 February 2007 3:31 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Adding Buy & Hold Metric to backtest



I may be using the wrong key words when I am searching but I can't find 
any previous samples that show how to add the buy and hold return 
during the back test period. If someone has any snippets or can 
reference a post number I would be greatful. 

Thanks
DM



 

Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.18.1/690 - Release Date: 2/16/2007 2:25 PM