RE: SUBSET The full matrix (say, ALLDAT) is numerical stock data by stock & date: maybe 250K rows and 75 columns. E.g., 2500 rows by 75 columns of data for "AAPL", one row for each date // 2500 rows of data for "AXP" // ... A separate 250K X 1 stock tickers array (say, ALLTKR) tells me which rows of ALLDAT correspond to which stocks. So the 1st 2500 rows are "AAPL" data, the next 2500 rows are "AXP" data, etc. I'm testing a stock trading strategy on a subset of ALLDAT. Let's say the subset is the 30 stocks currently in the Dow Jones Industrials Average (DJIA). I'd specify the 30 tickers of the DJIA: {"AAPL" "AXP" "BA" "CAT" "CSCO" "CVX" "DD" "DIS" "GE" "GS" "HD" "IBM" "INTC" "JNJ" "JPM" "KO" "MCD" "MMM" "MRK" "MSFT" "NKE" "PFE" "PG" "TRV" "UNH" "UTX" "V" "VZ" "WMT" "XOM"} Then I'd like to extract the rows of ALLDAT for each of those tickers into a matrix named as the ticker: extract 2500 "AAPL" rows into a matrix named AAPL, 2500 "AXP" rows into AXP, etc. Within a DO loop over the dates I would perform calculations, compare, and select stocks for a portfolio. I could probably skip the creation of the 30 submatrices by using pointers in ALLTKR to reference rows of ALLDAT but for debugging purposes having separate matrices may be very helpful.
... View more