I am new to R and coding in general, so please bear with me.
I have a huge .csv file of financial options prices, but some are calls ('c') and some are puts ('p') and they are simply in one continuous list. In the .csv file they alternate, so one row will be the data for a call while the next will be the data for a put, say, of the same security for the same time period. How can I parse out just the data for calls (puts)?
Also, the data are arranged by date, but there are multiple pieces of data per date (intra-day data). OF these intra-day data points, there is (volume) data for multiple different prices. I would like to construct a normal distribution of said data over different prices per single day; how would I do that?
symbol exchange date stock_close_price option_symbol expiration strike call/put
ALSN NYSE 7/23/12 17.71 ALSN 120818C00015000 8/18/12 15 C
ALSN NYSE 7/23/12 17.71 ALSN 120818P00015000 8/18/12 15 P
ALSN NYSE 7/23/12 17.71 ALSN 120818C00017500 8/18/12 17.5 C
ALSN NYSE 7/23/12 17.71 ALSN 120818P00017500 8/18/12 17.5 P
ALSN NYSE 7/23/12 17.71 ALSN 120818C00020000 8/18/12 20 C
ALSN NYSE 7/23/12 17.71 ALSN 120818P00020000 8/18/12 20 P
ALSN NYSE 7/23/12 17.71 ALSN 120818C00022500 8/18/12 22.5 C
ALSN NYSE 7/23/12 17.71 ALSN 120818P00022500 8/18/12 22.5 P
ALSN NYSE 7/23/12 17.71 ALSN 120818C00025000 8/18/12 25 C