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

Re: [amibroker] Monte Carlo Analysis in AMIBROKER?


  • Date: Mon, 25 Jan 2010 10:42:28 -0700
  • From: Howard B <howardbandy@xxxxxxxxx>
  • Subject: Re: [amibroker] Monte Carlo Analysis in AMIBROKER?

PureBytes Links

Trading Reference Links



Hi Joseph --

One straightforward way to study the effect of survivorship bias is to set up a watchlist for each period.  Enter the tickers of those issues that are components of that index at the beginning of the period.  On the AA Settings dialog box, select a watchlist and set the Range to the dates that watchlist would have been current.  Click Backtest or Explore.

You can make a single run with the date range set to a longer period, but you still need some way of identifying which issues to use for which date range.  You could use a watchlist for each period, then have the afl check the date being processed and verify that the ticker being processed is a member of the watchlist that goes with that period.  Coding that in the afl is possible but tedious to code and hard to maintain. 

The first way will probably give some distortion at the date boundaries for those trades that are open across the boundary when the watchlist changes.  Since you hold no position overnight, you will not be affected by this.  The second way avoids the boundary problem, but at considerable added program complexity. 

The longer typical positions are held and the further back in time the tests are run, the more survivorship bias becomes an issue.  The key to avoiding survivorship bias is to work with a list of tickers that you would have chosen if you were running the tests on the date the test date range begins.

Thanks,
Howard 
 

On Sun, Jan 24, 2010 at 8:27 PM, Joseph Occhipinti <joseph_occhipinti@xxxxxxxxx> wrote:
 

Thank you Howard

Greatly appreciated

Just a question regarding the following comment of yours:

"Use the lists of stocks that were in an index at the start of each year and run tests one year at a time, with lists reconstructed at the beginning of each year."

Instead of back testing 'All Quatotaions', I select 'From' (selecting one year at a time), will this address the issue of survivorship bias? As an example:


as at 01/01/2008
a
b
c
d
e

as at 01/01/2009
a
b
c
d

as at 25/01/2010
a
b
c


If I were to run tests one year at a time - say i chose 01/01/2008 to 01/01/2009 - does that mean that AB will only pick up stocks a, b and c given they are the only ones left in the index as at todays date? 

Or will AB pick the results of a,b,c,d and e for that year? And then simply omit 'e' for the following year's test?

(When a stocks get delisted does that mean it is ommitted from any historical testing done?)

MY SYSTEM:
In short, my system is an intraday one - im in by the open and out by the close. So i hold no stocks overnight. So i am not exposed to trading halts or overnight gaps etc.
(not sure if this makes a difference)


Thanks again for your time Howard







__._,_.___


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

__,_._,___