Outline

Who is this talk primarily for?

Those of you who:

Things that we will need:

Things that will be helpful but not necessary:

https://stack-demo.maths.ed.ac.uk/demo/question/type/stack/doc/doc.php/Authoring/Authoring_quick_start.md

What are we going to do?

Longish exercise (Itô’s Lemma) in a general case

Itô‘s Lemma: Given an Itô process \(\{X_t\}\), \(dX_t=a(X_t,t) dt+ b(X_t,t) dZ_t\), where \(\{Z_t\}\) is the Wiener Process, \(a(\cdot,\cdot)\) and \(b(\cdot,\cdot)\) are functions of two variables satisfying some regularity conditions, the ’new’ Itô process \(\{G_t\}\), \(G_t=G(X_t,t)\), satisfies the following stochastic differential equation

\[ dG_t=\left( \frac{\partial G}{\partial X_t}a(X_t,t) + \frac{\partial G}{\partial t}+ \frac{1}{2} \frac{\partial^2 G}{\partial X_t^2} [b(X_t,t)]^2 \right) dt+ \frac{\partial G}{\partial X_t} b(X_t,t) dZ_t \]

To apply this lemma we need to know how to:

  1. Identify functions \(a(\cdot,\cdot)\) and \(b(\cdot,\cdot)\) in a given stochastic differential equation.

  2. Find partial derivatives \(\frac{\partial G}{\partial X_t}\), \(\frac{\partial^2 G}{\partial X_t^2}\), \(\frac{\partial G}{\partial t}\)

  3. Plug-in the elements from parts 1. and 2. into the formula from the lemma and then simplify the expression.

Longish exercise (Itô’s Lemma) in a specific case

Let \(\{S_t\}\) be an Itô process satisfying the following stochastic differential equation

\[ dS_t=\mu S_tdt+\sigma S_tdZt \] where \(\mu\) and \(\sigma\) are constants. (\(\{S_t\}\) is called Geometric Brownian Motion.)

Apply Itô’s Lemma to derive a stochastic differential equation for the process \(\{G_t\}\), where

\[ G_t=G(S_t,t)=S_t^2 \]

a) Label the answer boxes 1-14 (on a piece of paper)

b) Code it in MAXIMA (screen-shot from MAXIMA)

c) ‘Code’ it as a STACK question on Moodle (screen-shot from Moodle)

  • In STACK’s \(\fbox{Question variables}\) we insert MAXIMA code

  • In STACK’s \(\fbox{Question text}\) we insert:
Let \(\{{@var@}\}\) be an Itô process satisfying the following stochastic differential equation

\[d{@var@}={@driftpar@}{@var@}dt+{@diffusionpar@}{@var@}dZ_t,\]

where \({@driftpar@}\) and \({@diffusionpar@}\) are constants.
Apply Itô's Lemma to derive a stochastic differential equation for the process \(\{G_t\}\), where

\[
G_t=G({@var@},t)={@GG@}
\]

Follow the steps below.

We have

\(a({@var@},t)=\) [[input:ans1]] [[validation:ans1]] [[feedback:prt1]]

\(b({@var@},t)=\) [[input:ans2]] [[validation:ans2]] [[feedback:prt2]]

\(\frac{\partial G}{\partial {@var@}}=\) [[input:ans3]] [[validation:ans3]] [[feedback:prt3]]

\(\frac{\partial^2 G}{\partial {@var@}^2}=\) [[input:ans4]] [[validation:ans4]] [[feedback:prt4]]

\(\frac{\partial G}{\partial t}=\) [[input:ans5]] [[validation:ans5]] [[feedback:prt5]]


Hence

\(dG_t=(\) [[input:ans6]][[validation:ans6]][[feedback:prt6]] \(\cdot \) [[input:ans7]][[validation:ans7]][[feedback:prt7]] \(+\) [[input:ans8]][[validation:ans8]][[feedback:prt8]]\(+\frac{1}{2}\cdot\) [[input:ans9]][[validation:ans9]][[feedback:prt9]] \(\cdot [\) [[input:ans10]][[validation:ans10]][[feedback:prt10]] \(]^2\) \(\left . \right)dt\)

\( +\) [[input:ans11]][[validation:ans11]][[feedback:prt11]] \(\cdot \) [[input:ans12]][[validation:ans12]][[feedback:prt12]]\(dZ_t \)

And finally, making the substitution \(G_t={@GG@}\), we obtain

\(dG_t = \) [[input:ans13]][[validation:ans13]][[feedback:prt13]] \(dt + \) [[input:ans14]][[validation:ans14]][[feedback:prt14]] \(dZ_t\)
  • In STACK’s \(\fbox{Potential response tree:}\) for parts 6-12 we use two modes.

d) Randomize its sub-parts/elements (MAXIMA code/\(\fbox{Question variables}\), nothing else needs to be changed in STACK)

var: rand([S_t,U_t,V_t,Y_t]);/*BEFORE var: S_t*/;
driftdiffusionpar: rand([[mu,sigma],[m,s],[a,b],[e,f]]); /*BEFORE driftdiffusionpar: [mu,sigma];*/
driftpar: driftdiffusionpar[1];
diffusionpar: driftdiffusionpar[2];
aa: driftpar*var;
bb: diffusionpar*var;
pp: rand([-5,-4,-3,-2,2,3,4,5]);/*BEFORE pp: 2;*/
GG: var^pp;
GX1: diff(GG,var,1);
GX2: diff(GG,var,2);
Gt: diff(GG,t,1);
driftfinal: factor(subst(GG=G_t,GX1*aa+Gt+GX2*bb^2/2));
diffusionfinal: factor(subst(GG=G_t,GX1*bb));

e) Refine and finish

  • In STACK’s \(\fbox{Input}\) for parts 6-12 possibly disable \(\fbox{Show the validation}\)

  • The usual things…

  • For a Moodle quiz, one can add ‘warm-up’ questions for practicing with:

    1. Identify functions \(a(\cdot,\cdot)\) and \(b(\cdot,\cdot)\) in a given stochastic differential
      equation.

    2. Find partial derivatives \(\frac{\partial G}{\partial X_t}\), \(\frac{\partial^2 G}{\partial X_t^2}\), \(\frac{\partial G}{\partial t}\)

    Please, visit the corresponding paragraph on EAMS2022 Moodle page under ‘Software demos’.

What are your suggestions/comments/questions?