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

[amibroker] Re: How to use "positionscore" in this formula??



PureBytes Links

Trading Reference Links

Hi Graham,

Yes, I know what the 85% of equity is doing.  I can change it to 100%,
and get better profits, but then the "ulcer" factor goes up.  Don't
see how that has anything to do with my present setup and watchlist,
i.e. plenty of stocks to score.

The "scoring" appears to be working just fine.  Verified that
100+MFI() scores correctly, gives me a good list of stocks, using the
highest score to trade correctly.  THAT WORKS.

Problem is, that high score doesn't help the profitability, and in
fact really screws it up.  All indicator scoring combinations I have
tried screw it up.  

Leave positionscore OUT, get ~$640K net profit on a 5 year scan of 600
some stocks in my watchlist.  Get A's, some B's, few C's, rare D's. 
That tells me I am not looking at potentially better stocks.

Put positionscore IN to look at potentially better stocks, and net
profit goes to hell in a handbasket.  Functionally, it appears to be
working correctly, picking the highest scored stocks for a given bar.
 Those stocks ARE TRADED ( I get stocks through ALL letters), they
just don't produce better profit results.

It seems the "logic" that a higher MFI() (or any other indicators I
have tried) will produce "better" trades is faulty... It is if I said
"score them by the LOWEST MFI() score" rather than the highest.  Go
figure.  This logic works just fine on other formulas/systems I have
tested with; this one seems to be an anomoly.

I will try a different list, like NASDAQ 100 and see if I see the same
pattern.

Thanks for the tips!

Roy



--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
>
> You have this
> SetPositionSize(85,spsPercentOfEquity);
> Then you are assigning 85% of equity to each trade (this can also be
> easily written as positionsize=-85;
> By this you can only have 1 trade open at a time. The first trade will
> be 8,500 then vary after that with equity.
> 
> SetOption("AllowPositionShrinking", True ); //No real impact - of
> course not your trade size is set as a percentage of equity so it will
> vary with what is available. This setting has more to do with fixed
> price trade size.
> 
> The net profit just goes downhill like a truck. = system loses money
> 
> PositionScore will only have a effect if you are able to enter a trade
> and there are more than one stock with a signal on the same bar. This
> allows you to provide a scoring system on which stock gets the nod.
> 
> 
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
> 
> 
> 
> On 12/8/05, Roy Ewing <slickums76@xxxx> wrote:
> > Terry,
> >
> > Thanks for the tips.
> >
> > To clarify, I do get an "occasional" "B", "C", and even a rare "E".
> > But it is clear when looking at the list that it keeps going back to
> > the beginning of the list at the "A's".
> >
> > When I use POSITIONSCORE, the scoreing is working, ie I see a truly
> > "mixed" group of stocks.  The net profit just goes downhill like a
truck.
> >
> > Here are my settings:
> >
> > SetOption("InitialEquity", 10000 );
> > SetOption("MaxopenPositions", 10);
> > SetOption("AllowPositionShrinking", True ); //No real impact
> > SetPositionSize(85,spsPercentOfEquity);
> > SetTradeDelays(1,1,0,0);//Do not use Short/Cover
> > ApplyStop(0,1,5,0,False,0);//Stop Loss at 5%
> > ApplyStop(2,2,3,0,False,0);//Trailing Stop at 3 Points
> >
> > In AA I have all STOP SETTINGS DISABLED.
> >
> > The effect of POSITIONSCORE on this is still puzzling.
> > No, I am not running out of money, it shows about 600K net profit
> > over the 5 years.  Throw in positionscore = 100 + mfi() and I get
> > $458.00 net profit over 5 years. (12/06/2000 - 12/06/2005)
> >
> > Does not make sense unless I am simply missing something simple...just
> > why I asked the group!!
> >
> > Thanks for the tips.
> >
> > Roy
> >
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxxx> wrote:
> > >
> > > I haven't followed your question closely so my advice may be off
base,
> > > but it seems PositionSize may be your problem. If there are many
> > > possible trades the backtester will take the trades until you've
spent
> > > all your money. Sounds like this is happening before you get out
of the
> > > A's
> > >
> > > Try tightening your PositionScore rules to create less (hopefully
> > > better) opportunities and set PositionSize to some smaller fixed
value
> > > like 1000 on a 100,000 portfolio (or -1 for 1% of portfolio) or
similar
> > > ideas to see if you get trades farther down the alphabet. If you
do, I
> > > was right :-)
> > >
> > > If you don't, well I can try harder.
> > > --
> > > Terry
> > > -----Original Message-----
> > > From: amibroker@xxxxxxxxxxxxxxx
[mailto:amibroker@xxxxxxxxxxxxxxx] On
> > > Behalf Of sebastiandanconia
> > > Sent: Wednesday, December 07, 2005 11:48
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: [amibroker] Re: How to use "positionscore" in this
formula??
> > >
> > > A little more information, please.:)  Does the system test all
> > > the "A"s and then stop right before the "B"s?  Or is there a
limit to
> > > the number of "A"s it tests, also?  When you use PositionScore, do
> > > you know that you're getting a full test on all the stocks, or does
> > > the system still stop testing additional stocks at a certain point,
> > > just farther into the alphabet?
> > >
> > > Not knowing all the details of what you're doing, here's a trouble-
> > > shooting idea.  Have you got a position-limit set in Automatic
> > > Analysis or in the system code itself?  Without PositionScore, there
> > > would be no ranking of the stocks, they'd simply be bought in
> > > alphabetical order from your watchlist as the "buy" signals click
> > > off.  If there's a position limit set, the system would just buy
> > > stocks up to the position limit and stop.  After those stocks got
> > > sold and a new "buy" signal comes up, the system will do the same
> > > thing over again, starting with the "A"s.  If there are enough
stocks
> > > meeting the criteria to fill the portfolio from within the "A"s,
your
> > > system would never get to the "B"s.  Anyway, that's just a place to
> > > start looking.
> > >
> > > Also, in my (our) experience, if a free system looks really great
> > > there's something wrong in the testing process, LOL!  In "Backtester
> > > Settings" under the "Trades" tab, see what the settings are.  My
> > > advice is to set them at "Open" with a 1-day trade delay, otherwise
> > > your system is taking trades on the day of the signal and not the
> > > NEXT day when you'd actually make the trade.  That will make your
> > > system returns artificially (and unrealistically) high.
> > >
> > > Sorry if I've gone over stuff that you already know.  Most of my
> > > mistakes are simple ones that I just didn't think of.:)
> > >
> > >
> > > Luck,
> > >
> > > Sebastian
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx, "Roy Ewing" <slickums76@xxxx>
wrote:
> > > >
> > > > I found a very good "system" in the AFL Library that produces very
> > > > good results for what I am trying to backtest.  Here it is,
stripped
> > > > to the essentials:
> > > >
> > > > ---------------------------------------------------------------
> > > > //  Formula Name:    STD_STK Multi
> > > > //  Author/Uploader: Willem Jan
> > > >
> > > > STK=Optimize ("StK" , 14, 2, 18, 2);
> > > > STD=Optimize ("StD" ,16, 2, 18, 2);
> > > > pds =Optimize("pds", 10,2,18,2);
> > > >
> > > > Sell= Cross (EMA (StochD (STD),pds),EMA( StochK (STK),pds));
> > > > Buy= Cross (EMA(StochK (STK),pds),EMA( StochD (STD),pds));
> > > >
> > > > Filter=Buy OR Sell;
> > > >
> > > > Buy=ExRem(Buy,Sell);
> > > > Sell=ExRem(Sell,Buy);
> > > >
> > > > /* My Added POSITIONSCORE */
> > > > PositionScore = 100 + MFI(); //Also many others tried!
> > > >
> > > > ----------------------------------------------------------------
> > > >
> > > > The problem is that w/o "POSITIONSCORE", I never get out of
> > > the "A's"
> > > > during backtesting.
> > > >
> > > > I have had good results using "positionscore" with other formulas,
> > > but
> > > > I have tried over 30 combinations of different indicators here and
> > > the
> > > > results are MUCH WORSE.  Not only a little, but a lot worse.
> > > >
> > > > I can't believe the formula is so good that nothing will help it,
> > > and
> > > > the fact that I can't get out of the "A's" in my watchlist mean
> > > there
> > > > should be "better" trades.
> > > >
> > > > My watchlist is a list of "Optionable" stocks from TC2005,
> > > backtesting
> > > > for 5 years (about 600 stocks).
> > > >
> > > > Any ideas?
> > > >
> > > > I have emailed the author, but his email bounced.
> > > >
> > > > Thanks.
> > > >
> > > > Roy
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 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 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 other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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 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/

<*> 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/