PureBytes Links
Trading Reference Links
|
Hello,
ScoreNoRotate does not work as expected!
Please copy and paste the following code into your AA window. Read it
and then run it, following the simple directions provided in the
code. Reply to this email as well so we can have dialog on this
important issue.
Per Marcin Gorzynski at AmiBroker Support, ScoreNoRotate does not
work on 'per symbol' but on 'per date/time' basis, so if you have
positionScore equal to ScoreNoRotate for just one symbol - it
will stop any rotation (only stops will work, but no other trades
will be performed).
This is a big problem for FastTrack users.
Lets say that you do not want to sell any fund (that you own) during
the Sell period unless its RSI Stochastic falls below 50. Well, the
Dallas FastTrack group understood that it could set PositionScore to
ScoreNoRotate (in rotational trading) for those funds with
RSIStochastic values above 50. Thus, if one set the PositionScore to
zero for all other funds during the sell period, then only the funds
with RSIStochastic values less than 50 would be sold.
However, this is not how AmiBroker works (today) as noted above.
Imagine that you have a list of 100 'good' funds, want to own no more
than 5 during any period, are willing to keep any fund that you know
own as long as it remains in the top 30 and has an RSI Stochastic
greater than 50. How do you do this? It certainly is not an
uncommon issue for FastTrack users. Sure, one can set the
PositionScore to a positive number if the funds RSI Stochastic is
greater than 50, but this will not always work give the top 30 cut
off (i.e., the fund must be in the top 30, based on PositionScore,
and also have an RSI Stochastic greater than 50 during the sell
period or it will be sold).
Am I missing something??? SHOULDN'T SCORENOROTATE BE CHANGED TO
BE 'PER SYNMOL' AND NOT 'PER DATE' AS IS THE CASE TODAY?????? IF
NOT, THEN WHAT IS THE VALUE OF SCORENOROTATE????
Anyways, here is the code. Please help!!!!!!!
*******************************************************
// Run this test on a watchlist of any 4 issues with a start Date <
10/18/02
// Setup all trading options to insure proper execution
MaxPos = 4;
EnableRotationalTrading();
SetFormulaName("Problem Test Run");
BuyPrice = SellPrice = ShortPrice = CoverPrice = Close;
Delay = 0;
SetTradeDelays(Delay, Delay, Delay, Delay);
SetOption( "InitialEquity", 100000 );
SetOption( "AllowSameBarExit", True );
SetOption( "ActivateStopsImmediately", False );
SetOption( "AllowPositionShrinking", True );
SetOption( "FuturesMode", False );
SetOption( "InterestRate", 0 );
SetOption( "MaxOpenPositions", MaxPos );
SetOption( "WorstRankHeld", 4 );
SetOption( "MinShares", .0001 );
SetOption( "PriceBoundChecking", True );
SetOption( "CommissionMode", 2 );
SetOption( "CommissionAmount", 0 );
SetOption( "MarginRequirement", 100 );
SetOption( "ReverseSignalForcesExit", True );
SetOption( "UsePrevBarEquityForPosSizing", False );
PositionSize = -100/MaxPos;
RoundLotSize = 0;
// For all but the first issue, set the PositionScore to effectively
// Buy on 10/28/02
// Sell on 12/10/02
// Buy on 03/28/03
// For the first issue
// ScoreNoRotate from 12/01/02 to 12/20/02
// SO - what you would expect is for the first issue to sell on 12/20,
// and all others to sell on 12/10
// WHAT HAPPENS IS THAT THEY ALL SELL ON 12/20
// THE PROBLEM SEEMS TO BE RELATED TO HAVING A SCORENOROTATE - IT
// AFFECTS THE SALE OF THE OTHER ISSUES
// Explore will show the PositionScore dates
// Backtest will show the trade dates.
PositionScore = 0;
// Set PositionScore = 1 starting 10/28/02 and to but not
// including 12/10/02; 0 else
PositionScore = IIf(DateNum() >= 1021028 AND DateNum() < 1021210, 1,
PositionScore);
// Set PositionScore = 0 starting 12/10/02 and to but not
// including 03/28/03; PositionScore else
PositionScore = IIf(DateNum() >= 1021210 AND DateNum() < 1030328, 0,
PositionScore);
// Set PositionScore = 1 starting on 03/28/03; else PositionScore
PositionScore = IIf(DateNum() >= 1030328, 1, PositionScore);
// Set PositionScore, for the first symbol, to scoreNoRotate
// starting 12/01/02 AND to but NOT including 12/20/02; else
PositionScore
if (Status("stocknum") == 0)
{
PositionScore = IIf(DateNum() >= 1021201 AND DateNum() <
1021220, scoreNoRotate, PositionScore);
}
Filter = DateNum() >= 1021025 AND DateNum() <= 1030401;
Filter = Filter AND (PositionScore != Ref(PositionScore, -1));
AddColumn(PositionScore, "PS", 4.0);
//
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> 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/
|