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

[amibroker] Re: Back testing a Score Based System in AB



PureBytes Links

Trading Reference Links

Jayson,
I would suggest not to use the "~T2108" name, perhaps it belongs to 
somebodyelse.
Since we use a "free" condition C>MA(C,40) and AddToComposite() 
function, we may give a new, more comprehensive name and avoid 
probable conflicts.
My suggestion was Above40MA.
DT
--- In amibroker@xxxxxxxxxxxxxxx, "Jayson" <jcasavant@xxxx> wrote:
> No, I just posted it here on the BB.     take a look at
> http://groups.yahoo.com/group/amibroker/message/37406
> 
> You can plot the indicator on any chart by using Foreign to call the
> composite values....
> 
> Buy=0;
> x=C>MA(C,40);
> 
> AddToComposite(x,"~T2108","C");//counts stocks above the 40 and 
saves to the
> close field
> AddToComposite(1,"~T2108","V");//counts all stocks in the index
> Plot((Foreign("~T2108","C") / Foreign("~T2108","V"))*100,"% over 40
> DMA",4,1);
> 
> Title="Total stocks " +WriteVal(Foreign("~T2108","V"),1) + " Stocks 
above
> the 40 DMA " +WriteVal(Foreign("~T2108","C"),1)+ "\n Percentage of 
stocks
> above the 40 DMA " +WriteVal((Foreign("~T2108","C") /
> Foreign("~T2108","V")*100))+""+WriteVal(ROC((Foreign("~T2108","C") /
> Foreign("~T2108","V")*100),1));
> 
> 
> 
> 
> Jayson
> -----Original Message-----
> From: Richard Harper [mailto:rdharper@x...]
> Sent: Friday, April 11, 2003 5:33 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: Re: [amibroker] Back testing a Score Based System in AB
> 
> 
> Jayson;  Where did you "post" the T2108 code?   I assumed you meant 
in the
> AFL Lib, but apparently not.
> 
> Thanks,
> Richard
>   ----- Original Message -----
>   From: Jayson
>   To: amibroker@xxxxxxxxxxxxxxx
>   Sent: Friday, April 11, 2003 6:06 AM
>   Subject: RE: [amibroker] Back testing a Score Based System in AB
> 
> 
>   You are welcome...... No each time you run the scan the data is 
re-set
> 
>   Jayson
>   -----Original Message-----
>   From: uenal.mutlu@xxxx [mailto:uenal.mutlu@x...]
>   Sent: Friday, April 11, 2003 4:16 AM
>   To: amibroker@xxxxxxxxxxxxxxx
>   Subject: Re: [amibroker] Back testing a Score Based System in AB
> 
> 
>   Jayson,
>   thanks for the code. It is going to help me much.
>   BTW: is it required to manually delete the ~T2108
>   artifical ticker file before each scan. If yes, is there
>   an AFL command to automate this?
>   UM
>     ----- Original Message -----
>     From: Jayson
>     To: amibroker@xxxxxxxxxxxxxxx
>     Sent: Friday, April 11, 2003 6:47 AM
>     Subject: RE: [amibroker] Back testing a Score Based System in AB
> 
> 
>     UM,
>     Take a look at the T2108 indicator I just posted. That code used
> addtocomposit to do the math. Basically you create an artificial 
ticker
> where you can assign values to the standard 
open/close/high/low/vol/OI
> fields. There is a detailed Tutorial in the help file written by
> Herman...well worth reading....Let me know if you are still stuck
> 
>     Jayson
>     -----Original Message-----
>     From: uenal.mutlu@xxxx [mailto:uenal.mutlu@x...]
>     Sent: Thursday, April 10, 2003 2:29 PM
>     To: amibroker@xxxxxxxxxxxxxxx
>     Subject: Re: [amibroker] Backtesting a Score Based System in AB
> 
> 
>     Hi Jayson,
>     I unfortunately have only little knowledge about composite 
creation
>     or its use in AB. Can you explain a little bit more the method 
you mean
>     please.
>     Here my manual method which I would like to backtest in AB:
>     Say I have 100 stocks in my universe. Each day before market 
open
>     I calculate a score for every stock. Then I sort this and take 
the first
>     5 stocks with the highest scores into my watchlist for trading. 
This
>     scenario I would like to backtest in AB to see how good or bad 
such
>     a scoring system performs.
>     UM
> 
>       ----- Original Message -----
>       From: Jayson
>       To: amibroker@xxxxxxxxxxxxxxx
>       Sent: Thursday, April 10, 2003 3:34 PM
>       Subject: RE: [amibroker] Backtesting a Score Based System in 
AB
> 
> 
>       Um,
>       If you can create an indicator that does the score could you 
perhaps
> create a composite of your basket scores and do the math within the
> composite to determine your top 10%? If so then running a scan to 
create
> your composite then calling that composite value in your 
exploration or back
> test filter should accomplish your task.....
> 
>       Jayson
>       -----Original Message-----
>       From: uenal.mutlu@xxxx [mailto:uenal.mutlu@x...]
>       Sent: Thursday, April 10, 2003 8:56 AM
>       To: amibroker@xxxxxxxxxxxxxxx
>       Subject: [amibroker] Backtesting a Score Based System in AB
> 
> 
>       In a score based trading system each stock gets
>       some (weighted/normalized) scores assigned and
>       all the scores of the underlying indicators and methods
>       are cumulated for each stock. From this list I would
>       like to take the first (or the first x) stocks for 
backtesting.
>       How could this be realized in an exploration or in the 
backtester?
>       One would need to filter and collect the stocks meeting
>       the underlying criteria and then would need to sort the
>       table and pick item number(s) and assign them to the Buy 
array.
>       This would be very interessting for testing the performance
>       of such a system in ABs backtester.
>       Can this be done in AB?
> 
>       UM
> 
> 
> 
>   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
> 
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.
> 
> 
>   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
> 
>   Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.
> 
> 
>       Yahoo! Groups Sponsor
> 
> 
> 
> 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
> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get a FREE REFINANCE QUOTE - click here!
http://us.click.yahoo.com/2CXtTB/ca0FAA/i5gGAA/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/