o

dlm.core.model

StochasticVolatility

object StochasticVolatility

Simulate and fit a Stochastic volatility model using a mixture model approximation for the non-linear dynamics for either a AR(1) latent-state or OU latent state

Y_t = sigma * exp(a_t / 2), sigma ~ N(0, 1) a_t = phi * a_t + eta, eta ~ N(0, sigma_eta)

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. StochasticVolatility
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def arLikelihood(alphas: Vector[Double], p: SvParameters): Double

    Log-Likelihood of the AR(1) process

    Log-Likelihood of the AR(1) process

    p

    the current value of the parameters

    returns

    the log-likelihood

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def initialStateOu(p: SvParameters, ys: Vector[(Double, Option[Double])]): Rand[Vector[SampleState]]
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. def observation(at: Double): Rand[Double]

    The observation function for the stochastic volatility model

  18. def ouLikelihood(p: SvParameters, alphas: Vector[(Double, Double)]): Double

    Marginal log likelihood of the OU process used to perform the Metropolis Hastings steps to learn the static parameters

    Marginal log likelihood of the OU process used to perform the Metropolis Hastings steps to learn the static parameters

    returns

    the log likelihood of the state given the static parameter values

  19. def sampleBeta(priorPhi: ContinuousDistr[Double], priorMu: Gaussian, priorSigma: InverseGamma, ys: Vector[(Double, Option[Double])]): Process[StochVolState]
  20. def sampleKt(ys: Vector[Option[Double]], alphas: Vector[Double]): Vector[Int]

    Sample the indices for the mixture model

    Sample the indices for the mixture model

    ys

    a collection of observations

    alphas

    the latent log-volatility

  21. def sampleMu(prior: Gaussian, p: SvParameters, alphas: Vector[Double]): Rand[Double]

    Sample mu from the autoregressive state space, from a Gaussian distribution

    Sample mu from the autoregressive state space, from a Gaussian distribution

    prior

    a Gaussian prior for the parameter

    returns

    a function from the current state of the Markov chain to a new state with a new mu sampled from the Gaussian posterior distribution

  22. def sampleMuOu(prior: ContinuousDistr[Double], delta: Double = 0.05, p: SvParameters, alphas: Vector[(Double, Double)]): (Double) ⇒ Rand[(Double, Int)]

    Sample the mean from the OU process using a metropolis step

    Sample the mean from the OU process using a metropolis step

    prior

    a prior distribution for the mean parameter, mu

    delta

    the standard deviation of the (Gaussian) proposal distribution

  23. def sampleOu(priorPhi: ContinuousDistr[Double], priorMu: ContinuousDistr[Double], priorSigma: InverseGamma, params: SvParameters, ys: Vector[(Double, Option[Double])]): Process[StochVolState]
  24. def samplePhi(prior: ContinuousDistr[Double], p: SvParameters, alpha: Vector[Double], tau: Double, lambda: Double): (Double) ⇒ Rand[Double]

    Sample Phi using a Beta proposal distribution

    Sample Phi using a Beta proposal distribution

    prior

    a prior distribution for the parameter phi

    tau

    a small tuning parameter for the beta proposal

    lambda

    a tuning parameter for the beta proposal distribution

    returns

    a Metropolis Hastings step sampling the value of Phi

  25. def samplePhiOu(prior: ContinuousDistr[Double], p: SvParameters, alphas: Vector[(Double, Double)], lambda: Double = 10.0, tau: Double = 0.05): (Double) ⇒ Rand[(Double, Int)]

    Sample the autoregressive parameter (between 0 and 1)

  26. def sampleSigma(prior: InverseGamma, p: SvParameters, alphas: Vector[Double]): Rand[Double]

    Sample sigma from the an inverse gamma distribution (sqrt)

    Sample sigma from the an inverse gamma distribution (sqrt)

    prior

    the prior for the variance of the noise of the latent-state

    p

    the current value of the parameters

    alphas

    the current value of the latent-state

    returns

    a distribution over the system variance

  27. def sampleSigmaMetropOu(prior: ContinuousDistr[Double], delta: Double = 0.05, p: SvParameters, alphas: Vector[(Double, Double)]): (Double) ⇒ Rand[(Double, Int)]

    Metropolis step to sample the value of sigma_eta

  28. def sampleStateAr(ys: Vector[(Double, Option[Double])], params: SvParameters, alphas: Vector[SampleState]): Rand[Vector[SampleState]]
  29. def sampleStateOu(ys: Vector[(Double, Option[Double])], params: SvParameters, alphas: Vector[SampleState]): Rand[Vector[SampleState]]
  30. def sampleTau(prior: Gamma, p: SvParameters, alphas: Vector[Double]): Gamma
  31. def sampleUni(priorPhi: Gaussian, priorMu: Gaussian, priorSigma: InverseGamma, ys: Vector[(Double, Option[Double])]): Process[StochVolState]
  32. def simOu(p: SvParameters, times: Stream[Double]): Stream[(Double, Option[Double], Double)]

    Simulate from a Stochastic Volatility model with Ornstein-Uhlenbeck latent State

  33. def simStep(time: Double, p: SvParameters)(state: Double): Rand[(Double, Option[Double], Double)]
  34. def simulate(p: SvParameters): Process[(Double, Option[Double], Double)]

    Simulate regularly from a stochastic volatility model with AR(1) latent-state

  35. def stepBeta(priorPhi: ContinuousDistr[Double], priorMu: Gaussian, priorSigma: InverseGamma, ys: Vector[(Double, Option[Double])]): (StochVolState) ⇒ Rand[StochVolState]
  36. def stepOu(priorPhi: ContinuousDistr[Double], priorMu: ContinuousDistr[Double], priorSigma: InverseGamma, ys: Vector[(Double, Option[Double])])(s: StochVolState): Rand[StochVolState]

    Perform a single step of the MCMC Kernel for the SV with OU latent state Using independent Metropolis-Hastings moves

  37. def stepOu(p: SvParameters, at: Double, dt: Double): ContinuousDistr[Double]

    Advance the state of the OU process

  38. def stepState(p: SvParameters, at: Double): ContinuousDistr[Double]
  39. def stepUni(priorPhi: Gaussian, priorMu: Gaussian, priorSigma: InverseGamma, ys: Vector[(Double, Option[Double])]): (StochVolState) ⇒ Rand[StochVolState]
  40. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  41. def toString(): String
    Definition Classes
    AnyRef → Any
  42. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped