FSF3581 VT25 Computational Methods for Stochastic Differential Equations (60746)

Computational methods for stochastic differential equations and machine learning 2025

 Welcome to the course Computational methods for stochastic differential equations and machine learning (joint SF2525 master level and SF3581 graduate level) 2025

 

Links to an external site.

OMX Stockholm 30 index
OMX Stockholm 30 index för en dag, en måndag och tre år, från Avanza.

Stochastic molecular dynamics of liquid solid phase transition
Stochastic molecular dynamics of liquid-solid phase transition

The classical Spacewar game
The classical Spacewar game, emulated at http://www.masswerk.at/spacewar



The course focuses on the following application areas and mathematical and numerical methods to solve them. In each application we study relevant mathematical and numerical methods to solve the problem. This includes methods and theory for ordinary, partial and stochastic differential equations, and optimal control, treating e.g. weak and strong approximation, Monte Carlo methods, variance reduction, large deviations for rare events, game theory, neural networks.
Applications included are e.g. finance, where stock prices are modelled using SDEs, molecular dynamics, where SDEs are used to model systems with constant temperature, and machine learning  where the basic stochastic gradient descent algorithm is a numerical scheme for perturbed gradient flow. Optimal control theory is used e.g. in optimal hedging,  finding reaction rates in molecular dynamics and analyzing machine learning convergence rates. The course includes computer projects using the machine learning software TensorFlow.
 

Week	 Application                       Subject

3,4,5    stocks with noise                 stochastic differential equations,  
molecular dynamics weak and strong convergence, Ito-calculus
AI Euler's method

6,7,8,9 option price The Feynman-Kac formula,
American options Monte-Carlo Methods, variance reduction
finite difference methods

12,13,14 optimal hedging calculus of variations, optimal control
reaction rates dynamical programming,
Hamilton-Jacobi equations,
large deviations and rare events

15,17,18,19 machine learning game theory, differential games,
AI neural networks,
stochastic gradient descent

20 presentations e.g:
multi-level Monte Carlo, variance reduction,
ground water flow Convection-diffusion equations,
neural networks, AI

Course material and evaluation

- New version of the lecture notes
    

Download lecture notes
- Chapter 6 in
"An Introduction to Mathematical Optimal Control Theory Links to an external site." by L.C. Evans
- papers for the presentations are here 
- course syllabus
- course evaluation, use the code

Teachers

Mattias Sandberg, department of mathematics, msandb@kth.se, office hour.

Anders Szepessy, department of mathematics, szepessy@kth.se , office hour Mondays 12-13.

Emanuel Ström, department of mathematics, emastr@kth.se, office hour . Welcome!

Schedule

Starting Friday January 17th, 13.15-15.00. 
Schedule for lectures Links to an external site.

Preliminary plan, in addition guest a guest lecture, a tensor flow tutorial and a review
Lecture 1: chapter 1-2 Introduction and stochastic integral
Lecture 2: chapter 2, 3.1-3 Stochastic differential equations
Lecture 3: chapter 3.1, 3.4 Ito's formula and Stratonovich integrals
Lecture 4: chapter 4.2 Kolmogorov equations and Black-Scholes equation
Lecture 5: chapter 4.1-2 Black-Scholes equation and Feyman-Kac formula
Lecture 6: chapter 5.1 Option modeling and statistical error
Lecture 6: chapter 5.1-2 Statistical and time discretization errors
Lecture 7: chapter 8.1-3, 9 Optimal control, Hamilton-Jacobi PDE and stochastic control
Lecture 8: chapter 9 Rare events
Lecture 9: chapter 10 Machine learning

Lecture 10: chapter 10 Machine learning
Lecture 11: chapter 10 Machine learning
Lecture 12: unsupervised learning Download unsupervised learning and differential games Download differential games

Lecture 13: stochastic optimization and american options
Lecture 14: stochastic optimization

Homework, Computer Lab's, Presentations and Examination

The Examination consists of three parts: Homework problems, oral presentations and a written exam. The homework problems will be available here on the course www-page and each student hand in their own solution. The presentations are carried out by groups of two students.  The written exam will be based on a list of questions given here Download list of questions given here. The final grade of the course is pass/fail.
The maximal score for the written exam is 60, and to pass the course you must obtain a total score, homework included, of approximately 60. The homework and the presentation gives maximal 40 credits together, with maximal 5 credits for each homework 1,2 , 3,5 and a maximum of 10 credits for the final presentation and homework 4. To pass it is required to to present a project, obtain at least 3 credits on each of the homeworks 1,2,3,5 and at least 6 credits on homework 4, after possible revision.


Homework and dates (preliminary versions)

Homework 1 Download Homework 1 on Ito integrals, due February 10th.
Homework 2 Download Homework 2 on Euler approximations of Ito differential equations, due March 3st.
Homework 3 Download Homework 3 on stochastic volatility, delta and stability, due April 4th.
Homework 4  + code   on UQ and parameter estimation for SDE, due April 17th.
Code for langevin: code,  if you want to compare Langevin and Gibbs. 
Lecture notes from the introductory lecture can be found here, due April 17th.

Homework 5 Download Homework 5 on classifying figures, due May 23th, the codes are in the Canvas "Files", with a direct link here. For Part 2, if you would like to use the 'readMNIST.m' function, this file could be found here.

Homework 6  on machine learning and Tensor Flow, voluntary.

In Homework 4 and 5 you need to use TensorFlow 2. You can use pip to install TensorFlow 2 by following the instructions in this document: Installing_Tensorflow_2.pdf. You can also follow the guiding-page here. Links to an external site.

(Old versions using Tensorflow 1 is here  Download (Homework 4_old  

and Python code Links to an external site.)

SDE-poster project: Choose a paper from the list before April  4th and hand in a poster-pdf-file in the link "Uppgifter", due May 9, to be presented May 19nd. Detailed information is in Section "Presentations" below.

 

 

Presentations

The list of Files includes papers to be used for the presentations.  Each group of two choose a paper here with at most two groups for one paper. The groups present the results in  the scheduled presentation-meeting May 19th at 8.15-12.00 and submits a poster. Probably we have time for five minutes for each presentation this year. You may suggest another paper. Read the literature and study the formulation and motivation of the problem.  Use your knowledge and fantasy to formulate the mathematical modell, the problem you want to solve and an SDE simulation. Try to use the literature to formulate interesting problems. You are welcome to discuss with the teachers.
 
Concerning presentations: Projects are presented by lab groups of two. 
Make a poster and prepare a five minutes presentation. Slides for the presentations can be uploaded in "Uppgifter". A good poster includes at least formulation of the problem and some results and conclusion.  The posters will be posted in this Canvas page. In the KTH-library you can find online the book "Handbook of Writing for the Mathematical Sciences" by Nicholas Higham which include in chapter 12 "Preparing a Poster". If you have not made a poster before, here Links to an external site. is a link to Latex poster templates (and a non fancy version Download non fancy version). 
 
 
 

Stochastic molecular dynamics of liquid solid phase transition
Sample paths of solutions to stochastic differential equation and its probabability density

Notes:

 

 

Links to an external site.