|
From: jian Xu <jia...@gm...> - 2021-12-06 20:06:09
|
Hi, YieldTermStructure has a function discount() to return the discount factor on a single date. But is there a function to return an array of discount factors on an array of dates? Currently, I'm looping in python disc = np.array([disc_curve.discount(d) for d in dates]) But the python loops are pretty slow. Just wondering if there's any faster way to do this. Thanks a lot! Jian |