Skip to content

Unify tauchen and rouwenhorst API - #664

Merged
mmcky merged 8 commits into
QuantEcon:masterfrom
Smit-create:i-663
Dec 17, 2022
Merged

mmcky merged 8 commits into
QuantEcon:masterfrom
Smit-create:i-663

Conversation

@Smit-create

Copy link
Copy Markdown
Member

Fixes #363
#663

@Smit-create
Smit-create requested review from jstac and oyamad December 6, 2022 08:13
@coveralls

coveralls commented Dec 6, 2022 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.04%) to 95.275% when pulling 4bef50a on Smit-create:i-663 into 67f391e on QuantEcon:master.

@jstac jstac mentioned this pull request Dec 6, 2022
1 of 2 tasks
@oyamad

oyamad commented Dec 6, 2022

Copy link
Copy Markdown
Member

Maybe add a note after this?

.. math::
\theta_2 =
\begin{bmatrix}
p & 1 - p \\
1 - q & q \\
\end{bmatrix}
.. math::
\theta_{n+1} =
p
\begin{bmatrix}
\theta_n & 0 \\
0 & 0 \\
\end{bmatrix}
+ (1 - p)
\begin{bmatrix}
0 & \theta_n \\
0 & 0 \\
\end{bmatrix}
+ q
\begin{bmatrix}
0 & 0 \\
\theta_n & 0 \\
\end{bmatrix}
+ (1 - q)
\begin{bmatrix}
0 & 0 \\
0 & \theta_n \\
\end{bmatrix}

Something like "where p = q = (1 + rho) / 2."

@oyamad oyamad left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me!

@jstac

jstac commented Dec 7, 2022

Copy link
Copy Markdown
Contributor

Nice work @Smit-create !

This looks good to me too but please coordinate with @mmcky to make sure the lectures are suitably modified.

@Smit-create

Copy link
Copy Markdown
Member Author

Thanks for the review. Once this is merged, I will quickly start fixing the lecture codes.

@jstac

jstac commented Dec 7, 2022

Copy link
Copy Markdown
Contributor

@Smit-create

Copy link
Copy Markdown
Member Author

@jstac Sure, I'll fix that too.

@mmcky

mmcky commented Dec 7, 2022

Copy link
Copy Markdown
Contributor

Thanks for the review. Once this is merged, I will quickly start fixing the lecture codes.

@Smit-create the best way to go here is to install this branch version on a PR marked do not merge and you can use that for testing. You just need to update the environment.yml file to use the branch version using git+https. I will try and set that up for you later this evening if not sure of the syntax.



def rouwenhorst(n, ybar, sigma, rho):
def rouwenhorst(n, rho, sigma, mu=0.):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Smit-create while it is difficult in this change to preserve backward compatibility, can you add a deprecation notice to the doctoring at the bottom.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks!

@mmcky

mmcky commented Dec 17, 2022

Copy link
Copy Markdown
Contributor

@Smit-create I will merge this into master but we will need lecture PR's tested prior to releasing v0.6.0

@mmcky
mmcky merged commit 0e21854 into QuantEcon:master Dec 17, 2022
@Smit-create
Smit-create deleted the i-663 branch December 17, 2022 04:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify and improve tauchen and rouwenhorst

5 participants