这个是个累积存活率,随着时间增加一直减少
违约时间函数是 违约概率函数的逆函数
given a uniform random variable ũ , the default time is p^-1(ũ ).
p^-1 是逆函数,inverse
figure(figsize=[10, 6])
ts = np.arange(0, 30, .01)
h = .1
p = np.exp(-h*ts)
plot(ts, p)
xlabel('Time (Y)', fontsize=16)
ylabel('Suvival Prob', fontsize=16)
u = .1
t = -np.log(u)/h
# 23.025850929940454 时刻的生存率为0.1
plot([0, t], [u, u], 'r')
plot([t, t], [0, u], 'r')
plot(t, u, 'o');
u = .8
t1 = -np.log(u)/h
# 2.231435513142097 时刻的存活率是0.8
plot([0, t1], [u, u], 'k')
plot([t1, t1], [0, u], 'k')
plot(t1, u, 'o');
legend(['Survival Prob $p(t)$']);
网友评论