Sort stocks into portolios based on stock characteristics
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (1)
conrad Landis
le 13 Mar 2011
0 votes
2 commentaires
Oleg Komarov
le 13 Mar 2011
Edited script to account for NaNs
conrad Landis
le 13 Mar 2011
Catégories
En savoir plus sur Portfolio Optimization and Asset Allocation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!