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

Re: [amibroker] why is optimization for a large number of stocks so much slower?


  • Date: Thu, 21 Jan 2010 07:47:26 -0700
  • From: Howard B <howardbandy@xxxxxxxxx>
  • Subject: Re: [amibroker] why is optimization for a large number of stocks so much slower?

PureBytes Links

Trading Reference Links



Hi Steven --

The answer is in the combinatorics.

If I ask for the best combination of, say, 5 stocks from among 20 choices, we are asking "what is the best choice of 20, taken 5 at a time?"  The number of possibilities that must be evaluated is

n! / (r! * (n-r)!)

where n is 20, r is 5, and ! is the factorial operation.

As the universe being searched increases from 20 to 300, the number of combinations searched increases at a rate much higher than exponentially.

The sterling approximation of n! is sqrt(2 * pi * n) * (n ^ n) * exp(-n)

Thanks,
Howard


On Thu, Jan 14, 2010 at 4:29 PM, stevenjhamon <stevenjhamon@xxxxxxxxx> wrote:
 

I have a rotational system that takes about 30 min to optimize when I run it on a basket of 20 stocks. When I run it on a basket of 300 stocks, it takes more than 5 days, which is proportionally much greater.

I use esignal datafeed, optimize with cmae and have 5 variables, 17177 optimization steps.

Is there any way to speed this up? I tried changing the number of bars to load and memory used in the preferences but it didnt help.




__._,_.___


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





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___