Tomasz provided a related sample a while back that might help to illustrate the 
idea.

http://finance.groups.yahoo.com/group/amibroker/message/114784

Mike

--- In [email protected], "Mike" <orionstur...@...> wrote:
>
> Thanks Mike.
> I am looking into the Custom BT stuff but it's slow going for me since I am 
> not a very accomplished programmer. I like your latter Idea of faking out the 
> BT, I will see if I can do that.
> Thanks again!
> 
> --- In [email protected], "Mike" <sfclimbers@> wrote:
> >
> > You could almost certainly do this using custom backtester code.
> > 
> > e.g.
> > - Start your script by taking a 100 investment in SPY.
> > - Add Buy/Sell logic for your watchlist symbols
> > - Write low level custom backtest code that generates a Sell order 
> > equivalent in size to every Buy signal, and a Buy order equivalent in size 
> > to every Sell signal.
> > 
> > It's actually somewhat more complicated since you would have to do all the 
> > checking to see if the buy/sell signals would actually result in trades 
> > with respect to sufficient funds, max positions, etc. before manually 
> > taking the associated sell/buy of SPY.
> > 
> > You might choose instead to fake out the backtester by adding the 
> > equivalent value of SPY position to bo.Cash, let the backtester do its 
> > thing, then reduce/increas SPY holdings in light of the trades performed. 
> > You would then have to reset the bo.Cash back to zero.
> > 
> > In any event, read the custom backtester document in the Files section of 
> > this group.
> > 
> > Mike
> > 
> > --- In [email protected], "orionsturtle" <orionsturtle@> wrote:
> > >
> > > I want to have the system I'm developing go into an index by default 
> > > instead of cash. 
> > > So whenever I get a sell in the portfolio in a watchlist of a stock it 
> > > goes into SPY instead of cash. Positionsize of stocks would be set to 20% 
> > > of the total portfolio, but the SPY position size could be at times 100% 
> > > of the portfolio just like cash can by default.
> > > 
> > > Would anyone know how to do this?
> > > 
> > > Thank you!
> > >
> >
>


Reply via email to