sts_zoo.animals

LLTFactory

A local linear trend (LLT) factory.

The generative model for programs created by this factory is

lt=lt1+loct+scale_localtwtl, l0=ic_localzt=zt1+lt+scale_leveltwtz, z0=ic_level,

where wtNormal(0,1), t0tt1.

Args:

make

Creates a new LLT model. The sites in the created model are guaranteed to be unique.

Args:

None

ModelFactory

Abstract base class for all model factories. Ensures unique ids for each component of each generated model, and encapsulates model generation through make method.

make

Abstract method to be overridden. Calling .make() should create a new stsb3 model with guaranteed unique site names.

SGTFactory

A seasonal + global trend (SGT) factory.

The generative model for programs created by this factory is

lt=αt+βtlt1+scale_localtwtgt=a+btst=θtmods, s=1,...,num_seasonszt=st+gt+lt,

where wtNormal(0,1), t0tt1, and num_seasons is the number of discrete seasons.

Args:

make

Creates a new SGT model. The sites in the created model are guaranteed to be unique.

Args:

None

SLLTFactory

A semi-local linear trend (SLLT) factory.

The generative model for programs created by this factory is

lt=αt+βtlt1+scale_localtwtlzt=zt1+lt+scale_leveltwtz, z0=ic_level,

where wtNormal(0,1), t0tt1.

Args:

make

Creates a new SLLT model. The sites in the created model are guaranteed to be unique.

Args:

None

StochVolFactory

A stochastic volatility model factory.

This is a model for the log of an asset price St. Define zt=logSt. The generative model for programs created by this factory is

isp σt=isp σt1+dtt loc_ispvolt +dtt scale_ispvolt wtispσ, l0=ic_logvolzt=zt1+dttloct+dttσtwtz, z0=ic,

where wtNormal(0,1), t0tt1, and isp is the inverse softplus function, isp(y)=log(1+expy).

Args:

make

Creates a new StochVol model. The sites in the created model are guaranteed to be unique.

Args:

None