## How to run sklearn’s GridSearchCV with Tensorflow keras models.

To find optimal parameters for Neural network one would usually use RandomizedSearchCV or GridSearchCV from sklearn library. Tensorflow keras models, such as KerasClassifier, when calling fit() function does not permit to have different number of neurons. GridSearchCV and RandomizedSearchCV call

Posted in machine learning Tagged with: ,

## simple example simulation of delta hedging with python

Here we will present simple python code of delta hedging example of a call option . it’s a minimal example with zero interest rates , no dividends. On day 1 we sell 10 near ATM call options and start delta

## python and derivatives pricing tutorial – brownian motion

In pricing models (black-scholes, local vol, libor market model) the source of uncertainty is Brownian motion. how to simulate it in python? python download first, lets simulate dWt , we know it’s a gaussian variable with mean 0 and deviation

Posted in quant finance coding course

## python and derivatives pricing tutorial Tutorial objective: write and understand simple minimal programs in python for pricing financial derivatives topics: Brownian motion objective: draw and calculate properties of brownian motion using python Black scholes pricing objective: calculate call option price Heston model objective: draw forward

## How to prepare for quantitative finance intervew

If you apply for quant analyst/quant developer job at investment bank/ hedge fund your quantitative finance interview will generally consist of 4 parts: Programming (C++,python,data structures) General probability/calculus questions Stochastic calculus Derivatives pricing questions for asset class (equity derivatives,interest rate

Posted in OTC derivatives valuation Tagged with: , , ,

## PCA simple example (principle component analisys)

simple examples of what PCA does with 2D set of points: ellipsoid like set of points: upper graph is original set of points red vectors are PCA components scaled by explained variance buttom graph is transformed set of points so

Posted in math Tagged with: ,

## Libor in arrears convexity adjustment simple example

simplified Libor in arrears payoff: pay at time 1 1-year Libor reset at time 1 F(1) where is measure with numeraire change measure from time 0 to time 1 (time while F(t) is changing) with girsanov formula : so we

Posted in OTC derivatives valuation Tagged with:

## set up global include and lib dirs in visual studio 2012

1) open any projectgo to View->Property Manager 2) pick up any project and choose DEBUG/RELEASE wi32/win64 configuration -> Microsoft.Cpp.Win32.user file choose VC++ directories and add desired Include and Lib dirs to appropriate section (in this case boost dirs) Microsoft.Cpp.Win32.user configuration

Posted in quantlib Tagged with:

## Hedge accounting

Hedge accounting for Corporates IFRS 13 defines the standards for fair-value measurements of derivatives used in hedge accounting. From 1 jan 2013 fair-value calculations must include Credit Valuation Adjustments (CVA and DVA valuations adjustments) to account for nonperformance risk. IFRS

Posted in hedge accounting Tagged with:

## amortizing interest rate swap valuation example quantib python

Example of valuation of amortizing interest rate swap in Python with quantlib module for quantlib excel version see Amortizing interest rate swap valuation excel quantlib addin First , Install QuantLib package for python (use guide here ) to run the

Posted in quantlib Tagged with: ,