[SOLVED] IT def MC_sigma_under_Q(S0, r, sigma0, rho, a, mt, T, dt):

$25

File Name: IT_def_MC_sigma_under_Q(S0,_r,_sigma0,_rho,_a,_mt,_T,_dt):.zip
File Size: 546.36 KB

5/5 - (1 vote)

def MC_sigma_under_Q(S0, r, sigma0, rho, a, mt, T, dt):

# Generate random Brownian Motion
P = np.array([[1, rho], [rho,1]])

Copyright By Assignmentchef assignmentchef

length = int(T*n_steps)
MU= np.array([0, 0])
COV = np.matrix([[1, rho], [rho, 1]])
W = np.random.multivariate_normal(MU, COV, (length, length)).T
W_S = W[0]
W_v = W[1]

# Generate paths
sigmat = np.zeros([length, length+1])
sigmat[:,0] = sigma0
St = np.zeros([length, length+1])
St[:,0] = S0

for t in range(1,length):
if t CS : assignmentchef QQ: 1823890830 Email: [email protected]

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] IT def MC_sigma_under_Q(S0, r, sigma0, rho, a, mt, T, dt):
$25