Hi,
I want to select a sample between two dates. Below is an example of the data. ISIN is an indicator of each company which shows daily basis observation. I wonder if it is possible to keep the data if date1 is in range of date2 to date3, using inrange command.
I would be grateful if someone helps me.
input str12 ISIN int(date1 date2 date3) double(AskPrice BidPrice)
"GB0001771426" 20457 20458 20514 11.414373583684 11.2784881838783
"GB0001771426" 20458 20458 20514 11.4680789882926 11.331554238432
"GB0001771426" 20494 20458 20514 12.347536699046 11.9616761772009
"GB0001771426" 20495 20458 20514 11.8908344792647 11.5072591734819
"GB0001771426" 20496 20458 20514 11.8534304197731 11.5957471497781
"GB0001771426" 20517 20458 20514 11.9996199092448 11.6375624119831
"GB0001771426" 20520 20458 20514 12.0197515368487 11.6570866197886
"GB0001771426" 20521 20458 20514 11.9817036942277 11.7492999587793
"NL0009739416" 20457 20490 20543 3.501 3.5
"NL0009739416" 20458 20490 20543 3.477 3.474
"NL0009739416" 20459 20490 20543 3.301 3.298
"NL0009739416" 20488 20490 20543 3.308 3.301
"NL0009739416" 20489 20490 20543 3.368 3.366
"NL0009739416" 20492 20490 20543 3.172 3.17
"NL0009739416" 20524 20490 20543 3.66 3.659
"NL0009739416" 20527 20490 20543 3.679 3.67
"NL0009739416" 20528 20490 20543 3.69 3.68
"PLTAURN00011" 20457 20456 20529 .656249432992289 .651595181694471
"PLTAURN00011" 20458 20456 20529 .629382265591854 .627059821807382
"PLTAURN00011" 20460 20456 20529 .605224920111718 .60292368467403
"PLTAURN00011" 20493 20456 20529 .61283553384721 .610582462031596
"PLTAURN00011" 20494 20456 20529 .617185481185481 .612647352647353
"PLTAURN00011" 20495 20456 20529 .606199790018182 .603937850503188
"PLTAURN00011" 20528 20456 20529 .640904913534224 .638574350212281
"PLTAURN00011" 20529 20456 20529 .678190736478711 .671199079401611
"PLTAURN00011" 20530 20456 20529 .699251984967182 .692236078763498
"PLTAURN00011" 20531 20456 20529 .711241834386819 .706547168813308
"SE0000103814" 20457 20460 20512 21.8191724941725 21.808300958301
"SE0000103814" 20458 20460 20512 21.4538572309267 21.4322085354364
"SE0000103814" 20460 20460 20512 21.3318790542696 21.3102662082166
"SE0000103814" 20461 20460 20512 21.1457953167493 21.1242509506599
"SE0000103814" 20486 20460 20512 19.5434532298412 19.5220357468496
"SE0000103814" 20487 20460 20512 19.2750535618957 19.2536843229136
"SE0000103814" 20488 20460 20512 19.4563917599428 19.4351395570374
"SE0000103814" 20521 20460 20512 21.8216434448452 21.8002286818964
"SE0000103814" 20522 20460 20512 21.7809211570111 21.75938786867
"SE0000103814" 20523 20460 20512 21.5181356518833 21.5074566763737
I want to select a sample between two dates. Below is an example of the data. ISIN is an indicator of each company which shows daily basis observation. I wonder if it is possible to keep the data if date1 is in range of date2 to date3, using inrange command.
I would be grateful if someone helps me.
input str12 ISIN int(date1 date2 date3) double(AskPrice BidPrice)
"GB0001771426" 20457 20458 20514 11.414373583684 11.2784881838783
"GB0001771426" 20458 20458 20514 11.4680789882926 11.331554238432
"GB0001771426" 20494 20458 20514 12.347536699046 11.9616761772009
"GB0001771426" 20495 20458 20514 11.8908344792647 11.5072591734819
"GB0001771426" 20496 20458 20514 11.8534304197731 11.5957471497781
"GB0001771426" 20517 20458 20514 11.9996199092448 11.6375624119831
"GB0001771426" 20520 20458 20514 12.0197515368487 11.6570866197886
"GB0001771426" 20521 20458 20514 11.9817036942277 11.7492999587793
"NL0009739416" 20457 20490 20543 3.501 3.5
"NL0009739416" 20458 20490 20543 3.477 3.474
"NL0009739416" 20459 20490 20543 3.301 3.298
"NL0009739416" 20488 20490 20543 3.308 3.301
"NL0009739416" 20489 20490 20543 3.368 3.366
"NL0009739416" 20492 20490 20543 3.172 3.17
"NL0009739416" 20524 20490 20543 3.66 3.659
"NL0009739416" 20527 20490 20543 3.679 3.67
"NL0009739416" 20528 20490 20543 3.69 3.68
"PLTAURN00011" 20457 20456 20529 .656249432992289 .651595181694471
"PLTAURN00011" 20458 20456 20529 .629382265591854 .627059821807382
"PLTAURN00011" 20460 20456 20529 .605224920111718 .60292368467403
"PLTAURN00011" 20493 20456 20529 .61283553384721 .610582462031596
"PLTAURN00011" 20494 20456 20529 .617185481185481 .612647352647353
"PLTAURN00011" 20495 20456 20529 .606199790018182 .603937850503188
"PLTAURN00011" 20528 20456 20529 .640904913534224 .638574350212281
"PLTAURN00011" 20529 20456 20529 .678190736478711 .671199079401611
"PLTAURN00011" 20530 20456 20529 .699251984967182 .692236078763498
"PLTAURN00011" 20531 20456 20529 .711241834386819 .706547168813308
"SE0000103814" 20457 20460 20512 21.8191724941725 21.808300958301
"SE0000103814" 20458 20460 20512 21.4538572309267 21.4322085354364
"SE0000103814" 20460 20460 20512 21.3318790542696 21.3102662082166
"SE0000103814" 20461 20460 20512 21.1457953167493 21.1242509506599
"SE0000103814" 20486 20460 20512 19.5434532298412 19.5220357468496
"SE0000103814" 20487 20460 20512 19.2750535618957 19.2536843229136
"SE0000103814" 20488 20460 20512 19.4563917599428 19.4351395570374
"SE0000103814" 20521 20460 20512 21.8216434448452 21.8002286818964
"SE0000103814" 20522 20460 20512 21.7809211570111 21.75938786867
"SE0000103814" 20523 20460 20512 21.5181356518833 21.5074566763737
Comment