PureBytes Links
Trading Reference Links
|
> I'm unclear about one thing:
>
> if a stock that's already hold long now get sold short, does that
> automatically close out the long position too? does the checkbox in settings
> still effect this?
Given security can either be short or long, so long position for given security
is closed when you enter short.
The setting "Reverse signal causes exit' affect REGULAR mode only
where there are separate buy/sell/short/cover signals, but they are
ignored in ranking mode.
In ranking mode we have got only rank that can be either positive (long)
or negative (short). So you can not have long and short open at the same
time for single security.
> it seems like portfolio mode would have to always close opposing positions,
Yes of course.
Best regards,
Tomasz Janeczko
amibroker.com
> dave
>
>
> > Just do the following:
> >
> > AbsRank = ... that gives the rank 0...100 for candidates for
> > trading no matter if long or short - 100 - very good candidate, 1- poor
> > UpTrend = the formula that gives True if market is going up and
> > False when going down
> >
> > PositionScore = IIF( UpTrend, AbsRank, -AbsRank );
> >
> > This is if you have the rank that scores candidates for trading
> > regardless of market condition
> >
> > If you on the other hand have only formula that assigns positive
> > ranks for good longs and
> > negative ranks for good shorts AND you have some external 'trend'
> > indicator than you can do the following:
> >
> > Rank = -100....100 - depending if good short (negative) or good
> > long (positive) candidate
> > UpTrend = True if uptrend False otherwise
> >
> > PositionScore = IIF( UpTrend AND Rank > 0, Rank, 0 ) + IIF( NOT
> > UpTrend AND Rank < 0, Rank, 0 );
> >
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message -----
> > From: "Dave Merrill" <dmerrill@xxxxxxx>
> > To: "AmiBroker" <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Tuesday, September 30, 2003 9:56 PM
> > Subject: [amibroker] exits in portfolio test mode
> >
> >
> > > (tomasz, I know you're not really providing support for
> > portfolio backtest
> > > mode yet, since it's an early beta of it, so ignore this question if you
> > > want.)
> > >
> > > say I have a system that goes long or short, depending on some overall
> > > market signal, buying or shorting the top 10 stocks when ranked by some
> > > criteria. the first buy signal comes in, the stocks in the
> > system's universe
> > > are ranked, and the top 10 get bought.
> > >
> > > now the market signal switches to short. what should happen is that all
> > > longs currently held should be sold, and the top 10 stocks (ie lowest
> > > negative scores) should get shorted.
> > >
> > > how should I arrange this? if I just rank all the potential
> > shorts I want
> > > and zero the scores of the rest, that will short the lowest 10,
> > but won't
> > > ensure that the existing longs get sold first. if I set the
> > existing longs
> > > to zero, that'll sell them, but exclude them from the short
> > screen happening
> > > at the same time.
> > >
> > > it seems like I'd need to zero out all but the top 10 shorts,
> > but I can't
> > > know what they are in any easy way. there's probably some
> > sophisticated way
> > > to find out, like PT did, but that defeats the ease of use of the new
> > > portfolio mode.
> > >
> > > or am I thinking about this wrong? does entering a short position
> > > automatically exit any existing long positions on the same
> > stock? does that
> > > happen before positionsize allocations are done, so the long position is
> > > recognized as needing to be filled by some short?
> > >
> > > thanks,
> > >
> > > Dave Merrill
> > >
> > >
> > >
> > > Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> > > Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> > > -----------------------------------------
> > > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> > > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > > --------------------------------------------
> > > Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> >
> > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> >
> >
> >
>
>
>
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>
>
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|