Sort stocks into portolios based on stock characteristics
Mostra commenti meno recenti
Hello,
Suppose i have a matrix A(m,n) of stock returns, where m is time and n is stocks (So in each column i have the time serie of each stock). Suppose that i have another matrix B(m,n) containing trading volume data for the same stocks and dates. The indexing of each stock-each date is the same in the 2 matrices (So that e.g A(1,200) contains the return of the 200th stock for the 1st date of the sample and B(1,200), contains the volume of the same stock the same date). Missing data are NaN's. Is there any way to sort each row or fracions of matrix A based on the ranking of each row of B? Or even better is there a matlab built in function to split a matrix into specified fractiles based on criterias( such as rankings on stock attributes-characteristics) ? Thanks a lot in advance, ~Conrad
Risposta accettata
Più risposte (1)
conrad Landis
il 13 Mar 2011
0 voti
2 Commenti
Oleg Komarov
il 13 Mar 2011
Edited script to account for NaNs
conrad Landis
il 13 Mar 2011
Categorie
Scopri di più su Portfolio Optimization and Asset Allocation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!