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

Re: [amibroker] Re: Ranking Stocks (AFL or via scripting)



PureBytes Links

Trading Reference Links




Hi Chuck,
I don't know the inners of your algorithm, but 
I think there
is big a desire/need of having the functionality 
of a table or
matrix (in memory only), which can 
be filled from within 
AFL
on a field level, and later be <FONT 
face=Arial>sorted. I'm currently working on 

this addition to ABtool. Here the 
basic concept:
  user creates a table object, and adds the 
column definitions
  (type of column; whether numeric, datetime, or 
string type etc.)
  to the table object. After this, the rows and cells 
can be filled
  with values. And afterwards the table can be sorted 
(asc/desc) on
  a given column and further processed for 
example in a  "for" loop 
  by the user.  
Exporting to a CSV file can also be done.
I think this would eliminate some of the external 
scripting needs,
and also make the process faster.
UM
 
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  <A title=chuck_rademacher@xxxxxxxxxx 
  href="">Chuck Rademacher 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Sunday, May 04, 2003 8:48 AM
  Subject: RE: [amibroker] Re: Ranking 
  Stocks (AFL or via scripting)
  
  You 
  just can't wait, can you?
  <FONT face=Arial color=#0000ff 
  size=2> 
  <FONT face=Arial color=#0000ff 
  size=2>Other than using UM's ABTool, it is all in pure AFL code.   
  The next step is some jscript and then a DLL.   The learning curve 
  is so steep and time is so short.  I guess I'm paying the price, at the 
  moment, of using AFL code to prove that the concept works without regard to 
  how long it takes to run.   While it is running, I'm working on 
  improving throughput.   Through all of this, I keep hoping that TJ 
  is going to surprise us soon and/or David (TradeSim) will implement the 
  changes I have requested, making my work redundant.
  <FONT face=Arial color=#0000ff 
  size=2> 
  But 
  your idea of how it works is "spot on".
  <BLOCKQUOTE 
  >
    <FONT face="Times New Roman" 
    size=2>-----Original Message-----From: b519b 
    [mailto:b519b@xxxxxxxxx]Sent: Sunday, May 04, 2003 2:01 
    AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
    Re: Ranking Stocks (AFL or via 
    scripting)Chuck,A generic version of your 
    sorting system would be great to see.Is your sorting system entirely 
    in AFL or does it use J script or VB script or a custom DLL? My 
    guess would be that it might involves a script which creates an external 
    file listing each ticker with an indicator value. The data in the 
    external file would next be sorted by an external program to make a new 
    ticker file that has the "cut off" value for the top 5, 10, 20 stocks in 
    the Open, High, Low, etc fields. The Foreign function could then be used 
    to access these cut off values for the actual backtesting. Of course, if 
    you are using a DLL rather than a script, the DLL might do the sorting 
    itself and thus save a few manual steps. This approach could be extended 
    by using another J-script to use the ranked external file to control 
    which tickers get traded for a particular day.Or have you found 
    a way to do the sorting and record the results via AFL. I can imagine an 
    approach that might work in entirely in AFL but it would involve the use 
    of multiple artificial tickers and would thus take "all day" to 
    run.Am I any where close with either of these 
    ideas?b--- In amibroker@xxxxxxxxxxxxxxx, "Chuck 
    Rademacher" <chuck_rademacher@x> wrote:> I'm quite happy to 
    share the methodology and code "snippets".> Unfortunately, the actual 
    AFL involved has too much of my proprietary> trading logic within 
    it.   I'll have a look at replacing the underlying> 
    system with something more generic.  Then, I would be able to post 
    the> complete AFL.> > Once I've verified that it is 
    working properly and it's not taking all day> to run, I'll 
    prepare a document and post it in the files section for this> 
    group.> > It wouldn't have been possible without the ABTool 
    plug-in and assistance so> graciously contributed by 
    UM.   I'm hoping that a few other members of this> 
    group see the potential in UM's plug-in and come up with some ideas of 
    their> own.   No doubt, there will be a better way than 
    what I'm currently doing.> I call it "leap frog" 
    technology.   Someone comes up with an idea and> 
    someone else comes up with an improvement on that idea, etc. until we 
    all> benefit from a group effort.> > 
    >   -----Original Message----->   From: HB 
    [mailto:hossamb@xxxx]>   Sent: Sunday, May 04, 2003 1:01 
    AM>   To: amibroker@xxxxxxxxxxxxxxx>   
    Subject: Re: [amibroker] Ranking Stocks (was ABTool)> > 
    >   Chuck, fascinating !> >   Once 
    you rank, I assume that you can do things like:>   - take 
    the top "x" trades only>   - take only the trades above a 
    certain "y" value>   - take only the trades that are "z"% 
    below "q"'s value>   - etc.> >   
    Yes ?> >   Will this ranking component be shared on 
    the list ?> >   HB>     
    ----- Original Message ----->     From: Chuck 
    Rademacher>     To: 
    amibroker@xxxxxxxxxxxxxxx>     Sent: Sunday, May 
    04, 2003 0:40>     Subject: RE: [amibroker] 
    Ranking Stocks (was ABTool)> > 
    >     Ah ha.... I don't determine the ranking 
    criteria.   More explicitly, it> can be whatever YOU 
    like.> >     An example might 
    help.   Let's say you thought that there was> "information" 
    in the RSI value; the lower the RSI value, the better the buy> 
    signal.  If that was the case, your criteria would be the RSI value 
    and you> could sort based on it.   If you had P/E or 
    Debt/Equity ratio available in> your data, you could rank based 
    on either of those.   The actual buy signal> can be 
    something quite different from the ranking criteria.> 
    >     In a nutshell, whatever YOU would like to 
    rank by can be written to a> file and sorted in order to limit 
    but orders to available cash.>       
    -----Original Message----->       From: 
    HB [mailto:hossamb@xxxx]>       Sent: 
    Sunday, May 04, 2003 12:12 AM>       
    To: amibroker@xxxxxxxxxxxxxxx>       
    Subject: Re: [amibroker] Ranking Stocks (was ABTool)> > 
    >       Chuck,> 
    >       What are your ranking criteria 
    ?> >       
    HB>         ----- Original 
    Message ----->         From: 
    Chuck Rademacher>         To: 
    amibroker@xxxxxxxxxxxxxxx>         
    Sent: Saturday, May 03, 2003 
    23:12>         Subject: RE: 
    [amibroker] Ranking Stocks (was ABTool)> > 
    >         The ranking 
    technique will work in optimize and backtest mode.   
    It> is slow, however, and that's what I'm workiing on 
    now.>           
    -----Original 
    Message----->           
    From: b519b 
    [mailto:b519b@xxxx]>           
    Sent: Saturday, May 03, 2003 10:58 
    PM>           To: 
    amibroker@xxxxxxxxxxxxxxx>           
    Subject: [amibroker] Ranking Stocks (was ABTool)> > 
    >           
    Chuck,> 
    >           Does 
    your ranking code just work in scan or exploration modes, 
    or>           can 
    it be using in backtesting to create portfolios of limited> 
    size>           
    (limited by number of stocks at one time, or limited by 
    total>           
    capital used)?> 
    >           
    b> 
    >           --- In 
    amibroker@xxxxxxxxxxxxxxx, "Chuck 
    Rademacher">           
    <chuck_rademacher@x> 
    wrote:>           
    > I just finished modifying my 
    "pairs">           
    trading AFL to use UM's new 
    ABTool.>           
    > It saves about 12 hours of 
    processing>           
    time, making it possible to 
    actually>           
    > use the 
    system.>           
    >>           
    > I am almost finished modifying 
    another>           
    piece of AFL to rank buy/short 
    orders>           
    > and limit the orders to available 
    cash.>           
    >>           
    > Since these two approaches don't 
    seem>           to 
    be of general interest, I'm 
    happy>           
    > to discuss methods, etc. with anyone 
    offline.>           
    >>           
    > Thanks again, UM, for developing such a useful tool.> > 
    > 






Yahoo! Groups Sponsor












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.