All study types of bayesloop introduced so far are used for
retrospective data analysis, i.e. the complete data set is already
available at the time of the analysis. Many applications, however, from
algorithmic trading to the monitoring of heart function or blood sugar
levels call for on-line analysis methods that can take into account new
information as it arrives from external sources. For this purpose,
bayesloop provides the class
OnlineStudy, which enables the
inference of time-varying parameters in a sequential fashion, much like
a particle filter.
In contrast to particle filters, the
OnlineStudy can account for
different scenarios of parameter dynamics (i.e. different transition
models) and can apply on-line model selection to objectively determine
which scenario is more likely to describe the current data point, or all
past data points.
In this case, we avoid constructing some artificial usage example and directly point the reader at this case study on stock market fluctuations. In this detailed example, we investigate the intra-day price fluctuations of the exchange-traded fund SPY. Based on two different transition models, one for normal market function and a second one for chaotic market fluctuations, we identify price corrections that are induced by news announcements of economic indicators.