object DlmFsvSystem
Fit a DLM with the system variance modelled using an FSV model and latent log volatility modelled using continuous time Ornstein-Uhlenbeck process
- Alphabetic
- By Inheritance
- DlmFsvSystem
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
State(p: DlmFsvParameters, theta: Vector[SamplingState], factors: Vector[(Double, Option[DenseVector[Double]])], volatility: Vector[SamplingState]) extends Product with Serializable
The state of the Gibbs Sampler
The state of the Gibbs Sampler
- p
the current parameters of the MCMC
- theta
the current state of the mean latent state (DLM state) of the DLM FSV model
- factors
the factors of the observation model
- volatility
the log-volatility of the system variance
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
calculateVariance(alphas: Vector[SamplingState], beta: DenseMatrix[Double], v: DenseMatrix[Double]): Vector[DenseMatrix[Double]]
Calculate the time dependent variance from the log-volatility and factor loading matrix
Calculate the time dependent variance from the log-volatility and factor loading matrix
- alphas
the time series of log-volatility
- beta
the factor loading matrix
- v
the diagonal observation covariance
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def emptyParams(vDim: Int, wDim: Int, k: Int): DlmFsvParameters
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
factorState(theta: Vector[SamplingState], g: (Double) ⇒ DenseMatrix[Double]): Vector[Data]
Center the state by taking away the dynamic mean of the series
Center the state by taking away the dynamic mean of the series
- theta
the state representing the evolving mean of the process
- g
the system matrix: a function from time to a dense matrix
- returns
a vector containing the x(t_i) - g(dt_i)x(t_{i-1})
-
def
ffbs(model: Dlm, ys: Vector[Data], p: DlmParameters, ws: Vector[DenseMatrix[Double]]): Rand[Vector[SamplingState]]
Perform forward filtering backward sampling using a time dependent state covariance matrix
-
def
ffbsSvd(model: Dlm, ys: Vector[Data], p: DlmParameters, ws: Vector[DenseMatrix[Double]]): Rand[Vector[SamplingState]]
Perform forward filtering backward sampling using a time dependent state covariance matrix updating the SVD of the parameters
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
forecast(dlm: Dlm, p: DlmFsvParameters, ys: Vector[Data]): Traversable[KfState]
Perform a forecast online using the DLM FSV Model Given a collection of parameters sampled from the parameter posterior
Perform a forecast online using the DLM FSV Model Given a collection of parameters sampled from the parameter posterior
- dlm
a dlm model
- p
DLM FSV Parameters
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
initialise(params: DlmFsvParameters, ys: Vector[Data], dlm: Dlm): State
Initialise the state of the DLM FSV system Model by initialising variance matrices for the system, performing FFBS for the mean state
Initialise the state of the DLM FSV system Model by initialising variance matrices for the system, performing FFBS for the mean state
- params
parameters of the DLM FSV system model
- ys
time series of observations
- dlm
the description of the
-
def
initialiseOu(params: DlmFsvParameters, ys: Vector[Data], dlm: Dlm): State
Initialise the state of the DLM FSV system Model by initialising variance matrices for the system, performing FFBS for the mean state
Initialise the state of the DLM FSV system Model by initialising variance matrices for the system, performing FFBS for the mean state
- params
parameters of the DLM FSV system model
- ys
time series of observations
- dlm
the description of the
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
paramsFromList(vDim: Int, wDim: Int, k: Int)(l: List[Double]): DlmFsvParameters
Read DLM FSV parameters with a factor structure on the system matrix from a list of doubles
Read DLM FSV parameters with a factor structure on the system matrix from a list of doubles
- vDim
the dimension of the observation matrix
- wDim
the dimension of the latent-state
- k
the number of factors
- l
a list of doubles representing parameter from a DLM FSV system model
- def sample(priorBeta: Gaussian, priorSigmaEta: InverseGamma, priorPhi: Gaussian, priorMu: Gaussian, priorSigma: InverseGamma, priorV: InverseGamma, ys: Vector[Data], dlm: Dlm, initP: DlmFsvParameters): Process[State]
- def sampleOu(priorBeta: Gaussian, priorSigmaEta: InverseGamma, priorPhi: Beta, priorMu: Gaussian, priorSigma: InverseGamma, priorV: InverseGamma, ys: Vector[Data], dlm: Dlm, initP: DlmFsvParameters): Process[State]
-
def
sampleStateAr(ys: Vector[Data], dlm: Dlm, params: DlmFsvParameters): Process[State]
Sample the factors, mean state and volatility while keeping the parameters constant
-
def
sampleStep(priorBeta: Gaussian, priorSigmaEta: InverseGamma, priorPhi: Gaussian, priorMu: Gaussian, priorSigma: InverseGamma, priorV: InverseGamma, ys: Vector[Data], dlm: Dlm)(s: State): Rand[State]
Perform a single step of the Gibbs Sampling algorithm for the DLM FSV where the system variance is modelled using FSV model
-
def
sampleStepOu(priorBeta: Gaussian, priorSigmaEta: InverseGamma, priorPhi: Beta, priorMu: Gaussian, priorSigma: InverseGamma, priorV: InverseGamma, ys: Vector[Data], dlm: Dlm)(s: State): Rand[State]
Perform a single step of the Gibbs Sampling algorithm for the DLM FSV where the system variance is modelled using FSV model
-
def
simStep(time: Double, x: DenseVector[Double], a0w: Vector[Double], dlm: Dlm, p: DlmFsvParameters, dt: Double, dimObs: Int): Rand[(Data, DenseVector[Double], Vector[Double])]
Simulate a single step in the DLM FSV model
Simulate a single step in the DLM FSV model
- time
the time of the next observation
- x
the state of the DLM
- a0w
the latent log-volatility of the system variance
- dlm
the DLM model to use for the evolution
- p
the parameters of the DLM and FSV Model
- dt
the time difference between successive observations
- returns
the next simulated value
-
def
simulateRegular(dlm: Dlm, p: DlmFsvParameters, dimObs: Int): Process[(Data, DenseVector[Double], Vector[Double])]
Simulate from a DLM Factor Stochastic Volatility Model
Simulate from a DLM Factor Stochastic Volatility Model
- dlm
the dlm model
- p
dlm fsv model parameters
- returns
a vector of observations
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )