Skip to content
Advertisement

How can I find the value of kt+1 for periods t=1…50?

I know that: kt+1= (1−δ)kt + s * kθt s=0.08, δ=0.3, θ= 0.35, k0=2.5

I wrote this:

(δ,s,θ) = (0.08,0.3,0.35)
k=2.5
K = (1-δ)*k+s*k**θ
print (K)

I want to calculate the value of k for periods 1,…,50 Of course, the result of my code is only for k1. Can you help me understand how I can find the values up to k50?

Advertisement

Answer

You can calculate it with a simple loop like this:

δ, s, θ = 0.08, 0.3, 0.35
k = [2.5]
for _ in range(50):
    k.append((1-δ)*k[-1]+s*k[-1]**θ)
print(k)
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement