Zins
import numpy as np
import matplotlib.pyplot as plt
# Parameter
x0 = 1000000 # Anfangskapital
t_end = 30 # Jahre
s1 = 0.01 # Zinssatz
x1 = np.zeros(t_end+1)
x1[0] = x0
for i in range(0, t_end):
x1[i+1] = (1 - s1) * x1[i]
s2 = 0.05 # Zinssatz
x2 = np.zeros(t_end+1)
x2[0] = x0
for i in range(0, t_end):
x2[i+1] = (1 - s2) * x2[i]
s3 = 0.12 # Zinssatz
x3 = np.zeros(t_end+1)
x3[0] = x0
for i in range(0, t_end):
x3[i+1] = (1 - s3) * x3[i]
# Plot
plt.figure(figsize=(8, 5))
plt.plot(range(t_end+1), x1, label="1% Steuer X1", color="blue")
plt.plot(range(t_end+1), x2, label="5% Steuer X2", color="red")
plt.plot(range(t_end+1), x3, label="12% Steuer X3", color="green")
# Legende aktivieren
plt.legend()
plt.title("Vermögenssteuer (x=1000000, t=30)")
plt.xlabel("Jahre")
plt.ylabel("Vermoegen")
plt.grid(True)
plt.show()