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

[amibroker] Delisted stocks cause positions to never close


  • Date: Tue, 26 Jan 2010 03:25:31 -0000
  • From: "woodshedder_blogspot" <woodshedder_blogspot@xxxxxxxxx>
  • Subject: [amibroker] Delisted stocks cause positions to never close

PureBytes Links

Trading Reference Links

When using delisted data, it is possible to buy a stock, and then never get an exit signal due to the stock not trading anymore and getting delisted. 

I have worked around this issue by manually going through 1000s of trades and filtering out the few delisted stocks that cause this problem using code like this:
Filter = StrFind(Name(),"VMSI") == 0 AND StrFind(Name(),"CCSC") == 0;

However, this workaround requires a lot of maintenance as different tests and different systems will cause different stocks to get caught long.

Then, I tried this code:
bi = BarIndex();
Sell=MA5>MA10 OR bi == LastValue( bi );

I'm still getting backtests where the system gets stuck long a delisted position.

I'm sure there is a correct way to solve this problem, but I can't figure it out.

Thanks for any help!
Wood





------------------------------------

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

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    amibroker-digest@xxxxxxxxxxxxxxx 
    amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

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