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

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



PureBytes Links

Trading Reference Links




No, I 
just posted it here on the BB.     take a look at  <A 
href="">http://groups.yahoo.com/group/amibroker/message/37406
<SPAN 
class=161475121-11042003> 
<FONT 
size=2>You can plot the indicator on any chart by using Foreign to call the 
composite values....
<FONT color=#000000 
size=2> 
Buy=0<FONT 
color=#282828 size=2>;<FONT 
color=#0000ff>
x=C<FONT 
size=2>>MA(<FONT 
size=2>C,<FONT 
size=2>40<FONT color=#0000ff 
face=Arial>);
 
AddToComposite(x,<FONT 
color=#ff00ff size=2>"~T2108",<FONT 
color=#ff00ff size=2>"C");<FONT 
color=#008000 size=2>//counts stocks above the 40 and 
saves to the close field<FONT 
face=Arial>
AddToComposite(<FONT color=#ff00ff 
size=2>1,<FONT color=#ff00ff 
size=2>"~T2108",<FONT color=#ff00ff 
size=2>"V");<FONT color=#008000 
size=2>//counts all stocks in the 
index
Plot((<FONT color=#0000ff 
size=2>Foreign(<FONT color=#ff00ff 
size=2>"~T2108",<FONT color=#ff00ff 
size=2>"C") / <FONT color=#0000ff 
size=2>Foreign(<FONT color=#ff00ff 
size=2>"~T2108",<FONT color=#ff00ff 
size=2>"V"))*<FONT color=#ff00ff 
size=2>100,<FONT color=#ff00ff 
size=2>"% over 40 DMA",<FONT 
color=#ff00ff size=2>4,<FONT 
color=#ff00ff size=2>1<FONT 
face=Arial>);
 <FONT 
face=Arial>
Title="Total stocks "<FONT 
size=2> +WriteVal(<FONT 
size=2>Foreign("~T2108"<FONT 
size=2>,"V"),<FONT 
size=2>1) + " Stocks above the 40 DMA 
" +WriteVal<FONT 
size=2>(Foreign(<FONT 
size=2>"~T2108","C"<FONT 
size=2>),1)+ "\n 
Percentage of stocks above the 40 DMA " +<FONT 
size=2>WriteVal((Foreign<FONT 
size=2>("~T2108",<FONT 
size=2>"C") / Foreign<FONT 
size=2>("~T2108",<FONT 
size=2>"V")*100<FONT 
size=2>))+""+<FONT 
size=2>WriteVal(ROC<FONT 
size=2>((Foreign(<FONT 
size=2>"~T2108","C") 
/ Foreign(<FONT 
size=2>"~T2108","V"<FONT 
size=2>)*100),<FONT 
size=2>1<FONT color=#0000ff 
face=Arial>));
 
<SPAN 
class=161475121-11042003> 
<SPAN 
class=161475121-11042003> 
 Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: Richard Harper 
[mailto:rdharper@xxxxxxxxxxxx]Sent: Friday, April 11, 2003 5:33 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: 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
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  <A href="" 
  title=jcasavant@xxxxxxxxxxxx>Jayson 
  To: <A 
  href="" 
  title=amibroker@xxxxxxxxxxxxxxx>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 
  <FONT face=Tahoma 
  size=2>-----Original Message-----From: <A 
  href="">uenal.mutlu@xxxxxxxxxxx 
  [mailto:uenal.mutlu@xxxxxxxxxxx]Sent: Friday, April 11, 2003 4:16 
  AMTo: <A 
  href="">amibroker@xxxxxxxxxxxxxxxSubject: 
  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 <FONT 
  face=Arial>the ~T2108 
  artifical ticker file <FONT 
  face=Arial>before each scan. If yes, is there 
  
  an AFL command to automate this?
  UM
  <BLOCKQUOTE 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    <A href="" 
    title=jcasavant@xxxxxxxxxxxx>Jayson 
    To: <A 
    href="" 
    title=amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx 
    Sent: Friday, April 11, 2003 6:47 
    AM
    Subject: RE: [amibroker] Back testing a 
    Score Based System in AB
    
    <SPAN 
    class=616364304-11042003>UM,
    <SPAN 
    class=616364304-11042003>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 
     <FONT color=#0000ff face=Arial 
    size=2>Jayson 
    <FONT face=Tahoma 
    size=2>-----Original Message-----From: uenal.mutlu@xxxxxxxxxxx 
    [mailto:uenal.mutlu@xxxxxxxxxxx]Sent: Thursday, April 10, 2003 
    2:29 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: 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
     
    <BLOCKQUOTE 
    >
      ----- Original Message ----- 
      <DIV 
      >From: 
      <A href="" 
      title=jcasavant@xxxxxxxxxxxx>Jayson 
      To: <A 
      href="" 
      title=amibroker@xxxxxxxxxxxxxxx>amibroker@xxxxxxxxxxxxxxx 
      Sent: Thursday, April 10, 2003 3:34 
      PM
      Subject: RE: [amibroker] Backtesting 
      a Score Based System in AB
      
      <SPAN 
      class=965432813-10042003>Um,
      <SPAN 
      class=965432813-10042003>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.....
       <FONT color=#0000ff face=Arial 
      size=2>Jayson 
      <FONT face=Tahoma 
      size=2>-----Original Message-----From: uenal.mutlu@xxxxxxxxxxx 
      [mailto:uenal.mutlu@xxxxxxxxxxx]Sent: Thursday, April 10, 2003 
      8:56 AMTo: amibroker@xxxxxxxxxxxxxxxSubject: 
      [amibroker] Backtesting a Score Based System in 
      ABIn a score based trading system each stock 
      getssome (weighted/normalized) scores assigned and all the scores 
      of the underlying indicators and methodsare cumulated for each stock. 
      From this list I wouldlike 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 
      meetingthe 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 
      performanceof such a system in ABs backtester. Can this be done in 
      AB?UMSend BUG REPORTS 
  to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 
  Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 
Send 
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT  









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 the Yahoo! Terms of Service.