Skip to content

Commit 3f1e02f

Browse files
committed
rename RW to GaussianRandomWalk
1 parent 75a9dd1 commit 3f1e02f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

examples/stochastic_volatility.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import numpy as np
22
from pymc import *
3+
from pymc.distributions.timeseries import *
34

45
from scipy.sparse import csc_matrix
56
from scipy import optimize
@@ -24,11 +25,11 @@
2425

2526
#its easier to sample the scale of the volatility process innovations on a log scale
2627
sd, log_sd = model.TransformedVar('sd', Exponential(1./.02),
27-
transforms.log, testval = -2.5)
28+
logtransform, testval = -2.5)
2829

2930
nu = Var('nu', Exponential(1./10))
3031

31-
lvol = Var('lvol', timeseries.RW(sd**-2), shape = n)
32+
lvol = Var('lvol', GaussianRandomWalk(sd**-2), shape = n)
3233

3334
lreturns = Data(returns, T(nu, lam = exp(-2*lvol)))
3435

pymc/distributions/timeseries.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from dist_math import *
22
from continuous import *
33

4+
__all__ = ['AR1', 'GaussianRandomWalk']
45
@quickclass
56
def AR1(k, tau_e):
67
"""
@@ -32,7 +33,7 @@ def logp(x):
3233
return locals()
3334

3435
@quickclass
35-
def RW(tau, init = Flat()):
36+
def GaussianRandomWalk(tau, init = Flat()):
3637
"""
3738
Random Walk with Normal innovations
3839

0 commit comments

Comments
 (0)