object StochasticVolatilityKnots
Use a Gaussian approximation to the state space to sample the stochastic volatility model with discrete regular observations and an AR(1) latent state
- Alphabetic
- By Inheritance
- StochasticVolatilityKnots
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- type ConditionalFFBS = (SampleState, SampleState, SvParameters, Vector[(Double, Option[Double])]) ⇒ Rand[Vector[SampleState]]
- type ConditionalFilter = (SampleState, SvParameters, Vector[(Double, Option[Double])]) ⇒ Rand[Vector[SampleState]]
- type ConditionalSample = (SampleState, SvParameters, Vector[(Double, Option[Double])]) ⇒ Rand[Vector[SampleState]]
- case class OuSvState(params: SvParameters, alphas: Vector[SampleState], accepted: DenseVector[Int]) extends Product with Serializable
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
-
def
approxLl(state: Vector[Double], ys: Vector[(Double, Option[Double])]): Double
The log likelihood for the Gaussian approximation
The log likelihood for the Gaussian approximation
- state
the proposed state for the current block
- returns
the log likelihood of the Gaussian approximation
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- def discreteUniform(min: Int, max: Int): Int
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
exactLl(state: Vector[Double], ys: Vector[(Double, Option[Double])]): Double
The exact log likelihood of the observations
The exact log likelihood of the observations
- state
the proposed state for the current block
- ys
to observations for the current block
- returns
The exact log likelihood of the observations
- def ffbsAr: (SampleState, SampleState, SvParameters, Vector[(Double, Option[Double])]) ⇒ Rand[Vector[SampleState]]
- def ffbsOu: (SampleState, SampleState, SvParameters, Vector[(Double, Option[Double])]) ⇒ Rand[Vector[SampleState]]
- def filterAr(start: SampleState, p: SvParameters, transObs: Vector[(Double, Option[Double])]): Rand[Vector[SampleState]]
- def filterOu(start: SampleState, p: SvParameters, transObs: Vector[(Double, Option[Double])]): Rand[Vector[SampleState]]
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def initialStateAr(p: SvParameters, ys: Vector[(Double, Option[Double])]): Rand[Vector[SampleState]]
-
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 sampleAr(end: SampleState, p: SvParameters, transObs: Vector[(Double, Option[Double])]): Rand[Vector[SampleState]]
- def sampleArBeta(priorPhi: Beta, priorMu: Gaussian, priorSigmaEta: InverseGamma, ys: Vector[(Double, Option[Double])], initP: SvParameters): Process[StochVolState]
- def sampleBlock(ys: Vector[(Double, Option[Double])], p: SvParameters, filter: ConditionalFFBS): (Vector[SampleState]) ⇒ Rand[(Vector[SampleState], Int)]
- def sampleEnd(ys: Vector[(Double, Option[Double])], p: SvParameters, filter: ConditionalFilter): (Vector[SampleState]) ⇒ Rand[(Vector[SampleState], Int)]
-
def
sampleKnots(min: Int, max: Int, n: Int): Rand[Vector[Int]]
Sample knot positions by sampling block size from a uniform distribution between min and max for a sequence of observations of length n
Sample knot positions by sampling block size from a uniform distribution between min and max for a sequence of observations of length n
- min
the minimum size of a block
- max
the maxiumum size of a block
- n
the length of the observations
- def sampleOu(priorPhi: ContinuousDistr[Double], priorMu: ContinuousDistr[Double], priorSigma: ContinuousDistr[Double], ys: Vector[(Double, Option[Double])], initP: SvParameters): Process[OuSvState]
- def sampleOu(end: SampleState, p: SvParameters, transObs: Vector[(Double, Option[Double])]): Rand[Vector[SampleState]]
- def sampleParametersAr(priorPhi: Gaussian, priorMu: Gaussian, priorSigmaEta: InverseGamma, ys: Vector[(Double, Option[Double])]): Process[StochVolState]
-
def
samplePhiConjugate(prior: Gaussian, p: SvParameters, alphas: Vector[Double]): Rand[Double]
Sample phi from the autoregressive state space from a conjugate Gaussian distribution
Sample phi from the autoregressive state space from a conjugate Gaussian distribution
- prior
a Gaussian prior distribution
- returns
a function from the current state to the next state with a new value for phi sample from a Gaussian posterior distribution
- def sampleSigmaMetrop(prior: InverseGamma, p: SvParameters, alphas: Vector[Double]): (Double) ⇒ Rand[(Double, Int)]
- def sampleStart(ys: Vector[(Double, Option[Double])], p: SvParameters, sampler: ConditionalSample): (Vector[SampleState]) ⇒ Rand[(Vector[SampleState], Int)]
- def sampleStarts(min: Int, max: Int, length: Int): Vector[Int]
- def sampleState(ffbs: ConditionalFFBS, filter: ConditionalFilter, sampler: ConditionalSample)(ys: Vector[(Double, Option[Double])], p: SvParameters, knots: Vector[Int], state: Array[SampleState]): Array[SampleState]
- def sampleStateFold(ffbs: ConditionalFFBS, filter: ConditionalFilter, sampler: ConditionalSample)(ys: Vector[(Double, Option[Double])], p: SvParameters, knots: Vector[Int], state: Array[SampleState]): Vector[SampleState]
- def sampleStepAr(priorPhi: Gaussian, priorMu: Gaussian, priorSigmaEta: InverseGamma, ys: Vector[(Double, Option[Double])]): (StochVolState) ⇒ Rand[StochVolState]
- def sampleStepArBeta(priorPhi: Beta, priorMu: Gaussian, priorSigmaEta: InverseGamma, ys: Vector[(Double, Option[Double])]): (StochVolState) ⇒ Rand[StochVolState]
- def sampleStepOu(priorPhi: ContinuousDistr[Double], priorMu: ContinuousDistr[Double], priorSigma: ContinuousDistr[Double], ys: Vector[(Double, Option[Double])]): (OuSvState) ⇒ Rand[OuSvState]
-
def
sampleTau(prior: Gamma, p: SvParameters, alphas: Vector[Double]): Gamma
Sample the precision of the AR(1) process
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def transformObs(ys: Vector[(Double, Option[Double])]): Vector[(Double, Option[Double])]
-
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( ... )