This is a assortment of Jupyter notebooks dependent on diverse subject areas in the location of quantitative finance.

### Is this a tutorial?

Nearly! 🙂

This is just a collection of topics and algorithms that in my view are fascinating.

It consists of numerous topics that are not so popular these days, but that can be very impressive.

Ordinarily, topics these types of as PDE strategies, Lévy procedures, Fourier techniques or Kalman filter are not really well known amid practitioners, who prefers to perform with additional regular resources.

The intention of these notebooks is to current these interesting subject areas, by exhibiting their sensible application by means of an interactive python implementation.

### Who are these notebooks for?

Not for complete beginners.

These matters involve a essential knowledge in stochastic calculus, economic mathematics and stats. A standard knowledge of python programming is also needed.

In these notebooks I will not describe what is a simply call option, or what is a stochastic system, or a partial differential equation.

Having said that, each and every time I will introduce a notion, I will also insert a link to the corresponding wiki web page or to a reference guide.

In this way, the reader will be ready to straight away comprehend what I am conversing about.

These notes are for college students in science, economics or finance who have adopted at minimum 1 undergraduate course in monetary arithmetic and data.

Self-taught pupils or practicioners should really have read at the very least an introductiory guides in financial mathematics.

### Why is it value to read these notes?

Initially of all, this is not a reserve!

Each individual notebook is (virtually) impartial from the many others. For that reason you can pick out only the notebook you are intrigued in!

`-Each notebook, has python code all set to use! `

It is not quick to uncover on internet illustrations of financial products applied in python which are all set to use and properly documented.

I assume that beginners in quantitative finance will locate these notebooks quite practical!

In addition, Jupyter notebooks are interactive i.e. you can operate the code inside the notebook.

This is most likely the ideal way to examine!

If you open a notebook with Github or NBviewer, occasionally mathematical formulas are not displayed appropriately.

For this reason, I advise you to clone/download the repository.

### Is this collection of notebooks comprehensive?

**No!**

I will add extra notebooks from time to time.

At the second, I’m fascinated in the regions of stochastic processes, Kalman Filter, studies and a lot more. I will include more fascinating notebooks on these matters in the potential.

If you have any kind of queries, or if you locate some glitches, or you have solutions for enhancements, experience free to contact me.

This is my linkedin site.

### Contents

1.one)**Black-Scholes numerical techniques**nbviewer*(lognormal distribution, transform of measure, Monte Carlo, Binomial system)*.

one.two)**SDE simulation and statistics**nbviewer

*(paths generation, Self esteem intervals, Hypothesys tests, Geometric Brownian movement, Cox-Ingersoll-Ross process, Euler Maruyama approach, parameters estimation)*

1.3)**Fourier inversion approaches**nbviewer

*(derivation of inversion formulation, numerical inversion, alternative pricing)*

1.four)**SDE, Heston product**nbviewer

*(correlated Brownian motions, Heston paths, Heston distribution, characteristic functionality, solution pricing)*

1.5)**SDE, Lévy procedures**nbviewer

*(Merton, Variance Gamma, NIG, route era, parameter estimation)*

two.1)**The Black-Scholes PDE**nbviewer

*(PDE discretization, Implicit process, sparse matrix tutorial)*

two.two)**Unique options**nbviewer

*(Binary alternatives, Barrier alternatives)*

2.three)**American alternatives**nbviewer

*(PDE, Binomial strategy, Longstaff-Schwartz)*

3.1)**Merton Bounce-Diffusion PIDE**nbviewer

*(Implicit-Explicit discretization, discrete convolution, design limits, Monte Carlo, Fourier inversion, semi-shut formula )*

3.two)**Variance Gamma PIDE**nbviewer

*(approximated jump-diffusion PIDE, Monte Carlo, Fourier inversion, Comparison with Black-Scholes)*

three.3)**Standard Inverse Gaussian PIDE**nbviewer

*(approximated leap-diffusion PIDE, Monte Carlo, Fourier inversion, properties of the Lévy evaluate)*

4.1)**Pricing with transaction charges**nbviewer

*(Davis-Panas-Zariphopoulou model, singular handle issue, HJB variational inequality, indifference pricing, binomial tree, performances)*

five.1)**Linear regression and Kalman filter**nbviewer

*(market information cleansing, Linear regression procedures, Kalman filter layout, option of parameters)*

A.one)**Appendix: Linear equations**nbviewer

*(LU, Jacobi, Gauss-Seidel, SOR, Thomas)*

A.2)**Appendix: Code optimization**nbviewer

*(cython, C code)*

A.three)**Appendix: Assessment of Lévy processes principle**github

*(fundamental and crucial definitions, derivation of the pricing PIDE)*

## How to operate the notebooks

You have two selections:

- Install docker adhering to the guidance in put in backlink

At this issue, you just have to have to operate the script`docker_commence_notebook.py`

and you are performed.

This script will download the information-science docker graphic scipy-notebook, that will be utilized just about every time you operate the script (the script will take about 10-15 minutes to obtain the impression, ONLY the initial time). You can also down load a diverse image by modifying the script. For a listing of illustrations or photos see in this article.

- Clone the repository and open up the notebooks applying
`jupyter-notebook`

.

If you are working with an outdated edition of python there can be compatibility difficulties.

`-Cython code desires to be compiled!`

If you are working with the details science image, you can open the shell in the notebooks directory, and run the script

python docker_commence_notebook.py

after that, duplicate-paste the pursuing code into the shell:

dockerexec-it Numeric_Finance bash cdperform/functions/cython python set up.py create_ext --inplace exit

(`Numeric_Finance`

is the name of the docker container)

If you are not using docker, just copy in the shell the adhering to:

```
cdfunctions/cython
python setup.py construct_ext --inplace
```