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

RE: [amibroker] Re: CBT: Scaled trades



PureBytes Links

Trading Reference Links

Seems to me that you should take out the rotational trading stuff and do it
your self in the CBT. That's what you're trying to do anyway.

d 

> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx 
> [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of vlanschot
> Sent: Friday, May 04, 2007 10:44 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: CBT: Scaled trades
> 
> Paul, appreciate the feedback, but that's exactly where the 
> difficulty is. See below.
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Paul Ho" <paultsho@xxx> wrote:
> >
> > 1. Cash is a property of the backtester
> >     so bo.Cash gives you the available cash at each bar;
> 
> I understand. This is the cash available at the end (start) of the 
> (next) bar. Say my scaling takes place at bar 2, assuming I get my 
> signals on the close of bar 1.
> 
> > 2. posize and poscore are properties of the signal object.
> > if you want to you can do all your selling/scaleout first, and use 
> the
> > available cash to do what you need.
> 
> With CBT & Rotational (see TJ's original code @ 
> http://www.amibroker.com/kb/2006/03/06/re-balancing-open-positions/),
> 
> I cannot get to the amount of cash generated by the ScaleOut-trades, 
> let alone allocate cash over the subsequent ScaleIn trades since 
> signal.Type cannot specify between the two. Also, the possize and 
> posscore in the rebalancing are different from those used for the 
> entry/exit trades, i.e. I have defined them within the pos = 
> GetFirstOpenPos loop.
> 
> > and use the bo.EntrerTrade or bo.ScaleTrade to do what you need.
> 
> My conclusion, and I hope I'm wrong: bo.ScaleTrade in rotational mode 
> cannot be ranked/get trade-specific cash allocations in case one uses 
> rebalancing criteria within the OpenPositions-list.
> 
> This strategy may sounds complicated, but isn't. As I've written 
> elsewhere, I simply want to hold all constituents of an index all the 
> time, but reweight (e.g. monthly) the positions based on stock-
> specific arrays, 1 being my score, and the second the official 
> relative weight of the stock in the index, both of which obviously 
> change over time.
> 
> PS
> 
> > 
> > 
> >   _____  
> > 
> > From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] 
> On Behalf
> > Of vlanschot
> > Sent: Thursday, 3 May 2007 11:00 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Re: CBT: Scaled trades
> > 
> > 
> > 
> > Thanks mate, but forgot to mention: I use rotational mode in CBT 
> > which seems to complicate matters due to the fact that scaling is 
> > triggered by stock-specific variables (arrays) which relate to both 
> > (current vs. required) PositionSize and (previous vs. new)
> > PositionScore. 
> > I have been unable to determine: 
> > 1) how much cash is available for all ScaleIns at each bar
> > 2) how to allocate this cash according to a specific "ScaleIn"-rule.
> > 
> > Support question, I suspect.
> > 
> > PS
> > 
> > --- In amibroker@xxxxxxxxx <mailto:amibroker%40yahoogroups.com> 
> ps.com,
> > "Paul Ho" <paultsho@> wrote:
> > >
> > > Mate
> > > If you're using CBT, you can program the way you want it
> > > just put scaleout before the others, they will be executed 
> first ;)
> > > 
> > > 
> > > _____ 
> > > 
> > > From: amibroker@xxxxxxxxx <mailto:amibroker%40yahoogroups.com> 
> ps.com
> > [mailto:amibroker@xxxxxxxxx <mailto:amibroker%40yahoogroups.com> 
> ps.com] 
> > On Behalf
> > > Of vlanschot
> > > Sent: Thursday, 3 May 2007 9:01 PM
> > > To: amibroker@xxxxxxxxx <mailto:amibroker%40yahoogroups.com> 
> ps.com
> > > Subject: [amibroker] CBT: Scaled trades
> > > 
> > > 
> > > 
> > > Could anybody possibly confirm whether ScaleOut trades are 
> executed 
> > > FIRST, in order to release cash for the subsequent ScaleIn trades?
> > > 
> > > And if so, is the only way to calculate the resulting amount of 
> > cash 
> > > available for the ScaleIn-trades to add (PosSize - Exit 
> > Commissions) of 
> > > each ScaleOut to the bo.Cash of the previous bar?
> > > 
> > > Thx,
> > > 
> > > PS
> > >
> >
> 
> 
> 
> 
> 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
> 
> 
> 
> 



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/