Clyde,
Yes, once I am through the portfolio selection process, the rest only includes average calculations. Thank you for offering me your help on this.
Regarding your possibilities:
1. I pulled the data myself. I set up a new dataset to avoid past possible mistakes. Indeed, there are duplicate observations, which actually have the same market cap and permno on the same date. But that's how I got the data from CRSP. After pulling the data again, the duplicates have the same values for all of the variables now, instead of different values for all of the other variables like before.
2. Since the duplicates are exactly the same, the solution to this problem is to delete the duplicate observations, don't you think? In terms of a correct analysis, it doesn't make sense to have duplicates in the portfolios.
3. Maybe we can simply connect permno with the referring date (after deleting the duplicates). This should create unique identifiers.
So all in all, the same permno has the same value of MarketCap on the same date now and not a different one like before.
Please find below the requested data sample:
ret = return
In June of each year, is it possible to compute decile breakpoints using only stocks that trade on the New York Stock Exchange (stocks, which have “1” as exchange code (see variable exchcd), and then use those breakpoints to sort all stocks in the sample (incl. stocks that trade on other exchange stocks) into 10 portfolios (e.g. 1 breakpoint = 10, data with MktCap <= 10 should go into the first portfolio)??
Thank you very much again.
Best,
Guest
Yes, once I am through the portfolio selection process, the rest only includes average calculations. Thank you for offering me your help on this.
Regarding your possibilities:
1. I pulled the data myself. I set up a new dataset to avoid past possible mistakes. Indeed, there are duplicate observations, which actually have the same market cap and permno on the same date. But that's how I got the data from CRSP. After pulling the data again, the duplicates have the same values for all of the variables now, instead of different values for all of the other variables like before.
2. Since the duplicates are exactly the same, the solution to this problem is to delete the duplicate observations, don't you think? In terms of a correct analysis, it doesn't make sense to have duplicates in the portfolios.
3. Maybe we can simply connect permno with the referring date (after deleting the duplicates). This should create unique identifiers.
So all in all, the same permno has the same value of MarketCap on the same date now and not a different one like before.
Please find below the requested data sample:
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long(permno date) byte exchcd double ret float MktCap 10000 19860131 3 . 16.1 10000 19860228 3 -.257143 11.96 10000 19860331 3 .365385 16.33 10000 19860430 3 -.098592 15.172 10000 19860530 3 -.222656 11.793879 10000 19860630 3 -.005025 11.734593 10000 19860731 3 -.080808 10.786344 10000 19860829 3 -.615385 4.148594 10000 19860930 3 -.057143 3.911531 10000 19861031 3 -.242424 3.002344 10000 19861128 3 .06 3.182504 10000 19861231 3 -.377358 1.981566 10000 19870130 3 -.212121 1.5815313 10000 19870227 3 0 1.5815313 10000 19870331 3 -.384615 .97325 10000 19870430 3 -.0625 .9124414 10000 19870529 3 -.066667 .8515937 10000 19870630 3 . .8515937 10001 19860131 3 . 6.033125 10001 19860228 3 .020408 6.15625 10001 19860331 3 .0252 6.217813 10001 19860430 3 .009901 6.279375 10001 19860530 3 -.009804 6.217813 10001 19860630 3 -.013069 6.033125 10001 19860731 3 -.010204 5.971562 10001 19860829 3 .072165 6.4025 10001 19860930 3 -.003077 6.317625 10001 19861031 3 .039216 6.565375 10001 19861128 3 .056604 6.937 10001 19861231 3 .015 6.937 10001 19870130 3 -.035714 6.68925 10001 19870227 3 -.074074 6.19375 10001 19870331 3 .0368 6.317625 10001 19870430 3 -.039216 6.069875 10001 19870529 3 -.071429 5.636312 10001 19870630 3 .051429 5.822125 10001 19870731 3 .021277 5.946 10001 19870831 3 .083333 6.4415 10001 19870930 3 -.022308 6.2 10001 19871030 3 .02 6.324 10001 19871130 3 -.029412 6.138 10001 19871231 3 -.033535 5.828 10001 19880129 3 .06383 6.2 10001 19880229 3 .08 6.696 10001 19880331 3 -.076296 6.076 10001 19880429 3 .030612 6.262 10001 19880531 3 .019802 6.386 10001 19880630 3 -.012039 6.2 10001 19880729 3 .03 6.386 10001 19880831 3 .029126 6.572 10001 19880930 3 -.021132 6.36225 10001 19881031 3 .039216 6.61175 10001 19881130 3 0 6.61175 10001 19881230 3 -.021132 6.36225 10001 19890131 3 .019608 6.487 10001 19890228 3 .038462 6.7365 10001 19890331 3 .017778 6.7365 10001 19890428 3 .074074 7.2355 10001 19890531 3 -.034483 6.986 10002 19890630 1 .017143 7.007 10001 19890731 3 .035714 7.25725 10001 19890831 3 .275862 9.25925 10001 19890929 3 -.027027 9.043625 10001 19891031 3 .070423 9.6805 10001 19891130 3 .039474 10.062625 10001 19891229 3 .037975 10.34775 10001 19900131 3 -.018519 10.156125 10001 19900228 3 -.006289 10.09225 10001 19900330 3 .012658 10.141625 10001 19900430 3 0 10.141625 10001 19900531 3 -.012658 10.01325 10002 19900629 1 .014103 10.05225 10001 19900731 3 .025641 10.31 10001 19900831 3 -.05 9.7945 10001 19900928 3 .040789 10.179 10001 19901031 3 -.012821 10.0485 10001 19901130 3 0 10.0485 10001 19901231 3 .001299 10.013 10001 19910131 3 .013158 10.14475 10001 19910228 3 .012987 10.2765 end
In June of each year, is it possible to compute decile breakpoints using only stocks that trade on the New York Stock Exchange (stocks, which have “1” as exchange code (see variable exchcd), and then use those breakpoints to sort all stocks in the sample (incl. stocks that trade on other exchange stocks) into 10 portfolios (e.g. 1 breakpoint = 10, data with MktCap <= 10 should go into the first portfolio)??
Thank you very much again.
Best,
Guest
Comment