y0 = 300000
P = 1439;
r = 0.04/12;

y = zeros(1,360);

y(1) = (1+r)*y0-P;
for j = 2:360
    y(j) = (1+r)*y(j-1)-P;
end

stem(y);