jv.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:QuantEcon.lectures.code 作者: QuantEcon 项目源码 文件源码
def __init__(self, A=1.4, ?=0.6, ?=0.96, grid_size=50,
                 G=None, ?=np.sqrt, F=stats.beta(2, 2)):
        self.A, self.?, self.? = A, ?, ?

        # === set defaults for G, ? and F === #
        self.G = G if G is not None else lambda x, ?: A * (x * ?)**?
        self.? = ?
        self.F = F

        # === Set up grid over the state space for DP === #
        # Max of grid is the max of a large quantile value for F and the
        # fixed point y = G(y, 1).
        grid_max = max(A**(1 / (1 - ?)), self.F.ppf(1 - ?))
        self.x_grid = np.linspace(?, grid_max, grid_size)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号