Hi, I am using panel data with the variables Stock_id, date2, price, revenue_M, DE, and TA_M where price has daily data but revenue_M, DE, and TA_M only have data for the end of each quarter. Because of this there are gaps in the panel between each quarter. I think what I need to do is bring the data from the previous day forward if that cell is blank but I'm not sure how this can be done. I would appreciate any help I can get in this regard.

Code:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input int Stock_id float date2 double price float revenue_M double DE float TA_M
1 21184    . 6598.428 340.276202 38486.848
1 21186 24.5        .          .         .
1 21187 25.5        .          .         .
1 21188 27.1        .          .         .
1 21189 27.7        .          .         .
1 21192 27.7        .          .         .
1 21193   26        .          .         .
1 21194   26        .          .         .
1 21195 27.1        .          .         .
1 21196 27.6        .          .         .
1 21200   27        .          .         .
1 21201 26.8        .          .         .
1 21202   26        .          .         .
1 21203 26.2        .          .         .
1 21206 26.4        .          .         .
1 21207 26.1        .          .         .
1 21208 25.7        .          .         .
1 21209 25.5        .          .         .
1 21210 25.1        .          .         .
1 21213 25.2        .          .         .
1 21214   26        .          .         .
1 21216 26.6        .          .         .
1 21217   26        .          .         .
1 21221 26.2        .          .         .
1 21222 27.3        .          .         .
1 21223 27.8        .          .         .
1 21224 27.7        .          .         .
1 21227 27.7        .          .         .
1 21229 27.3        .          .         .
1 21230 27.1        .          .         .
1 21231 26.2        .          .         .
1 21234 26.2        .          .         .
1 21235   26        .          .         .
1 21236 26.2        .          .         .
1 21237   27        .          .         .
1 21238 26.5        .          .         .
1 21241   27        .          .         .
1 21242 29.8        .          .         .
1 21243 32.1        .          .         .
1 21245   32        .          .         .
1 21248 32.2        .          .         .
1 21249 31.4        .          .         .
1 21250   32        .          .         .
1 21251 35.6        .          .         .
1 21252 36.8        .          .         .
1 21255 36.8        .          .         .
1 21256 37.9        .          .         .
1 21257   37        .          .         .
1 21258 36.6        .          .         .
1 21259   36        .          .         .
1 21262 35.1        .          .         .
1 21263 36.2        .          .         .
1 21264   37        .          .         .
1 21265   37        .          .         .
1 21266 36.9        .          .         .
1 21269   35        .          .         .
1 21270   35        .          .         .
1 21271 35.4        .          .         .
1 21272 35.5        .          .         .
1 21274    . 5367.699 1066.52549  31290.12
1 21276 27.7        .          .         .
1 21277 27.4        .          .         .
1 21278 27.3        .          .         .
1 21279 26.5        .          .         .
1 21280 27.2        .          .         .
1 21283 26.6        .          .         .
1 21284   26        .          .         .
1 21285 26.7        .          .         .
1 21286 28.1        .          .         .
1 21290 28.8        .          .         .
1 21291 28.3        .          .         .
1 21292 27.6        .          .         .
1 21293   28        .          .         .
1 21294   28        .          .         .
1 21297 27.7        .          .         .
1 21298 28.1        .          .         .
1 21299 27.3        .          .         .
1 21300   27        .          .         .
1 21301 26.7        .          .         .
1 21305   28        .          .         .
1 21306 27.9        .          .         .
1 21307 27.6        .          .         .
1 21308 27.3        .          .         .
1 21312 26.9        .          .         .
1 21313 26.3        .          .         .
1 21314 26.2        .          .         .
1 21315 26.9        .          .         .
1 21318   26        .          .         .
1 21319   26        .          .         .
1 21320 25.9        .          .         .
1 21321 25.5        .          .         .
1 21322   25        .          .         .
1 21325 25.7        .          .         .
1 21326   25        .          .         .
1 21327 24.5        .          .         .
1 21328   25        .          .         .
1 21329   25        .          .         .
1 21332 25.3        .          .         .
1 21334 25.1        .          .         .
1 21335 24.1        .          .         .
end
format %tdDD/NN/CCYY date2