파일:Phase diagram of the Ramsey model.svg
이 파일은 위키미디어 공용에 있으며, 다른 프로젝트에서 사용하고 있을 가능성이 있습니다. 해당 파일에 대한 설명이 아래에 나와 있습니다.
파일 설명
| 설명Phase diagram of the Ramsey model.svg |
English: Model based on Advanced Macroeconomics: An Easy Guide (Campante et al 2021), chapter 3.
Notation: k = capital (stock) per capita c = consumption (flow) per capita n = population growth rate δ = capital depreciation rate ρ = utility discounting rate We have the dynamics in $(k, c)$ space: $$\begin{cases} \dot k = f(k) - c - (n+\delta)k\\ \dot c= (f'(k) - (\delta + \rho))\sigma c \end{cases}$$ with initial conditions $$k(0) = k(0), \quad c(0) = u'^{-1}(\lambda(0))$$ and transversality condition $$\lim_t (ku'(c) e^{(n-\rho) t} )= 0$$ Here, $\sigma$ is the "elasticity of intertemporal substitution in consumption". $$\sigma(c) := - \frac {u'(c)}{u(c)c} > 0$$ In particular, if we let $u(c) = \ln c$, then $\sigma(c) = 1$, a constant. Now plot the diagram with Julia: ```julia using CairoMakie, LinearAlgebra
n, δ, ρ = 1, 1, 0.5
σ = 1
f(k) = √k df(k) = 1/(2√k) invdf(y) = 1/(4 * y^2)
dotkc(k, c) = [f(k)-c-(n + δ)k (df(k)-(δ + ρ)) * σ * c]
dotc0(c) = invdf(δ + ρ)
dotk0(k) = f(k) - (n + δ) * k using Roots invdotk0 = find_zero(dotk0, (0.1, 0.3), Roots.A42()); function plotRamsey(x, y) xs = repeat(x, outer=length(y)) ys = repeat(y, inner=length(x)) xlims!(minimum(x), maximum(x)) ylims!(minimum(y), maximum(y)) # the ̇c=0 curve lines!(dotc0.(y), y, color=:black) # the ̇k=0 curve lines!(x, dotk0.(x), color=:blue) # the equilibrium point scatter!([dotc0(0)],[dotk0(dotc0(0))], color=:black) scatter!([invdotk0],[0], color=:red) # the flow vector field vectors = dotkc.(xs, ys) norms = vec(norm.(vectors)) scaled_norms = tanh.(norms)/10 us = map((x) -> x[1], vectors) vs = map((x) -> x[2], vectors) us ./= norms vs ./= norms us .*= scaled_norms vs .*= scaled_norms arrows!(xs, ys, us, vs, arrowsize = 6, linecolor=scaled_norms, arrowcolor = :black) end
width, height = 1400, 2000 scene = Figure(resolution = (width, height)) fsize = 30 Axis(scene[1:2,1:2], backgroundcolor = "white", xlabel = L"$k$", xlabelsize=fsize,
ylabel = L"$c$", ylabelsize=fsize,
title = L"Ramsey model with $f(k) = \sqrt{k}$, and $n, δ, ρ, σ = %$(n, δ, ρ, σ)$", titlesize=fsize)
xmin, xmax, xres = 0.0001, 0.3, 51 ymin, ymax, yres = -0.02, 0.15, 51 x = range(start = xmin, stop = xmax, length = xres) y = range(start = ymin, stop = ymax, length = yres) plotRamsey(x, y)
Axis(scene[3,1], backgroundcolor = "white", xlabel = L"$k$", xlabelsize=fsize, ylabel = L"$c$", ylabelsize=fsize, title = L"interior equilibrium at $k, c = %$(round(dotc0(0), sigdigits=2)), %$(round(dotk0(dotc0(0)), sigdigits=2))$", titlesize=fsize) ϵ = 0.01 xmin, xmax, xres = dotc0(0)-ϵ, dotc0(0)+ϵ, 31 ymin, ymax, yres = dotk0(dotc0(0))-ϵ, dotk0(dotc0(0))+ϵ, 31 scatter!([dotc0(0)],[dotk0(dotc0(0))], color=:black) x = range(start = xmin, stop = xmax, length = xres) y = range(start = ymin, stop = ymax, length = yres) plotRamsey(x, y)
Axis(scene[3,2], backgroundcolor = "white", xlabel = L"$k$", xlabelsize=fsize, ylabel = L"$c$", ylabelsize=fsize, title = L"all-saving equilibrium at $k = %$(round(invdotk0, sigdigits=2))$", titlesize=fsize) ϵ = 0.01 xmin, xmax, xres = invdotk0-ϵ, invdotk0+ϵ, 31 ymin, ymax, yres = -ϵ, +ϵ, 31 x = range(start = xmin, stop = xmax, length = xres) y = range(start = ymin, stop = ymax, length = yres) plotRamsey(x, y)
scene
|
| 날짜 | |
| 출처 | 자작 |
| 저자 | Cosmia Nebula |
라이선스
- 이용자는 다음의 권리를 갖습니다:
- 공유 및 이용 – 저작물의 복제, 배포, 전시, 공연 및 공중송신
- 개작 – 저작물의 개작, 수정, 2차적저작물 창작
- 다음과 같은 조건을 따라야 합니다:
- 저작자표시 – 적절한 저작자 표시를 제공하고, 라이선스에 대한 링크를 제공하고, 변경사항이 있는지를 표시해야 합니다. 당신은 합리적인 방식으로 표시할 수 있지만, 어떤 방식으로든 사용권 허가자가 당신 또는 당신의 사용을 지지하는 방식으로 표시할 수 없습니다.
- 동일조건변경허락 – 만약 당신이 이 저작물을 개작 또는 변형하거나 이 저작물을 기반으로 제작하는 경우, 당신은 당신의 기여물을 원저작물과 동일하거나 호환 가능한 라이선스에 따라 배포하여야 합니다.
설명
이 파일에 묘사된 항목
다음을 묘사함
위키데이터 항목 없는 어떤 값
7 1 2023
파일 역사
날짜/시간 링크를 클릭하면 해당 시간의 파일을 볼 수 있습니다.
| 날짜/시간 | 섬네일 | 크기 | 사용자 | 설명 | |
|---|---|---|---|---|---|
| 현재 | 2023년 1월 8일 (일) 16:12 | 1,313 × 1,875 (2.14 MB) | wikimediacommons>Cosmia Nebula | fix caption |
이 파일을 사용하는 문서
이 파일을 사용하는 문서가 없습니다.