Robert Jarrow and Simon Kwok, "Inferring Financial Bubbles from Option Data", Journal of Applied Econometrics, Vol. 36, No. 7, 2021, pp. 1013-1046. All files are ASCII files in DOS format. They are zipped in the file jk-files.zip. Unix/Linux users should use "unzip -a". The main codes are: optiondata_prep.sas (SAS code, to clean and prepare data for bubble inference) bub12_run.m (Matlab code, to evaluate simple and naive bounds) bubcp_run.m (Matlab code, to evaluate interval estimates) To run bub12_run.m, the following subroutines are required: bub12.m bub12_trade.m To run bubcp_run.m, the following subroutines are required: bubcp.m bubcp_trade.m anticonv_put.m anticonv_call.m lpoly.m nw_cov.m Please refer to the comments in individual subroutines for specific usage. Four input datasets are required for running the SAS code. All datasets are SAS data file (.sas7bdat). Input dataset S1, S2 and S4 are obtained from OptionMetrics and Wharton Research Data Services (WRDS). Input dataset S3 is obtained from Robert Shiller's website. Input dataset S1: callbase.sas7bdat source: OptionMetrics in WRDS fields: date date of transaction (e.g., 04JAN1996) exdate expiry date (e.g., 04JAN1996) cp_flag call/put indicator (C for call; P for put) strike_price strike price (in days) best_bid best bid price best_offer best ask price volume traded volume open_interest open interest impl_volatility implied volatility delta option delta Input dataset S2: snp500.sas7bdat source: WRDS fields: date date snp500 S&P 500 index Input dataset S3: div_shiller.sas7bdat source: http://www.econ.yale.edu/~shiller/data.htm fields: year year month month dividend S&P dividend yield Input dataset S4: trate_1mo3mo.sas7bdat source: WRDS fields: date date trate1mo 1-month Treasury bill rate trate3mo 3-month Treasury bill rate Two input datasets are required for running the Matlab codes. Both datasets are comma-delimited csv files and are generated by the sas code optiondata_prep.sas. A small extract of Input dataset C1 and a sample of Input dataset C2 are included for formatting references. Input dataset C1: allopt_01Janyyyyto31Decyyyy.csv (where yyyy ranges from 1996 to 2015) source: generated by optiondata_prep.sas fields: date transaction date (e.g., 04JAN1996) cp_flag call/put indicator (C for call; P for put) exdate expiration date (e.g., 04JAN1996) tau time-to-expiration (in days) strike strike price snp ex-dividend S&P 500 index closing value dy_ma dividend yield (not used) tr one-month T-bill rate (from Fed) money log-moneyness (not used) callprice call/put price volume trading volume (in number of contracts) iv implied volatility (not used) delta Greek letter delta (not used) sorted by: date ascending order cp_flag C, followed by P tau ascending order strike ascending order Input dataset C2: allopt_01Janyyyyto31Decyyyy_count.csv (where yyyy ranges from 1996 to 2015) source: generated by optiondata_prep.sas fields: date transaction date (e.g., 04JAN1996) _TEMG001 daily count of different option contracts with different tau, strike, and types (calls & puts). sorted by: date ascending order Any question should be sent to the corresponding author: Simon Kwok simon.kwok[AT]sydney.edu.au