Hi Keith

That's a brilliant and creative answer!

I started looking into using your method when I accidentally ran into a 
solution that is already built into Amibroker.  If you go into the AA window 
and click on the report tab, you will find a checkbox that says "Generate 
detailed reports for each symbol in individual backtest".  If you check this 
box and do an "Individual Backtest", you'll see the results in the Report 
Explorer.

Thanks again for your guidance!

Ronen

--- In [email protected], Keith McCombs <kmcco...@...> wrote:
>
> Ronen --
> Yes.
> Most of the metrics you want are not displayed by Back Test, but by 
> Optimize.  But that's Ok.
> 
> I just tried this with only two symbols:
> run = Optimize("Runs", 1, 1, 2, 1);  // make max the number of stocks 
> you wish to test
> if((Name() == "QLD" AND run == 1)
>      OR (Name() == "QID" AND run == 2)){
> // your code goes here
> }else Buy = Sell = Short = Cover = 0;
> 
> If you have only a few stocks to test this way, you can just type in the 
> code for each stock.
> However, if you have very many, then make a symbol list using Scan or 
> Explore and export to a spread sheet and/or a good code editor to help 
> generate the code.  Then Optimize, and after it finishes, export the 
> results and merge with your numbered list to include the names with your 
> results.
> 
> Hope this helps.
> -- Keith
> 
> On 8/31/2010 18:52, Ronen wrote:
> >
> > Is there a way to backtest a group of stocks, each individually, and 
> > then get that stats for each stock (i.e. Sharpe, win%, Loss%, #trades)?
> >
> > For example, if my backtest period is 5 years, run the backtest for 
> > stock A for the 5 year period, calculate the stats and then move to 
> > stock B. So, in other words, I would would see how successful a 
> > strategy was for each stock in my universe. Otherwise I would have to 
> > manually run the backtest on stock A, mark down the statistics by hand 
> > and then run the test on stock B etc...
> >
> >
>


Reply via email to