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

[amibroker] Using Portfolio Backtester To Track Performance - Need Pyramiding



PureBytes Links

Trading Reference Links

One interesting way I have started using the new Portfolio 
Backtester is to track my own live trading performance. Here's how:

1. Extract transactions list from my brokerage's "Transactions" page
2. Write a small script to convert Transactions list into AFL 
buy/sell signals...e.g.

...
Buy=Buy OR (DateNum()==1031118 AND Name()=="URMP");
Buysize= IIf(DateNum()==1031118 AND Name()=="URMP",6000,buysize);
BuyPrice=IIf(DateNum()==1031118 AND Name()=="URMP",0.225,BuyPrice);
...

4. Copy/Paste the AFL  code into AA window
5. Add following line:

PositionSize=Buysize*BuyPrice;

6. Run Portfolio Backtester

and Voila!...i get a plethora of metrics telling me how well i am 
doing, i get account equity curves, trade equity curves, i get trade 
by trade P/L and MAE info and much more!...This is extremely useful 
information to have if you are a discretionary (or semi-
discretionary trader). It is interesting to start looking at your 
own discretionary trading as a system, because in the end it all 
boils down to buy/sell signals and you can see what areas you need 
to work on..Even if you are trading a system (or trying to :) ), 
using this approach can provide valuable information regarding the 
difference between perceived theoretical performance of your system 
and actual measured performance. It can show you where your actual 
results are deviating from the theoretical expectations.

Through this post I also would like to draw attention to the fact 
that implementing pyramiding is an essential step towards the 
maturing of the portfolio backtester. Right now, for example, 
Portfolio backtester gets the P/L wrong on some trades just because 
pyramiding is not yet implemented. It retains the share size of the 
first trade even if i bought the same security multiple times before 
selling. I do not know of a way to get around this except to wait 
patiently for pyramiding to be implemented (i am open to 
suggestions?)

I thank Tomasz for providing such a nice tool and continuing to 
improve the product with great momentum. I am *really* looking 
forward to seeing pyramiding implemented in the near future.

Thanks and Best regards to all
g


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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