PureBytes Links
Trading Reference Links
|
In an earlier post I said I was having trouble with the deleted
stocks in the CSI database. When a backtest is holding one of these
stocks when the data ends, the report shows this as an open position
and carries it forward to the end of the backtest. Maybe the worst
effect of this is that it ties up the money held in that position and
distorts the returns.
It was suggested to exit stocks when they show zero volume. I
actually got this to work (Sell=Volume==0;), but the problem is that
most stocks do not show zero volume on their last day of data. There
are over 6,000 -- too many to manually add on a zero volume bar.
I've spent a couple hours experimenting with other methods, but came
up empty. I think the solution lies in executing a sell whenever it
detects there is no data tomorrow. I tried doing this with the
IsEmpty function but couldn't pull it off.
I was experimenting with this but couldn't get it to work:
Y=IsEmpty(Ref(C,1));
Sell= y;
Could someone point me in the right direction? Thanks, Wayne
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> 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/
|