Python

Calibration of Stoch Vol Jump Model via Numerical Integration

Posted on

# Calibration of Jump-Diffusion Part of BCC97 #Calibration of Stoch Vol Jump Model to EURO STOXX Option Quotes via Numerical Integration # Bakshi, Cao and Chen (1997) #Data Source: www.eurexchange.com # import sys sys.path.append(’09_gmm’) import math import numpy as np np.set_printoptions(suppress=True, formatter={‘all’: lambda x: ‘%5.3f’ % x}) import pandas as pd from scipy.optimize import brute, […]

Python

Calibration of Stoch Vol Jump Model via Numerical Integration Comp Model

Posted on

# Calibration of Complete Model of BCC97 # Calibration of Stoch Vol Jump Model to EURO STOXX Option Quotes via Numerical Integration # Data Source: www.eurexchange.com # Bakshi, Cao and Chen (1997) # import sys sys.path.append(’09_gmm’) import math import numpy as np np.set_printoptions(suppress=True, formatter={‘all’: lambda x: ‘%5.3f’ % x}) import pandas as pd from scipy.optimize […]

Python

Calibration of Stoch Vol Jump Model to Implied Volatilities via Numerical Integration

Posted on

#Calibration of BCC97 Model to Implied Volatilities # Calibration of Bakshi, Cao and Chen (1997) # Stoch Vol Jump Model to EURO STOXX Option Quotes # Data Source: www.eurexchange.com # via Numerical Integration # import sys sys.path.append(’09_gmm’) import math import numpy as np np.set_printoptions(suppress=True, formatter={‘all’: lambda x: ‘%5.3f’ % x}) import pandas as pd from […]

Python

Calibration of Heston93 Stochastic Volatility Model

Posted on

# Calibration of H93 Stochastic Volatility Model # Calibration of Stoch Vol Jump Model to EURO STOXX Option Quotes via Numerical Integration #Bakshi, Cao and Chen (1997) # Data Source: www.eurexchange.com import sys sys.path.append(’09_gmm’) import math import numpy as np np.set_printoptions(suppress=True, formatter={‘all’: lambda x: ‘%5.3f’ % x}) import pandas as pd from scipy.optimize import brute, […]

Python

Calibration of European Call Options Jump Diffusion Model to three maturities via FFT

Posted on

# Calibration of Merton’s (1976) # Jump Diffusion Model # via Fast Fourier Transform # import math import numpy as np np.set_printoptions(suppress=True, formatter={‘all’: lambda x: ‘%5.3f’ % x}) import pandas as pd import scipy.optimize as sop import matplotlib.pyplot as plt import matplotlib as mpl mpl.rcParams[‘font.family’] = ‘serif’ from M76_valuation_FFT import M76_value_call_FFT # # Market Data […]

Python

Calibration of European Call Options Jump Diffusion Model to Short Maturity Data via FFT

Posted on

# Calibration of Merton’s (1976) # Jump Diffusion Model # to Short Maturity Data # import math import numpy as np np.set_printoptions(suppress=True, formatter={‘all’: lambda x: ‘%5.3f’ % x}) import pandas as pd import scipy.optimize as sop import matplotlib.pyplot as plt import matplotlib as mpl mpl.rcParams[‘font.family’] = ‘serif’ from M76_valuation_FFT import M76_value_call_FFT # # Market Data […]

Python

Calibration of CIR85 model to Euribor Rates

Posted on

# # Calibration of CIR85 model to Euribor Rates # # import sys sys.path.append(’10_mcs’) import math import numpy as np np.set_printoptions(suppress=True, formatter={‘all’: lambda x: ‘%7.6f’ % x}) import matplotlib.pyplot as plt import matplotlib as mpl mpl.rcParams[‘font.family’] = ‘serif’ import scipy.interpolate as sci from scipy.optimize import fmin from CIR_zcb_valuation_gen import B # # Market Data: Eonia […]

Python

BSM Implied Volatilities of Call Option

Posted on

# Black-Scholes-Merton Implied Volatilities of # Call Options on the EURO STOXX 50 # Option Quotes from 30. September 2014 # Source: www.eurexchange.com, www.stoxx.com # import numpy as np import pandas as pd from BSM_imp_vol import call_option import matplotlib as mpl import matplotlib.pyplot as plt mpl.rcParams[‘font.family’] = ‘serif’ # Pricing Data pdate = pd.Timestamp(’30-09-2014′) # […]

Python

Black-Scholes-Merton European Call Option Greeks

Posted on

# Black-Scholes-Merton (1973) European Call Option Greeks # 05_com/BSM_call_greeks.py # # (c) Dr. Yves J. Hilpisch # Derivatives Analytics with Python # import math import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt mpl.rcParams[‘font.family’] = ‘serif’ import mpl_toolkits.mplot3d.axes3d as p3 from BSM_option_valuation import d1f, N, dN # # Functions for Greeks # […]

Python

Black-Scholes-Merton European Call & Put Valuation

Posted on

# Black-Scholes-Merton (1973) European Call & Put Valuation # import math import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt mpl.rcParams[‘font.family’] = ‘serif’ from scipy.integrate import quad # # Helper Functions # def dN(x): ”’ Probability density function of standard normal random variable x.”’ return math.exp(-0.5 * x ** 2) / math.sqrt(2 […]