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

[amibroker] Re: Stock-Sensitivity Analysis of Composites


  • To: amibroker@xxxxxxxxxxxxxxx
  • Subject: [amibroker] Re: Stock-Sensitivity Analysis of Composites
  • From: "DIMITRIS TSOKAKIS" <TSOKAKIS@xxxxxxxxx>
  • Date: Wed, 31 Dec 2003 04:32:05 -0800
  • In-reply-to: <MDBBLFKEDOFLMBAOGOJEOEDMCFAA.psytek@magma.ca>

PureBytes Links

Trading Reference Links

Herman,
thanks for the explanation, now I see what you mean.
I have not any experience for this transformation.
Dimitris Tsokakis
--- In amibroker@xxxxxxxxxxxxxxx, "Herman vandenBergen" <psytek@xxxx> 
wrote:
> DT, you misunderstood or perhaps I didn't explain properly:
> 
> The collection of stocks traded is kept constant at 100, no stocks 
were ever
> removed (RFMD and ERICY were traded in all cases). Stocks are only 
removed
> from the composite one at a time, they are NOT removed from the 
stocks
> traded. Removing certain stocks from the composite made a huge 
difference in
> profits.
> 
> herman
>   -----Original Message-----
>   From: DIMITRIS TSOKAKIS [mailto:TSOKAKIS@x...]
>   Sent: December 31, 2003 6:40 PM
>   To: amibroker@xxxxxxxxxxxxxxx
>   Subject: [amibroker] Re: Stock-Sensitivity Analysis of Composites
> 
> 
>   Herman,
>   It may be strange at first sight but it is not.
>   From the recently removed N100 stocks, RFMD and ERICY were in the
>   4digit profit list for many systems [by far the best fit for many
>   complicated indicators]. If a system runs at +100% and RFMD runs, 
for
>   the same period and settings, at +1500%, the result of removing 
RFMD
>   is obvious.  The profitability is not, IMO, the crucial criterion 
for a
> group of
>   stocks.   The peaks are more important. When they are sharp, then 
the
>   directionality is here and may give clear [and repetitive] 
signals.
>   This [very important] property was not affected by the recent 
change,
>   not even the extended change one year ago and may give a basis for
>   important trading hints . A strong Sell signal is more important 
from
>   the [paper] profitability of a system over 100 or 500 stocks.
>   Another interesting issue is the local peaks/troughs of the 
composite
>   equity line : Systems suffer from wrong timing sometimes, causing
>   troughs to the average equity. They also suffer from temporary 
curve
>   fitting, it is when we see [excellent] equity peaks. If this curve
>   fitting period is, by chance, the last two months, then the system
>   will present huge profits, without *any* guarantee for the next 6
>   months.
>   Thatīs why I try to discover sharp signals.
>   Dimitris Tsokakis
>   --- In amibroker@xxxxxxxxxxxxxxx, "Herman vandenBergen" 
<psytek@xxxx>
>   wrote:
>   > Hello,
>   >
>   > It appears that the removal of a single stock in your composite 
can
>   make a
>   > big difference in system performance. The program below shows 
that
>   profits
>   > can vary from 82% to 575% by just removing one single stock 
from the
>   > composite. I have found similar results in other trading 
systems.
>   >
>   > You should replace the demo system's code, found in the
>   SystemUnderTest(),
>   > with your own composite-using system. You may also have to 
modify
>   the type
>   > of composites created; for this example I used simple price
>   composites while
>   > you may be using MeanRSI type of composites.
>   >
>   > You can open your WorkSpace, select Candle or Bar style, and 
step
>   through
>   > the composites to see in detail how the removal of single stocks
>   effect the
>   > composite. The Symbol attached to the "~Comp" indentifies the
>   ticker that is
>   > ommitted from the composite.
>   >
>   > While this effect will vary for different systems it could, in 
some
>   case,
>   > explain the "demise" of systems when ticker lists are changed. 
If
>   nothing
>   > else it shows that nothing should be taken for granted in 
systems
>   design.
>   >
>   > herman.
>   >
>   > /*
>   >    Composite stock-sensitivity analysis - Herman van den Bergen
>   > 1) Set filter to the watchlist used to create composite
>   > 2) Set WatchlistNum in first line of code below to the same
>   watchlist number
>   > 3) Set All Quotations and run Scan
>   > 4) For a normal test (full composite) set Range and run the Old-
>   Backtester
>   > 5) To see how a single stock effects group performance set 
Filter to
>   > Watchlist selected earlier and run the Old-Optimizer 6) To see 
how
>   the
>   > removal of one stock effects individual equities run an 
Eploration
>   > */
>   >
>   > WatchListNum    = 0;
>   > Scan       = Status("Action")==3;
>   > BackTest   = Status("Action")==5;
>   > Explore   = Status("Action")==4;
>   > List       = GetCategorySymbols( categoryWatchlist, 
WatchListNum);
>   > InitialEquity   = 100000;
>   > Filter    = Status("LastBarInTest");
>   > SetOption("InitialEquity",InitialEquity);
>   > SetOption("NoDefaultColumns",True);
>   > Buy=Sell=Short=Cover=0;
>   >
>   > function SystemUnderTest( RemovedTicker )
>   >    {
>   >    Comp = "~Comp"+RemovedTicker;
>   >    // Create your own type of composites below
>   >    V=Foreign(Comp,"V");
>   >    O=Foreign(Comp,"O")/V;
>   >    H=Foreign(Comp,"H")/V;
>   >    L=Foreign(Comp,"L")/V;
>   >    C=Foreign(Comp,"C")/V;
>   >
>   >    // Substitute your own composite-based system for the one 
below
>   >    Sell=Cross( MACD(), Signal() );
>   >    Buy = Cross( Signal(), MACD() );
>   >    Short=Sell;
>   >    Cover=Buy;
>   >    // End trading system
>   >    return Equity(0);
>   >    }
>   >
>   > if(Scan)
>   > {
>   >    // Create normal composite
>   >    AddToComposite(1,"~Comp","V");
>   >    AddToComposite(O,"~Comp","O");
>   >    AddToComposite(H,"~Comp","H");
>   >    AddToComposite(L,"~Comp","L");
>   >    AddToComposite(C,"~Comp","C");
>   >
>   >    // Create composites with one stock removed
>   >    for( n=0; (RemovedTicker=StrExtract( List, n))!= ""; n++)
>   >    {
>   >       if( RemovedTicker!= Name() )
>   >       {
>   >       AddToComposite(1,"~Comp"+RemovedTicker,"V");
>   >       AddToComposite(O,"~Comp"+RemovedTicker,"O");
>   >       AddToComposite(H,"~Comp"+RemovedTicker,"H");
>   >       AddToComposite(L,"~Comp"+RemovedTicker,"L");
>   >       AddToComposite(C,"~Comp"+RemovedTicker,"C");
>   >       }
>   >    }
>   >
>   > } // End Scan
>   >
>   > if(explore)
>   > {
>   > AddTextColumn(Name(),"TradedTicker",1.0);
>   > RefEquity = SystemUnderTest( "" );
>   > AddColumn(RefEquity,"NormalEquity",1.2);
>   > AddColumn(Null,"Removed->",1.0);
>   > for( n=0; (RemovedTicker=StrExtract( List, n))!= ""; n++)
>   >    {
>   >    NewEquity = SystemUnderTest( "~Comp"+RemovedTicker );
>   >    AddColumn(NewEquity,RemovedTicker,1.2);
>   >    }
>   > } // End Explore
>   >
>   > if( BackTest )
>   > {
>   >    for( n=0; (RemovedTicker=StrExtract( List, n))!= ""; n++);
>   >    RemovedTickerNum = Optimize("RemovedStockNum",9999,0,n-1,1);
>   >    RemovedTicker=StrExtract( List, RemovedTickerNum );
>   >    if(RemovedTickerNum==9999) RemovedTicker = "";
>   >    SystemUnderTest( RemovedTicker );
>   > } // End backtes
> 
> 
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   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
> 
> 
> 
> --------------------------------------------------------------------
--------
> --
>   Yahoo! Groups Links
> 
>     a.. To visit your group on the web, go to:
>     http://groups.yahoo.com/group/amibroker/
> 
>     b.. To unsubscribe from this group, send an email to:
>     amibroker-unsubscribe@xxxxxxxxxxxxxxx
> 
>     c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.


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 

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/