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

[amibroker] Re: Matrix Construction



PureBytes Links

Trading Reference Links

Tomasz, Ken -

Just a brief follow-up to Ken's note and your response.  I was 
describing the "family" matrix manipulation features of Trade.  AB's 
exploration can provide multiple values in the columns, as you said.  
This is done in Trade with multiple family matrices.

What I was originally trying to describe was that families in Trade 
allow the implementation of Trading strategies that look at the 
top "N" members based on some composite measure, where the membership 
changes over time.  To do this, the entire matrix must be accessible 
to the trading logic.  For example, hold the top 10 members of the 
NDX-100 based on productivity while traded with a timing signal, and 
re-evaluating this set once per week based on min/max ranking 
criteria.  The FT group has been able to utilize this very creatively.

Just trying to provide some food for thought on possible future 
trading capabilities for AB.

Bruce


--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx> 
wrote:
> Matrix ConstructionKen,
> 
> Although it is possible to wrap Foreign inside for loop it is not 
recommended
> performance-wise  because of the fact that exploration already 
iterates through all tickers.
> 
> Exploration in fact already provides exactly the 'matrix' of 
values - all bars for all tickers
> but the output is not arranged into 'matrix' but just the list.
> 
> This in fact is the advantage because you can have multiple values 
(columns)
> per each date-ticker pair, while 'matrix' gives you only one value.
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
>   ----- Original Message ----- 
>   From: Ken Close 
>   To: AmiBroker List 
>   Sent: Monday, April 14, 2003 12:14 PM
>   Subject: [amibroker] Matrix Construction
> 
> 
>   Yesterday, Bruce Robinson described an important feature of the 
Trade program, namely the 2-D matrix arrangement that allows Dates 
down the rows and Tickers across the columns.
> 
>   If you add the concept that a single variable for each ticker and 
each date are on "sheets" just like the worksheets in Excel, then do 
you not have the makings of a structure that allows ranking of 
calculated variables on each date for each ticker?  And more, perhaps 
even portfolio trading?
> 
>   I was about to try this but am stuck on how to reference 
individual tickers with a subscript within a For Loop----is it even 
possible?
> 
>   Using an example from the Readme
> 
>   ·       /* a sample low-level implementation of Profit-target 
stop in AFL: */ 
> 
>       Buy = Cross( MACD(), Signal() );
> 
>       priceatbuy=0;
> 
>       for( i = 0; i < BarCount; i++ )
>       {
>            if( priceatbuy == 0 && Buy[ i ] )
>            priceatbuy = BuyPrice[ i ];
> 
>            if( priceatbuy > 0 && SellPrice[ i ] > 1.1 * priceatbuy )
>            {
>              Sell[ i ] = 1;
>              SellPrice[ i ] = 1.1 * priceatbuy;
>              priceatbuy = 0;
>            }
>            else
>              Sell[ i ] = 0;
>       }
> 
>   What is the Loop command you would put "on top of" or "around" 
this code to cycle thru the tickers? And how do you even make it pick 
a watchlist?  It seems like it would use whatever watchlist you 
select as usual, but how to reference and keep track of the tickers 
by date?
> 
>   Comments?
> 
>   Ken
> 
> 
>         Yahoo! Groups Sponsor 
>               ADVERTISEMENT
>              
>        
>        
> 
>   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 ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/yMx78A/fNtFAA/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/