Thanks Mike This is quite helpful.You have given me direction to work on Many thanks
On 2 April 2010 04:41, Mike <[email protected]> wrote: > > > You're far better off using the backtester. Just set the AA Settings such > that: > > - Use a large initial capital > > - Allow many open positions (e.g. 100 if you think that that is the most > you might end up with) > > - Use a small position size (e.g. 1 share or a fraction of a percent of > equity) > > All the calculations will be done for you. Most of the metrics are > expressed in percentages, so it doesn't matter if you're trading $1 or > $1000. > > Metrics influenced by position size, like Net Profit, MDD, etc. will be > misleading since you will have had a near zero exposure. But, many important > metrics like CAR, all stats for Total/Winners/Losers, etc will all work > fine. > > I would not go the exploration route at all. > > You can look into trying the old style backtester which does not do > portfolio handling. That might be closer to what you want. > > http://www.amibroker.com/guide/w_report.html > > > Mike > > --- In [email protected] <amibroker%40yahoogroups.com>, rpc > <rpc20060...@...> wrote: > > > > Thanks Mike.What I want to find is profit/loss if i trade every > > signal.Backtest would consider signals depending on capital available > based > > on position size and maximum open positions I select.. > > > > Secondly I want to find total profit/loss percent generated by each scrip > so > > that I can identify which scrips produce better results for the trading > > system. > > > > If you can guide me in this direction I would be grateful. > > > > > > > > > > On 1 April 2010 03:58, Mike <sfclimb...@...> wrote: > > > > > > > > > > > You need to read the turorials on how to run a backtest. > > > > > > http://www.amibroker.com/guide/h_backtest.html > > > > > > Mike > > > > > > > > > --- In [email protected] <amibroker%40yahoogroups.com><amibroker% > 40yahoogroups.com>, rpc > > > > <rpc20060610@> wrote: > > > > > > > > hi > > > > I want to test a system by finding total profits generated.I am able > to > > > get > > > > tradewise profits but not able to get scripwise profit and total > profit > > > > generated.Follo is my code > > > > > > > > > > > > > > > > Buy = Cross(*C* , MA(*C*,10)); > > > > * > > > > > > > > Sell* = Cross(MA(*C*,10),*C*); > > > > > > > > buyat = ValueWhen(*Buy*,*C*,1); > > > > > > > > sellat = ValueWhen(*Sell*,*C*,1); > > > > > > > > profit = Sellat-buyat; > > > > > > > > profitpercent = profit/buyat * 100; > > > > > > > > to get total profits i have tried following one at a time > > > > > > > > totProfit = Sum(profitpercent,*BarCount*); > > > > > > > > or > > > > > > > > totprofit = cum(profitpercent); > > > > > > > > or > > > > > > > > totprofit = 0; > > > > > > > > for (i=0;i++;i<barcount-1) > > > > > > > > { > > > > > > > > totprofit[i] = totprofit[i-1]+profitpercent[i]; > > > > > > > > } > > > > > > > > Filter = *Buy* *OR* *Sell*; > > > > > > > > AddColumn(*Buy*, "Buy", 1.2); > > > > > > > > AddColumn(*Close*, "Close", 1.2); > > > > > > > > AddColumn(IIf(*Buy*,Buyat,0), "BuyPrice", 1.2); > > > > > > > > AddColumn(IIf(*Sell*,Sellat,0), "SellPrice", 1.2); > > > > > > > > AddColumn(IIf(*Sell*,Profit,0), "Profit", 1.2); > > > > > > > > AddColumn(IIf(*Sell*,ProfitPercent,0), "Profit%", 1.2); > > > > > > > > AddColumn(IIf(*Sell*,TotProfit,0), "TotProfit%", 1.2); > > > > > > > > after i run above I get zero in last column except in cum() function > > > where i > > > > get some numbers which are not correct. > > > > > > > > I would be grateful if someone could help > > > > > > > > TIA > > > > > > > > > > > > > > > > > >
