sts_zoo.animals
LLTFactory
A local linear trend (LLT) factory.
The generative model for programs created by this factory is
where
Args:
loc (Block || torch.tensor || pyro.distributions)
: location parameterscale_local (Block || torch.tensor || pyro.distributions)
: scale parameter for scale_level (Block || torch.tensor || pyro.distributions)
: scale parameter for ic_local (torch.tensor || pyro.distributions)
: initial condition for ic_level (torch.tensor || pyro.distributions)
: initial condition for 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
where
Args:
alpha (Block || torch.tensor || pyro.distributions)
: intercept parameter of beta (Block || torch.tensor || pyro.distributions)
: slope parameter of a (Block || torch.tensor || pyro.distributions)
intercept parameter of b (Block || torch.tensor || pyro.distributions)
slope parameter of num_seasons (int)
: seasons (torch.tensor || pyro.distributions)
season valuesscale_local (Block || torch.tensor || pyro.distributions)
: scale parameter for scale_level (Block || torch.tensor || pyro.distributions)
: scale parameter for ic_level (torch.tensor || pyro.distributions)
: initial condition for 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
where
Args:
alpha (Block || torch.tensor || pyro.distributions)
: intercept parameter of beta (Block || torch.tensor || pyro.distributions)
: slope parameter of scale_local (Block || torch.tensor || pyro.distributions)
: scale parameter for scale_level (Block || torch.tensor || pyro.distributions)
: scale parameter for ic_level (torch.tensor || pyro.distributions)
: initial condition for 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
where
Args:
dt (Block || torch.tensor || pyro.distributions)
: time discretization. If a pyro.distributions
object, it should be an atomless distribution with non-negative support and will be interpreted as loc_ispvol (Block || torch.tensor || pyro.distributions)
: location parameter of the isp volatility processvol_ispvol (Block || torch.tensor || pyro.distributions)
: scale/volatility parameter of the isp volatility processic_ispvol (torch.tensor || pyro.distributions)
: initial condition of the isp_volatility processscale_level (Block || torch.tensor || pyro.distributions)
: scale parameter for loc (Block || torch.tensor || pyro.distributions)
: location parameter for the log asset price process.ic (torch.tensor || pyro.distributions)
: initial condition for the log asset price processmake
Creates a new StochVol model. The sites in the created model are guaranteed to be unique.
Args:
None