The codes provided can be used to show that the Kalman Smoother Expectation Maximization (KSEM) methodology can be used successfully to estimate the parameter of the Schwartz-Smith model. We develop several novel adjustments to incorporate the model framework.
The advantage of using this method is, unlike in their original paper, you can efficiently estimate the full covariance structure, also when compared to the results in their paper, you obtain a higher liklihood and better fit of the data. The details of this code can be found in the paper KSEMprocedure.pdf which is attached.
In the code emoptsimulation.m, I provide the code to simulate the Schwartz-Smith model under two different parameter sets (theta), however these can be easily adjusted as you see fit
For the first, I simulate the model using the same parameters (theta), that were used to obtained for the crude oil dataset in the Schwartz-Smith paper, I then use my methodology, with constraints, to obtain an estimate (thetahat) of the original parameters, given only the simulated data, here are the obtained results
theta=[1.4900 0.0300 0.2860 0.1450 0.3000 0.0415 0.1570]
thetahat=[1.8225 0.0149 0.2618 0.1412 0.2038 0.0294 0.0553]
Next I try this methodology on a different parameter set (theta) and obtained the following estimate (thetahat)
theta=[1.2000 0.1000 0.4000 0.1500 0.2000 0.0500 0.0500]
thetahat=[1.1245 0.1113 0.3777 0.1435 0.2912 0.0604 0.0290]
I did the simulation study to show that assuming we knew the true parameters of the underlying data process, we can use my methodology to calibrate accurately. Next I show how the results on actual datasets.
In the code emoptcrudeoils.m, For comparison, I take the same crudeoil timeseries dataset used in the Schwartz-Smith 2000 paper and compare my calibration method results to theirs. I use three different variations of my KSEM procedures and obtain a higher liklihood and better fit of data using my methodology. This code can be used to obtain the results given in Table 1 and Figure 4 of KSEMprocedure.pdf.
In the code emoptnatgas.m, I take a new time series from 1/4/2000 to 6/10/2008 of the 1,3,5,9, and 12 month contracts in natural gass and perform the same calibration using the three KSEM procedures to obtain the results given in Table 2 and Figure 5 of KSEMprocedure.pdf.
Parts of this code was taken from
James P. LeSage
Moeti Ncube (2021). Calibration Method for the Schwartz-Smith Model (https://www.mathworks.com/matlabcentral/fileexchange/29751-calibration-method-for-the-schwartz-smith-model), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!