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

[amibroker] Help w/Code - Rotational Trading?



PureBytes Links

Trading Reference Links

Could someone please give me some suggestions on how I might 
accomplish the following:

- Establish a basket of stocks (I can do this)
- Review the basket periodically and determine which meet certain 
criteria (I can do this)
- Buy all stocks in the basket that meet the criteria in equal weights 
using all available cash (This I can do)
- Somtimes there may be 20 and sometimes there may be 0.  However, 
with every periodic review I need to rebalance as required. So, for 
example, if stocks meeting the criteria went down from 5 to 4 I would 
need to purchase additional shares of the 4 remaining on the list. 
Alternatively I could go from 4 to 5 and need to trim the prior 4 to 
add the fifth stock. (This I can't figure out how to code.)

Also, would you even use rotational trading for this because you could 
own anywhere from zero stocks to every stock on the list depending on 
which met/didn't meet the criterion?  I suppose I could force sell 
everything and simply repurchase each period, but I'd prefer to 
backtest the way it would actually be implemented.




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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
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:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto: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/