Question: N tf . constant ( 2 0 1 . 0 ) # Number of steps to split tf . constant ( T ( N -

N tf.constant(201.0) # Number of steps to split tf.constant(T (N-1)) N_int tf.cast(N, dtypetf.dtypes.int32) Tranform the constant N into an int32 type. t tf.linspace (0.0, T, Nint) #Simulating the normal shocks tf.random.normal (shape N_int 1, mean=0.stddev=1., dtypetf.dtypes.float32) tf.constant (0.0, shape[We need to pass the shape here to avoid an error when concate nating and . z=tf.concat([z theta,z],axis= theta) Construct the Brownian Motions k/L=tf.math.cumsum(z)*tf.sgrt(dt) TO BE FILLED St=tf.math.exp(lnSt) St What should I replace TO BE FILLED with to get the desire result ? tf.math.log (Wt ) S0+(r-sigma^**2/2)^* t+sigma^* Wt; f.math.log(S0)+(r-sigma^**2/2)^* t+sigma^* Wt; S0^* tf.exp((r-sigma^**2/2)^* t+sigma*Wt)

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 Databases Questions!