How can i create a column vector that sotres PERMNO for all that had positive ret and name this column vector as sample?
2 ビュー (過去 30 日間)
古いコメントを表示
PERMNO DateOfObservation prc ret Bid Ask shrout
______ _________________ _______ _________ _________ ______ _______
10026 20201231 155.37 0.072598 155.37 155.48 18954
10028 20201231 5.2 0.125541 5.21 5.25 26925
10032 20201231 78.21 0.046848 78.21 78.29 28823
10044 20201231 4.05 -0.051522 4.05 4.1 6071
10051 20201231 21.99 -0.030851 22.01 22.02 38109
10065 20201231 17.29 0.036571 17.29 17.3 108731
How can i create a column vector that sotres PERMNO for all that had positive ret and name this column vector as sample?
0 件のコメント
回答 (1 件)
Voss
2022 年 2 月 20 日
編集済み: Voss
2022 年 2 月 20 日
% reproducing your table:
data = num2cell([ ...
10026 20201231 155.37 0.072598 155.37 155.48 18954
10028 20201231 5.2 0.125541 5.21 5.25 26925
10032 20201231 78.21 0.046848 78.21 78.29 28823
10044 20201231 4.05 -0.051522 4.05 4.1 6071
10051 20201231 21.99 -0.030851 22.01 22.02 38109
10065 20201231 17.29 0.036571 17.29 17.3 108731
],1);
t = table(data{:},'VariableNames',{'PERMNO' 'DateOfObservation' 'prc' 'ret' 'Bid' 'Ask' 'shrout'})
% getting PERMNO where ret > 0:
t{t{:,"ret"} > 0,"PERMNO"}
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!