I have a tricky problem in managing the dataset for my thesis (which is about the implied volatility surface of REITs options). I am supposed to find the names of the companies (with options listed on them) ,that are not REITs, whose market caps is similar to the one of a list of REITs I already have. I have a very large dataset with daily obs (from 2005 to 2014) for the market caps of 71 REITs and the same dataset for all non-REITs names listed in US (already cleaned for extreme values of market cap). I've been told that I should perform a many-to-many match by year, get the differences in market caps (REITs - non REITs) and eliminate everything that's outside a +/- 10% tolerance band. I'm really a beginner both in R and Matlab and I have no idea on how I should do this match. Does anyone have any idea? Thanks
Asked
Active
Viewed 55 times
-1
-
Could you please provide a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example), for instance with a subset of your data or fake data? – cocquemas Oct 29 '15 at 17:18
-
you need to make a cross join between Treit and Tnonreit (both tables of
). A cross join in matlab is done as such: http://stackoverflow.com/questions/31053110/full-outer-join-of-two-tables/31068712#31068712 – alexandre iolov Oct 30 '15 at 08:48 -
'data.frame': 14005066 obs. of 18 variables: $ X : int 1 2 3 4 5 6 7 8 9 10 ... $ secid : int 5139 5139 5139 5139 5139 5139 5139 5139 5139 5139 ... $ date : Date, format: "2010-05-19" "2010-06-10" ... .............. $ market.cap : num 2370217 2311218 2212696 2962410 2772855 ... this is the structure of one of the two datasets. the other one is similar but with different names (and more variables also) – angelo.catania Oct 30 '15 at 16:44
1 Answers
-1
(in matlab) You need to make a cross join between Treit and Tnonreit (both tables of ). A cross join in matlab is done as such: Full outer join of two tables then compare the mcap_left vs mcap-right and discard given your threshold, this will leave you with pairs of which have similar mcaps

Community
- 1
- 1

alexandre iolov
- 582
- 3
- 11