Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions