Skip to content

Commit

Permalink
Bubbles Detection Measures
Browse files Browse the repository at this point in the history
  • Loading branch information
TommasoBelluzzo committed Jan 5, 2023
1 parent c9d27f1 commit f5e9b48
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
Binary file modified Datasets/Example_Large.mat
Binary file not shown.
Binary file modified Datasets/Example_Large.xlsx
Binary file not shown.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

This framework calculates, analyses and compares the following systemic risk measures:

* **BUBBLES DETECTION MEASURES**
* `BUB (Bubbles Flag)`
* `BMPH (Boom Phases Flag)`
* `BRPH (Burst Phases Flag)`
* `BC (Bubbling Capitalization)`
* `BCP (Bubbling Capitalization Percentage)`
* *References*: [Phillips et al. (2015)](https://doi.org/10.1111/iere.12132), [Phillips & Shi (2018)](https://doi.org/10.1016/bs.host.2018.12.002), [Phillips & Shi (2019)](https://doi.org/10.1111/obes.12307), [Brunnermeier et al. (2020)](https://doi.org/10.1093/rfs/hhaa011)
* **COMPONENT MEASURES**
* `AR (Absorption Ratio)` by [Kritzman et al. (2010)](https://doi.org/10.2139/ssrn.1633027)
* `CATFIN` by [Allen et al. (2012)](https://doi.org/10.1093/rfs/hhs094)
Expand Down Expand Up @@ -130,6 +137,9 @@ Datasets must be built following the structure of default ones included in every

* It is not mandatory to include financial time series used by unwanted measures. Optional financial time series used by included measures can be omitted, as long as their contribution isn't necessary. Below a list of required and optional time series for each category of measures:

* **Bubbles Detection Measures:**
* *Required:* shares (prices).
* *Optional:* none.
* **Component Measures:**
* *Required:* shares (any).
* *Optional:* none.
Expand Down
11 changes: 9 additions & 2 deletions ScriptsDataset/analyze_dataset.m
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function plot_crises(ds,id)

ax = gca();

if (k <= 5)
if (k <= 10)
legend(ax,p,ds.CrisisNames,'Location','southoutside','Orientation','horizontal');

tooltips = [];
Expand Down Expand Up @@ -171,7 +171,14 @@ function plot_crises(ds,id)
if (~isempty(tooltips))
dcm = datacursormode(f);
set(dcm,'Enable','on','SnapToDataVertex','off','UpdateFcn',@(targ,evtd)create_tooltip(targ,evtd,tooltips));
createDatatip(dcm,tooltips_target,[1 1]);

if (verLessThan('MATLAB','9.7'))
createDatatip(dcm,tooltips_target,[1 1]);
else
for i = 1:numel(tooltips_target)
createDatatip(dcm,tooltips_target(i),[1 1]);
end
end
end

function tooltip = create_tooltip(~,evtd,tooltips)
Expand Down
8 changes: 4 additions & 4 deletions initialize.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

rng('default');

if (exist('up','var') == 0)
up = true;
end
%% PARALLEL COMPUTING

delete(gcp('nocreate'));

%% PARALLEL COMPUTING
if (exist('up','var') == 0)
up = true;
end

if (up)
pdprofile = parallel.defaultClusterProfile;
Expand Down

0 comments on commit f5e9b48

Please sign in to comment.