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

[amibroker] Is it possible to speed the custom backtest procedure up ?


  • Date: Tue, 12 Jan 2010 13:18:20 -0000
  • From: "Roman" <Roman.Tatkin@xxxxxxx>
  • Subject: [amibroker] Is it possible to speed the custom backtest procedure up ?

PureBytes Links

Trading Reference Links

My script normally runs for 7-10 seconds on a single symbol with 450000 bars.

After I've used custom backtester it runs for 30 seconds. This is what has been added:

SetOption("UseCustomBacktestProc", 1);
if (Status("action") == actionPortfolio)
{
	bo = GetBacktesterObject();
	bo.preProcess();

	for (nBar = 0; nBar < BarCount; nBar++ )
	{
		for (sig = bo.GetFirstSignal(nBar); sig && sig.isEntry(); sig = bo.GetNextSignal(nBar))
		{
			//_TRACE("" + sig.posSize);
			if (-sig.posSize / 100 * bo.equity > fMaxCapitalForTrade)
				sig.posSize = -fMaxCapitalForTrade / bo.equity * 100;
		}

		bo.ProcessTradeSignals(nBar);
	}

	bo.postProcess();
}

No matter how many trades produced - looks like that SetOption("UseCustomBacktestProc", 1); is the main reason.

Are there any ways to make it faster ?




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/