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

[amibroker] Re: Making and Index representative of the cash position in a system???



PureBytes Links

Trading Reference Links

Thanks Mike! I'll check it out.

--- In amibroker@xxxxxxxxxxxxxxx, "Mike" <sfclimbers@xxx> wrote:
>
> 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 amibroker@xxxxxxxxxxxxxxx, "Mike" <orionsturtle@> 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 amibroker@xxxxxxxxxxxxxxx, "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 amibroker@xxxxxxxxxxxxxxx, "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!
> > > >
> > >
> >
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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/