A methodology for testing asset price bubbles based on the theory was developed by (Robert Jarrow 2011).
- Robert Jarrow, Younes Kchia, and Philip Protter. 2011. "How to Detect an Asset Bubble." SIAM Journal on Financial Mathematics.
Here is how to use this code
Simply call the function run_all with the following parameters
-
this is a path to a csv data file. It has to be either relative to the folder that you place this SlidingBubbles.py file (expample below: "data/new_data/BoAFixed_FloatABSIndex.csv) or the full path (C:/blabla/blabla.csv)
-
window. this is number of data points that will be used to fit the sigma function.
-
step. this is by how much window will be shifted on each iteration
-
min_date and max_date. these are the dates that you want to limit your analysis to.
-
plot_stock. This is just a parameter that tells wether you want to plot the stock chart or not. By default it is set to no.
to recap
first iteration: min_date max_date
|-------------------------------------------|
|-window=256--|
second iteration: min_date max_date
|-------------------------------------------|
|-step=30-||-window=256--|
third iteration: min_date max_date
|-------------------------------------------|
|-step=30-||-step=30-||-window=256--|