Discover of Missing data in options_daily_sp500_2018_2022 file

I noticed that the options_daily_sp500_2018_2022 file is missing the last date of each month. Is there a specific reason for this strategy?

Hi Kevin,



Thanks for pointing this out! There seems to be some discrepancy in the file. We will update the file and make the necessary changes.



Thanks,

Akshay

Thanks Akshay,



There are two questions for this "Options volatility trading".



One is to consider the last date of each month for P/L. Because this date for Call and put is not valuable which has approached to expiry date. Therefore, when we use this date as P/L may be get big loss. So how to set the code that when the date the end of the month, we may need to offset in advance 



Secondly,  I discover the capstone project model for "Options volatility trading" have a bug. In the step 6 generae trading signals, if the signal value is assigned on the date are not available in options_data, it will get error. For this issue, I write try and except to pass this error. Actaully, I want to set pd.DateOffset(days=5) instead of d.DateOffset(days=4) when facing this issue, but it is unsuccessful to run. Do you have any idea for it? or using the pass is ok for this case?

Hi Kevin, 

  1. One approach is to check if the exit date is the last day of the month and if that's the case you can offset the exit day by one day i.e. one trading day before the expiry date. 


  2. A better approach would be to directly get the dates from the [ 'QUOTE_DATE'] column of the 'options_data' dataframe and assign signals. The capstone model solution has been updated accordingly. You can refer to Unit 4 of Section 21 for the same. 



    Hope this helps!