Statistics and dynamics of financial derivatives, M2 ISF App, 2020+

Teacher: Gabriel TURINICI

Content

  • classical portfolio mangement under historical probability measure: optimal portfolio, arbitrage, APT, beta
  • Financial derivatives valuation and risk neutral probability measure
  • Volatility trading
  • Portfolio insurance: stop-loss, options, CPPI, Constant-Mix
  • Hidden or exotic options: EFT, shorts
  • Deep learning and portfolio strategies

Documents

NOTA BENE: All documents are copyrighted, cannot be copied, printed or ditributed in any way without prior WRITTEN consent from the author

Chapter nameTheoretical partImplémentationResults
Classical portfolio management
(historical measure)
slidesPython data: CSV format and PICKLE
Other data : shorter CSV (30/40)
Program: statistical normality tests to fill in
Program: optimal portfolio w/r to random portfolio, backtest to fill in
Full program: here
optimalCAC40 30_p5optimalCAC40 30_p15
optimalCAC40 30_p30
Financial derivatives and risk neutral probabilityBOOK M1 « Mouvement
Brownien et évaluation d’actifs dérivés »
slides: reminders for financial derivatives
Code: Brownian and log-normal scenario generation,
Euler-Maruyama version to correct + MC computation ;
Monte Carlo option price
Codes: price & delta of vanilla call and put options, (log-normal = Black-Scholes) model
Delta hedging : initial code (notebook or python), final version (notebook or python) Bachelier model version
Volatility tradingpdf documentCode: vol trading (another version here)Results
Portfolio insurance:
stop-loss, options,
CPPIs, Constant Mix
slides,
lsections 6.2 of M1 course textbook
Written notes
Youtube CPPI video:
part 1/2, part 2/2
Beta slippage: presentation.
Code: stop loss, CPPI, CPPI v2
Constant-Mix
dataC40
Result stop-loss, CPPI,
constant-mix
Deep learning for option pricingCode to fill in:
python notebook
or
— pure python(rename *.txt to *.py)
Corrected code : python notebook
Toolscode
exemple: download Yahoo! Finance data
Misc:Projet (old version)

Historical note: 2019/21 course name: « Approches déterministes et stochastiques pour la valuation d’options » + .

Statistical Learning, M1 Math 2024+

Instructor: Gabriel TURINICI

Preamble: this course is just but an introduction, in a limited amount of time, to Statistical and Machine learning. This will prepare for the next year’s courses (some of them on my www page cf. « Deep Learning » and « Reinforcement Learning »).


1/ Introduction to statistical learning : supervised, non-supervised and reinforcement learning, general learning procedure, model evaluation, under and overfitting

2/ K-nearest neighbors and the « curse of the dimensionality »

3/ Regression in high dimensions, variable selection and model regularization (ridge, lasso)

4/ Stochastic gradient descent, mini-batch

5/ Neural networks: introduction, operator, datasets, training, examples, implementations

6/ K-means clustering


Main document for the theoretical presentations: (no distribution autoried without WRITTEN consent from the author): see your « teams » group.

Exercices, implementations: see « teams » group.


Analyse numérique: évolution (M1 Math, Université Paris Dauphine – PSL, 2005-11, 2019-2025

Responsable de cours: Gabriel TURINICI
Contenu:
1 Introduction
2 EDO
3 Calcul de dérivée et contrôle
4 EDS
Bibliographie: poly distribué

Documents de support de cours, autres documents

NOTA BENE: Tous des documents sont soumis au droit d’auteur, et ne peuvent pas être distribués sauf accord préalable ÉCRIT de l’auteur.

Supports de cours: livre en anglais « Numerical simulations of time-dependent problems : applied to epidemiology, artificial intelligence and finance »

Implementations TP:

EDO: exo sur la précision, exo stabilité , SIR(EE+H+RK4),  order for the EE/H schemes/SIR

SIR (version controle, adjoint / backward); (version 2023 here)

EDS version 2024 : simulation brownien, calcul intégrale (version 2023 ici)

EDS version 2023 :Euler-Maruyama faible pour Ornstein-Uhlenbeck, Euler-Maruyama (classique) pour Black-Scholes (log normal)

Autres versions précédentes: EDS (v1),  EDS (v2)

Version anciennes

2022/23:

2020/21:

Deep Learning course, 2nd year of Master (ISF App : 2019-25, MATH : 2023-25)

Teacher: Gabriel TURINICI


Summary:
1/ Deep learning : major applications, references, culture
2/ Types: supervised, renforcement, unsupervised
3/ Neural networks: main objects: neurons, operations, loss fonction, optimization, architecture
4/ Stochastic optimization algorithms and convergence proof for SGD
5/ Gradient computation by « back-propagation »
6/ Pure Python implementation of a fully connected sequential network
7/ Convolutional networks (CNN) : filters, layers, architectures. 
8/ Keras implementation of a CNN.
9/ Techniques: regularization, hyper-parameters, particular networks, recurrent (RNN, LSTM); 
10/ Unsupervised Deep learning:  generative AI, GAN, VAE, Stable diffusion.
11/ Keras VAE implementation. “Hugginface” Stable Diffusion.
(12/ If time allows: LLM & NLP: word2vec, Glove (exemples : woman-man + king = queen)


Documents
MAIN document (theory): see your teams channel
(no distribution is authorized without WRITTEN consent from the author)
for back-propagationSGD convergence proof
Implementations
Function approximation by NN : notebook version, Python version
Results (approximation & convergence)

After 5 times more epochs
Official code reference https://doi.org/10.5281/zenodo.7220367
Pure python (no keras, no tensorflow, no Pytorch) implementation (cf. also theoretical doc):
– version « to implement » (with Dense/FC layers) (bd=iris),
– version : solution

If needed: iris dataset here
Implementation : keras/Iris

CNN example: https://www.tensorflow.org/tutorials/images/cnn

Todo : use on MNIST, try to obtain high accuracy on MNIST, CIFAR10.
VAE: latent space visualisation : CVAE – python (rename *.py) , CVAE ipynb version
Stable diffusion:

Working example jan 2025: python version, Notebook version

Old working example 19/1/2024 on Google collab: version : notebook, (here python, rename *.py). ATTENTION the run takes 10 minutes (first time) then is somehow faster (just change the prompt text).

Reinforcement Learning, M2 ISF App, 2021-2024

Instructor: Gabriel TURINICI


1/ Introduction to reinforcement learning
2/ Theoretical formalism: Markov decision processes (MDP), value function ( Belman and Hamilton- Jacobi – Bellman equations) etc.
3/ Common strategies, building from the example of « multi-armed bandit »
4/ Strategies in deep learning: Q-learning and DQN
5/ Strategies in deep learning: SARSA and variants
6/ Strategies in deep learning: Actor-Critic and variants
7/ During the course: various Python and gym/gymnasium implementations
8/ Perspectives.


Principal document for the theoretical presentations: (no distribution autoried without WRITTEN consent from the author)

Multi Armed Bandit codes (MAB) : play MAB, solve MAB , solve MAB v2., policy grad from chatGPT to correct., policy grad corrected.

Bellman iterations: code to correct here, solution code here

Gym: play Frozen Lake (v2023) (version 2022)

Q-Learning : with Frozen Lake, python version or notebook version

-play with gym/Atari-Breakout: python version or notebook version

Deep Q Learning (DQN) : Learn with gym/Atari-Breakout: notebook 2024 and its version with smaller NN and play with result

Policy gradients on Pong adapted from Karpathy python or notebook

You can also load from HERE a converged version (rename as necessary) pg_pong_converged_turinici24

Notebook to use it: here (please send me yours if mean reward above 15!).

version 2023 : python or notebook Old version (2022): python or notebook

Projets : cf. Teams



IA générative et société, M1 gestion, Université Paris Dauphine – PSL, sept 2023

Conférence « IA générative et société », tenue le 21 sept 2023 devant la promo de M1 2023/24, Université Paris – Dauphine PSL, coordinatrice Aurore HAAS.

DOCUMENT PRINCIPAL : les slides en pdf, suivre le lien.

Autres documents :

  • pour les 2 vidéos voir les liens dans le document pdf sinon directement les 2 liens youtube : vidéo 1, vidéo 2
  • pour le GIF utiliser ce lien.

Statistique non-paramétrique (M1 Math 2019-22)

M1 mathématiques appliquées, Université Paris Dauphine -PSL

Responsable: Gabriel TURINICI

Contenu

  • 1 Introduction et rappels
  • 2 Estimation de la fonction de répartition
  • 3 Tests robustes
  • 4 Estimation de densités par estimateurs à noyau
  • 5 Régression non paramétrique  
      Bibliographie: poly distribué

Documents de support de cours, autres documents

NOTA BENE: Tous des documents sont soumis au droit d’auteur, et ne peuvent pas être distribués sauf accord préalable ÉCRIT de l’auteur.


Supports de cours
poly 2021/22, (MaJ=24/01/2022).Poly annoté: à venirnotes manuscrites: à venir

A PARTIR d’ici version ancienne 2020/21

Supports de cours
poly 2020/21,
(dernière mise à jour 6 mai 2021).
Poly annoténotes manuscrites
Cours 1 : sections 1.1-1.2
« Motivation »
vidéo Youtube
Cours 1: section 1.3
« Inégalités »
vidéo Youtube
Cours 1, section 1.4
« Thm. de convergence classique »
vidéo Youtube
Cours 2 :section 1.5
« Rappels espérance conditionnelle »
vidéo Youtube
Cours 2 section 1.6
« Rappel variables symétriques »
vidéo Youtube
Cours 2 section 1.7.1
« Rappels sur les tests paramétriques (1) »
vidéo Youtube


A PARTIR d’ici version ancienne 2019/20

Notes du cours :  poly annoté cours 1et 2 (lien ancien, ne pas utiliser) , cours 3 , cours 3,4  notes manuscrites

corrigé ex 2018: regarder l’exo 3 qui démontre le fait que la convergence des cdf en tout point de continuité est pareil que celle de l’inverse généralisée.

Vidéos des séances de cours pendant confinement printemps 2020: Vidéo youtube sur le test du signe; Vidéo Youtube: test de Wilcoxon, Vidéo Youtube: propriétés des rangs.; Test de Mann-Whitney partie 1/2;    Test de Mann-Whitney partie 2/2, Estimation de densité partie 1/1, Estimation de densité par estimateurs à noyau, vidéo régression non paramétrique, vidéos: régression non paramétrique par polynomes locaux et régression: validation croisée et phénomène d’overfit,



Modèles de taux (M2 ISF App + M2 MASEF, 2019-21)

Responsable: Gabriel TURINICI

Contenu

  • 1 Quelques rappels de calcul stochastique
  • 2 Generalites sur les modeles de taux
  • 3 Produits de taux classiques
  • 4 Le modele LGM
  • 5 Le modele BGM
  • 6 Modele SABR  
  • 7 Modele d’Heston (en fonction du temps)  
  • Bibliographie: poly distribué

Documents de support de cours, autres documents

NOTA BENE: Tous des documents sont soumis au droit d’auteur, et ne peuvent pas être distribués sauf accord préalable ECRIT de l’auteur.

Supports de cours: POLY , attention il s’agit d’une version mise à jour au fur et à mesure (dernière mise à jour: 5/3/2021).

Autres :  poly annoté, notes manuscrites

Partie introductive: poly analyse numérique, regarder chapitre « EDS » pour rappels de calcul sto.

 1_2
Livres / Books

Livres / Books


					

Statistique non-paramétrique (M1 Math P20)

M1 mathématiques appliquées, Université Paris Dauphine -PSL, 2019-2020

Responsable: Gabriel TURINICI

Contenu

1 Introduction et rappels

2 Estimation de la fonction de répartition

3 Tests robustes

4 Estimation de densités par estimateurs à noyau

5 Régression non paramétrique  
  Bibliographie: poly distribué

Documents de support de cours, autres documents

NOTA BENE: Tous des documents sont soumis au droit d’auteur, et ne peuvent pas être distribués sauf accord préalable ECRIT de l’auteur.

Supports de cours

poly distribué, attention il s’agit d’une version mise à jour au fur et à mesure (dernière mise à jour 26/3/20).

Notes du cours :  poly annoté cours 1et 2 (lien ancien, ne pas utiliser) , cours 3 , cours 3,4  notes manuscrites

feuilles de TD: TD1,

corrigé ex 2018: regarder l’exo 3 qui demontre le fait que la convergence des cdf en tout point de continuite est pareil que celle de l’inverse généralisée.

Nouveau (6/5/2020): version poly avec les TD3,TD4


Séances de cours en non-présentiel

(confinement printemps 2020)


Cours

Séance prévue le 27 mars 2020: vidéo youtube ICI

Sinon: utiliser le poly du cours usuel, les notes manuscrites et annotations ci-dessus.


Séance prévue le 2 avril 2020: vidéos youtube ICI (2 vidéos) :

Test de Wilcoxon,

propriétés des rangs.


Séance prévue le 3 avril 2020: vidéos youtube ICI (2 vidéos) :

Test de Mann-Whitney partie 1/2

   Test de Mann-Whitney partie 2/2


Séance prévue le 24 avril 2020: vidéo youtube ICI (1 vidéo):

   Estimation de densité partie 1/1


Séance prévue le 30 avril 2020: début de séance = consultation de la vidéo:

   Estimation de densité par estimateurs à noyau

 Ensuite : questions reunion « teams ».


Séance prévue le 7 mai 2020: début de séance = consultation de la vidéo:régression non paramétrique

Ensuite : questions reunion « teams ».


Séance prévue le 15 mai 2020: début de séance = consultation des vidéos: régression non paramétrique par polynomes locaux,  ET régression: validation croisée et phénomène d’overfit,

Ensuite : questions reunion « teams ».


EXAMEN

Examen le 28/5 2020 à 14H00 (1H d’examen): conectez vous sur MYCOURSE. Il s’agit d’un QCM à remplir en ligne (PAS d’envoi par email, il ne sera pas noté).