Question: 2. Write a script that takes those parameters and generates 10 stochastic scenarios for short term interest rates r(n, t; ), where n = 1,

2. Write a script that takes those parameters and
2. Write a script that takes those parameters and generates 10 stochastic scenarios for short term interest rates r(n, t; ), where n = 1, ...,10 and t; = dt, 2dt, ..., Idt, 1 = [term (in years) using the discreet form of the Vasicek dt model. [See Slide 15 of Deck "TermStructureModels.pdf".] Note that o The vale r0 = 0.06 serves as initial value for all the scenarios. dt = At [See Page 15 of Deck "TermStructureModels.pdf".] o For every scenario n and iteration i, the random number w(n, t;) is from the standard normal distribution N(0,1). It is expected to be calculated by i. First generating a random number xRnd from the interval (0,1) and then ii. Applying the inverse of the cumulative standard normal distribution function @-1 to xRnd. L.e., w(n, t;) = 4-1(xRnd(n, i)). iii. Python 3 features several methods for generating a random number and implementing -1, you can use any of them

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!