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

Re: [amibroker] Portfolio Backtester



PureBytes Links

Trading Reference Links

Hi Steve,
 
I'm again late to the party, having been preoccupied since the start of the year (or a bit earlier) with family issues, "other than trading" business issues, property issues, tax preparation issues and several more distractions to my ability to keep up with AB.  This week I finally started to break out getting things behind me (or I'm getting ahead of them?).  Quite coincidentally, I decided to have another look at the portfolio backtester just as you have apparently started to do so.  And like you, I've mostly used the individual backtester heretofore. 
 
What I see (maybe incorrectly) is that it is great for fully testing a trading system and potentially gaining sufficient confidence in a strategy to implement it.  While one can also optimize the strategy, I believe some care must be taken with this so as not to curve fit to the data.  There are several books (Perry Kaufman comes to mind as one author) on developing trading systems and perhaps I need to read more about it all -- however I've a number of ideas I've been jotting down in a spiral notebook during my development hiatus which I'd love to code and test.  Some are from things I've been doing by the seat of my pants lately (with some very good returns, but perhaps it's luck),  some are just notions I've had for possible explorations  and subsequent entry or exit triggers.  Most of my trading for the past several years has been based not on indicators, but on patterns such as Jeff Cooper, Larry Connors, Linda Raschke, and others have written about with my own flavorings added to the stew.  And most of my trading is intraday or up to perhaps 3 days on daily setups.  Trying to eyeball thousands of charts to see if a strategy makes a buck isn't my idea of how I want to spend my time while the market is closed. 
 
I've read the User's Guide several time thru and I've coded some systems, mostly simplistic, as I'm still trying to learn all the different features to see how they behave.  What I've been doing is using some of my exploration codes which I use normally to identify stocks to trade, then adding code for the entry and exit rules (along with all the other minutia necessary) and seeing how the system performs.  Once again, Dan Clark's imagery of AB as an onion with layers of complexity which each user can peel down to seems so apt. 
 
So off I go into the wild blue yonder of portfolio backtesting.  Want to fly together?  (And if anyone thinks I'm dead wrong, about to crash, or has good tips and suggestions for learning, please speak up.) 
 
Peace and Justice   ---   Patrick
----- Original Message -----
Sent: Friday, April 28, 2006 3:29 PM
Subject: Re: [amibroker] Portfolio Backtester

Hi Ara,
 
Thank you for the reply!  Well, I have to admit that you make it sound pretty simple and straigntforward, and I think maybe you zeroed in on my confusion when you mentioned "stock selection system", but to be honest I think I am still missing something very basic. If you don't mind a follow-up question, I will try to explain: 
 
Using the individual backtester, I select my watchlist and then run my system over the list. When the test is finished, results show each stock and how well it performed under that system. I review the results to see how well the different stocks performed and to determine what stocks, if any, that I might consider trading with that system - stock selection is not usually something that I do prior to testing, except to establish a "tradable universe" based on various price/volume calculations. Also, I do use the Positionsize variable with the individual backtester to see how reinvesting different amounts would affect performance.  
 
Now switching to the portfolio backtester...
 
OK, I understand that in real life we will have an account with X amount of dollars, and that it will probably be split up between several positions ( our portfolio ), and that we will try to remain fully invested if possible, assuming we can find enough good looking opportunities to invest in. So I run the portfolio backtester on a list of, say 1000 stocks, and the results list shows all trades that were taken, and it shows that, at some point or another, a position was taken in maybe about 10% of the stocks in the watchlist, which I gather were the ones that had an entry signal and the best score shortly after some cash became available. The other tickers tested don't show up at all in the results list, so apparently no position was ever taken in these stocks. When I look at these results, I just don't know how to begin to interpret them.
 
So I guess my real question is "What can I learn from looking at the results of a portfolio backtest?"  I get the feeling that the correct approach to using the portfolio backtester should be totally different than the approach for using the individual backtester, but I don't know what that approach should be. Should I test with a smaller list of stocks - a predefined portfolio? Should I infer that those stocks that were actually traded are the best stocks to trade with that system? - that sounds like a lot to infer to me, but maybe I am missing something. Could you possibly explain briefly how you might approach a portfolio backtest (i.e. - what stocks might you test together and why?) and then how you might interpret the resulting report? Any further enlightenment you can provide would be greatly appreciated!!   8 - )  Thanks again!
 
Steve
 
----- Original Message -----
Sent: Thursday, April 27, 2006 8:52 PM
Subject: Re: [amibroker] Portfolio Backtester

Steve
 
The idea behind Portfolio backtest is to simulate trading closer to reality.
 
Original Backtester would allocate ALL available funds to each trade. Not a real situation since no one has infinite $$$.
 
 
 
Portfolio backtest will work with your account size and buy only as many stocks as you can afford. You can specify max number of stocks you want, and it will allocate funds evenly ... etc. so it works with your account parameters, while still testing your stock selection system. It will buy additional stocks only fter you sell some and free up some money.
 
 
----- Original Message -----
Sent: Thursday, April 27, 2006 1:26 PM
Subject: [amibroker] Portfolio Backtester

Hi All,
 
I started looking into the portfolio backtester today for the first time, and I am a bit embarresed to admit it but I have absolutely no idea what to do with it. Functionality is explained OK but there is very little to explain the theory behind portfolio testing or trading. I did a little hunting on the internet but am not exactly sure what I should be searching for. Is this for people that do basket-trading or something similar? I would greatly appreciate it if someone could explain how and why I would want to use this, or if possible point me to some helpful web pages. As I have said, I know nothing about it, so even the very basics would be great. Any help appreciated - Thanks very much!
 
Steve


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS