GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

Consider the following stock price simulation using TensorFl…

Consider the following stock price simulation using TensorFlow. import tensorflow as tf tf.random.set_seed(0) # Stock parameters r = tf.constant(0.01) sigma = tf.constant(0.3) S0 = tf.constant(100.0) K = tf.constant(100.0) # Time discretization T = tf.constant(1.0) N = tf.constant(201.0) # Number of steps to split T dt = tf.constant(T / (N – 1)) N_int = tf.cast(N, dtype=tf.dtypes.int32) # Tranform the constant N into an int32 type. t = tf.linspace(0.0, T, N_int) # Simulating the normal shocks z = tf.random.normal(shape=[N_int – 1], mean=0., stddev=1., dtype=tf.dtypes.float32) z0 = tf.constant(0.0, shape=[1]) # We need to pass the shape here to avoid an error when concatenating z0 and z. z = tf.concat([z0, z], axis=0) # Construct the Brownian Motions Wt = tf.math.cumsum(z) * tf.sqrt(dt) lnSt = TO BE FILLED St = tf.math.exp(lnSt) StWhat should I replace TO BE FILLED with to get the desire result?

Read Details

1.1 Watter SVE sal die beste wees as video-redigering gedo…

1.1 Watter SVE sal die beste wees as video-redigering gedoen moet word? (1)

Read Details

If a person is dying, the CNA should ask if they would like…

If a person is dying, the CNA should ask if they would like to donate their organs.

Read Details

The Texas Revolution began as a movement for Texas’s indepen…

The Texas Revolution began as a movement for Texas’s independence from Mexico as soon as Santa Anna took over as dictator

Read Details

What is the approximate value of the following expression if…

What is the approximate value of the following expression if you implement it in Python?

Read Details

Mr. Large is ambulatory and alert. You need to get his weigh…

Mr. Large is ambulatory and alert. You need to get his weight you should:

Read Details

4.4 Oor hoeveel stoorplek beskik hierdie rekenaar? Tik jou…

4.4 Oor hoeveel stoorplek beskik hierdie rekenaar? Tik jou antwoord in die gegewe spasie in.  (Tik slegs die nommer in.) (1)

Read Details

Bowel training is aimed at:

Bowel training is aimed at:

Read Details

QUESTION 10 10.1 Complete the statement: “The interior…

QUESTION 10 10.1 Complete the statement: “The interior angles of a triangle sum to …” (1) 10.2  The diagram shows an isosceles triangle ABC. Right-click on the blue button to open the diagram in a new tab. Find the size of the angle marked (4)   TOTAL QUESTION 10 [5]

Read Details

What is the result of the matrix multiplication

What is the result of the matrix multiplication

Read Details

Posts pagination

Newer posts 1 … 52,741 52,742 52,743 52,744 52,745 … 72,648 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top