clear;

% don't import excel files if the file has been imported already.
if (exist('FPA_sum.mat', 'file') ~= 2)
    count = 1;

    rawDataDir = fullfile(cd, '..', '..', 'data_raw', 'FPA'); % Path to raw data directory
    xlsFilePath = fullfile(rawDataDir, 'Frequency.xlsx');

    %import the frequency of price changes across industries
    FPA = xlsread(xlsFilePath,'A1:A66');
    FPA(isnan(FPA)) = 0;

    clear count

    %replace missings with the industry-weighted average delta
    FPA(FPA==0)  = mean(FPA);
    save FPA_sum.mat

else
    load FPA_sum.mat
end




