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

Re: [amibroker] Rotational Trading question



PureBytes Links

Trading Reference Links

>Lets say that on one date that I have 20 stocks that pass muster and I want
>to allocate my $ evenly over those 20. Then the MaxOpenPositions would be
>20, right? 
 
Right but not only that. You need to set PositionSize = -100/20; // 5% of equity in one security
Otherwise you won't have enough money to open 20.
 
>But on the next date I only have 10 stocks that pass must and I want to
>allocate my $ evenly over those 10. How do I do that?
 
Simply make sure that your formula generates non-zero score only for ten symbols
or use:
 
PositionSize = -10; // 10% of equity
 
This way even if your settings allow 20 positions, AB won't enter more than 10 because
there will be not enough funds to enter more than 10.
 
"MaxOpenPositons" is.... the MAXIMUM. It does not say that you MUST enter as many.
All it says is that you may enter not more than that.
 
You should use PositionSize to vary your allocation on trade-by-trade basis.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: dingo
Sent: Wednesday, April 26, 2006 6:17 PM
Subject: [amibroker] Rotational Trading question

duuudes:

I need some help in understanding how Rotational Trading works:

Lets say that on one date that I have 20 stocks that pass muster and I want
to allocate my $ evenly over those 20. Then the MaxOpenPositions would be
20, right? 

But on the next date I only have 10 stocks that pass must and I want to
allocate my $ evenly over those 10. How do I do that?

The number of stocks is only determined after they are filtered in the same
AFL that does the buying and selling and I'm under the impression that
SetOption( "MaxOpenPositions" ..) and SetOption( "WorstRankHeld"...) are to
be set at the beginning of the code and can't be dynamic.  Is this
assumption correct? If so, how does one go about this?

TIA

confooosed dingo



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





YAHOO! GROUPS LINKS