Commodity pricing with Ornstein-Uhlenbeck price process and Kalman Filter calibration in Python

The Maths

Pricing model

Eq.1
Eq.2
Eq.3
Eq.4
Eq.5
Eq.6
Eq.7
Eq.8
Eq.9

Model Calibration

Eq. 10
  • We generate the unobserved state variable via the transition equation, which is a discrete-time version of the stochastic process in equation (1. We can therefore write the transition equation as
Eq. 11
  • The Kalman filter is then applied as a recursive procedure to compute the optimal estimator of the state variable at a time t, based on the information at time t and updated continuously as new information becomes available. In order to apply the simple Kalman filter, we assume that both the disturbances and the initial state variable are normally distributed; we can therefore calculate the maximum likelihood function and estimate the model parameter that is otherwise unknown.

Model Implementation

Calibration

Pricing Model

I am curious about numbers,investments and everything else.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Gauss optimizing linear time to constant time in School

Understand the Power of Compounding With This Unofficial Theory and a Simple Math

compounding of money

Expectation & Variance of OLS Estimates

Markov Chain Analysis and Simulation using Python

A Guide to Metrics in Exploratory Data Analysis

A wordcloud of metrics/estimates/sample statistics explained in this article.

System of linear equations | Linear Algebra | Part 4

Statistical Power in Hypothesis Testing

Playing infinite chess — 3:16

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ezio Lauro

Ezio Lauro

I am curious about numbers,investments and everything else.

More from Medium

Solving a capacitated vehicle routing problem with Google OR-Tools and Mapbox

Optimization with Python: Infeasibility Explanation for Integer Programming with OR-Tools

Code-linting in JupyterLab using conda

System Reliability Optimization by Evolutionary Strategy