
Retrospective evaluation of portfolio allocation in the energy sector
Piotr Mirowski, New York University, 2007
The following computing project was done in December 2007 for the course "Quantitative Risk and Portfolio Management" taught by Prof. Attilio Meucci) at the Courant Institute of Mathematical Sciences. Starting from NYSE daily stock prices and Brent/Oklahoma oil spot prices, I conducted a retrospective portfolio allocation study on a 4week prediction horizon, estimating missing prices (ExpectationMaximization), detecting outliers (Minimum Volume Ellipsoid), computing the Normal or Studentt distributions of invariants (weekly compounded returns), and performed a meanvariance optimal portfolio allocation.
Methodology:
Each retrospective portfolio allocation estimation used all available data between two dates, with a weekly estimation interval and a 4week prediction horizon. Weekly compounded returns were chosen as market invariants. As a result, several portfolio allocations were estimated, and the profit made on the respective investments computed thanks to available target data at the prediction horizon.
Estimation of missing data:
In most cases, days with missing Brent and Oklahoma spot prices and days with missing NYSE stock prices are two disjoint sets. Estimation of missing prices was done using the ExpectationMaximization algorithm, based on the conditional covariance with observed prices [1, chapter 4].
Outlier detection:
T = max(Tmcd, Tmve) outliers were removed using the Minimum Covariance Determinant and Minimum Volume Ellipsoid [1, chapter 4]. Outliers were removed from the invariants.
Estimation of the distribution of market invariants:
MaximumLikelihood Normal distribution, shrinkage to a Normal distribution with a narrow covariance, and MaximumLikelihood Studentt distributions were investigated (for the Studentt distribution, the ML scatter and location parameters were computed for each degree of freedom, and then the optimal (ML) degree of freedom selected. The distribution of invariants that was chosen for the projection was the alpha=0.1 shrinkage of the Normal distribution towards the grand mean and half of the grand covariance.
Optimal allocation:
Totalreturn and benchmark meanvariance optimal allocation w.r.t. the certainty equivalent satisfaction (with an exponential pessimistic xi=10 utility function). 3 benchmarks were chosen: equalmoney in all securities, equalmoney in Oil&Gas only, equalmoney in Nuclear energy only.
Evaluation:
The content of each portfolio as well as retrospective profits (i.e. profits made on each allocation, using the actual securities prices at the investment horizon) was output for the total returns (optimized), nuclear benchmarkrelative (optimized), nuclear benchmark (given), Oil&Gas benchmarkrelative (optimized), Oil&Gas benchmark (given), diversified benchmarkrelative (optimized) and diversified benchmark (given). Graphs showing stock and oil prices with missing and outlier data, marginal distributions of each security, and allocation riskreward, portfolio composition and certaintyequivalent were saved as PDF.
Results for an 4week investment of USD 100 at the end of the estimation period:
Estimation 4Jan2000 through 1Nov2007, best profit on 29Nov2007: nuclear benchmark profit USD 1.21
Estimation 4Jan2000 through 15Mar2003, best profit on 12Apr2003: oil benchmark profit USD 2.1
Estimation 2Sep1998 through 20Oct2000, best profit on 17Nov2000: nuclear benchmark profit USD 3.52
Estimation 1Jun1997 through 20Aug1998, best profit on 17Sep1998: oil benchmark relative profit USD 3.52
Estimation 1Jan1991 through 1Jun1997, best profit on 29Jun1997: oil benchmark relative profit USD 7.45
Estimation 1Nov1987 through 30Jun1990, best profit on 28Jul1990: oil benchmark relative profit USD 10.25
References:
[1] Attilio Meucci, Risk and Asset Allocation, Springer, 2005.
[2] Stock market data from NYSE Euronext, http://www.nyse.com.
[3] John Carey, “Grabbing a Piece of the Nuclear Action”, Business Week, 27 December 2004.
[4] Stephen D. Simpson, “A Healthier Glow for Nuclear Power?”, Motley Fool, 8 June 2005.
[5] Rich Smith, “America Goes Nuclear”, Motley Fool, 26 September 2007.
[6] James L. Williams, “Oil Price History and Analysis”, http://www.wtrg.com/prices.htm.
Data:
From [2], [3], [4], [5]:
1) Brent and Oklahoma oil spot prices
23 NYSE prices in 4 sectors:
2) Oil&Gas: ExxonMobil XOM, BP, ChevronTexaco CVX, Total TOT, Royal Shell RDSB, ENI S.p.A. E, ConocoPhillips
COP
3) Oilfield services: Schlumberger SLB, Haliburton HAL, BakerHughes BHI
4) Uranium extraction: RioTinto RTP, Billiton BHP, Cameco CCJ, USEC USU
5) Nuclear services: General Electric GE, Entergy/EDF International ETR, Southern Company SO, Constellation Energy CEG, Dominion Resources D, NRG, McDermott MDR, Exelon EXC
+ historical geopolitical events affecting oil prices and likely to affect energy sectors [6].
PM_Project_Data.mat
NYSE stock and Brent/Oklahoma oil spot prices
Project code (in Matlab):
The entire code is contained in a zip file: PiotrMirowski_QRPM_Code.zip.
You can also download individual files I wrote:
PM_Project.m
PM_AllocateBenchmark.m
PM_AllocateTotalWealth.m
PM_DetectOutliers.m
PM_Display.m
PM_EvaluateInvestment.m
PM_GetFileNames.m
PM_Mahalanobis2.m
PM_MarketStudy.m
PM_MissingDataEM.m
PM_MLEstimate_Normal.m
PM_MLEstimate_Student.m
PM_ProjectNormal.m
PM_ReadPrices.m
PM_SelectPrices.m
PM_ShrinkNormal.m
Code by Prof. Attilio Meucci:
IIDAnalysis.m
TwoDimEllipsoid.m
