## Archive for January, 2008

### Mathematics Books Online

Jan 31, 2008 in Free Online Books, Mathematics

Professor George Cain of Georgia Tech maintains a list of free online mathematics textbooks.Â  This includes one by Gilbert Strang, available free from MIT’s Open CourseWorks site.

Christian Walck has an amazing free probability distribution handbook with detailed discussions.Â  You won’t find every distribution here, but probably what he doesn’t have, you don’t need! 🙂

### Copula for Market Risk using Matlab and Mathematica

Jan 30, 2008 in Copulas

Attached are someÂ slides from some work I did last year to compute required Economic Capital for Market Risk using Copula ApproachÂ .Â A combination of Matlab and Mathematica were used to create the copula.Â Â  The market risk factors included OAS, debt spread andÂ interest rate risk (using principal components).Â  Empirical distributions were fit to the data using matlab’s statistical toolbox.Â  Mathematica was used for its symbolics.Â  Matlab also has some really nice graphics packages.Â

### More CDO primers

Jan 30, 2008 in Credit Derivatives

These papers and primers are useful in understanding CDOs.

The Bond Market Association’s CDO PrimerÂ

Christian Bluhm’s CDO Modeling: Techniques, Examples and ApplicationsÂ

Moody’s Special Comment Financial Guarantor CDO exposure: An OverviewÂ (it was written in 2003, but still good)

### Calculation of MLE for use in Copula using Mathematica

Jan 30, 2008 in Copulas, Mathematica

Â I wanted to construct a trivariate meta-t distribution from empirical marginal distributions.Â  I wrote a Mathematica notebook that would solve for the optimal degrees of freedom in the distribution given the input empirical distributions and correlation matrix.Â  The PDF version of the code to generate the optimal t value is shown in the attached PDFÂ Multivariate Distributions. What is really great about Mathematica is that I could have it symbolically derive the log likelihood function, by giving some definition such as

loglik[n_]:=n Log[Gamma[(n+d)/2]/Gamma[n/2]]-n d/2 Log[Pi n] – n/2 Log[Det[tau]]-(n+d)/2 (Sum[Log[1+ {x[[i]],y[[j]]}.invSigma .{x[[i]],y[[j]]}/n],{i,1,d},{j,1,d}])

and then asking it to take the derivative with respect to n.

### Links and Useful Facts regarding Time Series

Jan 30, 2008 in Time Series Links

Â Professor John Cochrane’s free time series book.Â  This book deserves credit for helping me land my first Wall Street job.

Time Series ReviewÂ  great for interview prep. Created for a PhD comprehensive exam review, don’t have the original link but will post the author when I find it.Â  The same person wrote notes on Probability TheoryÂ and a Mathematical Statistics Review.

How can you tell if a time series is AR or MA (or ARMA, or SHARMA, or ….?)Â  These notes can help.

### Investment Banking Links

Jan 30, 2008 in Investment Banking

If you are interested in learning more about investment banking, here are some links to get started.

Financial Times in-depth report on investment banking

Special in-depth report on the investment banksÂ HSBC, ABN-Amro

Story about the rogue trader at Societe-Generale

Investment Banking 101 webinar sponsored by JPMorgan (archive, recruiting 101). Subscribe to this site to get updates on their monthly webinars.Â

Document from Columbia University on i bank recruiting, From 116th Street to Wall Street Recruiting Overview.Â  Even if you are not at Columbia, it has useful information.

I-Banking GuideÂ Â IÂ don’t recall the author of this overview so can’t attribute it.

### Copulas for the Unwilling

Jan 30, 2008 in Copulas

I admit to liking the name “S for the Unwilling” so much that I have adapted it for the title of this post.

So many people have asked about how to get started on copulas and what to read that I thought I’d post some of the most useful information here.

If you are actually going to build a copula, you might want to consider matlab.Â  I used their copula functions, but also used Mathematica for it’s superior symbolics.Â  I will add some detail on this later but only have time to post some links right now.

Matlab has a webinar on copula functions that is really great.Â  You’ll need the statistical toolbox (see online reference here) and might want to get the econometrics (GARCH) and optimization toolboxes too.Â  I didn’t use their optimization routines because I have Mathematica but as a student these toolboxes are reasonably priced so there is no reason not to get them.Â

This Credit Lyonnaise site has a wealth of links on copulas. Andrew Patton’s site has lots of good examples, but I ended up building my own code. Good for reference though.

When I started working with copulas, I had to learn about the Maximum Likelihood Estimator.Â  There are a number of good books on this, including Statistical Foundations of Econometric Modeling by Aris Spanos.Â

There is also a great introductory paper Symbolic MLE with MathematicaÂ Â which explores this concept using Mathematica by Colin Rose and Murray D. Smith.

There are many giants in the field including David Li; Paul Embrechts, Alexander McNeil and Rudiger Frey; Joshua V. Rosenberg and Til Schuermann of the Federal Reserve Bank of New York and many others.

Let’s start with some introductions to copulas.Â  A copula is a method of imposing a dependence structure (through correlations) to independent marginal distributions.Â  If we knew the underlying joint distribution, it would not be necessary to use a copula, but in practice, the underlying joint distribution is unobservable.Â  Copulas can be used to combine various elements of market risk (for example, interest rate risk, volatility, OAS, debt spreads …) so a value at risk can be computed for the market risk in aggregate.Â  Copulas are often applied to credit risk.

The Wall Street Journal printed a profile of David Li, How A Formula Ignited Market that Burned Some Big Investors, which gives a colorful qualitative introduction.Â Â

I’ll add some commentary to these links later.
Modeling Copulas: An Overview by Martyn Dorey and Phil Jorion

A General Approach to Integrated Risk Mangement with Skewed, Fat-Tailed Risks, Joshua Rosenberg and Til Schuerman

McNeil, Embrechts and Frey have a book entitled Quantitative Risk Management, and you can download chapters 1, 6 and 10 as well as a lot of other great references from their site.

Coherent Measures of RiskCoping with Copulas by Thorsten Schmidt

Correlation and Dependency in Risk Management: Properties and Pitfalls, Embrechts, McNeil and Straumann.

Correlation Pitfalls and Alternatives, Embrechts, McNeil and Straumann again. This paper is in postscript format. This is the paper with one of the best lines ever, at leaset to me: “These traps are known to statisticians, but not, we suggest, to the general correlation-using public. We will help you avoid these pitfalls …” I don’t know why the phrase general correlation-using public cracks me up, but it does. Don’t read it just for the great writing, it’s an excellent paper.

### SPlus

Jan 30, 2008 in SPlus

We used SPlus in my time series class (along with the FinMetrics module)Â and I hope to be using it again soon. Â Students can get SPlus completely free from the publisher .Â  SPlus began as R, which is still available free, so there are many similaties.Â  (R can be downloaded here, and I love the graphics gallery!)

SPlus is the one of the only software programs I have ever seen that has completely free reference guides and online books. See them here

Here is a document by Eric Zivot, prolific author on financial modeling using SPlus/Finmetrics, on market risk modeling using SPlus.

The title of this document, S for the Unwilling, still cracks me up.Â  This is a tutorial to both SPlus and R, and the author uses ‘S’ to refer to either.

Eric Zivot’s book about finmetrics can be ordered from Amazon or here, and it also comes with the finmetrics package from insightful.com when you buy it.Â  His site has lots of SPlus resources, including (!!) poetry about S.Â  (Actually, this is not poetry but an excellent overview by the author of S for the Unwilling, and does not seem to contain any poetry or evenÂ limericks, quatrains or couplets about S.)Â  He also has an archived webinar that I have not had a chance to view yet.Â

Jan 30, 2008 in Financial Engineering, Matlab

If you are learning Matlab, one of the best resources is completely free.Â

Check out this free online book Numerical Computing with Matlab by the father of Matlab, Cleve Moler.Â  This book is great because it introduces the reader to matlab via mathematics and numerical analysis.Â

Programming Tutorial in MatlabÂ This document is a tutorial to the basic functions of matlab, with applications in financial math.Â  The document is directed towards creating code for a binomial model so is very appropriate, includes graphics.

Statistical Analysis in Matlab, including MLE, multiple regression and stochastic processes, is covered in these documents from a university author. Tutorial Part IÂ  covers the basics, Tutorial Part II is applied to statistics.

This document Intro to Financial Engineering via MatlabÂ byÂ Dr Brad Baxter, School of Economics, Mathematics and Statistics Birkbeck College, London W1CE 7HX provides an overview of options with code for matlab implementation, as well as analystic derivations of put and call prices for comparison.Â

This is another document by the same author who goes into much greater detail on financial engineering approached via Matlab. James Lesage has a wonderful tutorial on econometrics and matlab.

### Links to Credit Derivatives Papers

Jan 30, 2008 in Credit Derivatives

Â Lehman Brothers, Credit Derivatives Explained.Â  Very helpful and practical.

The JPMorgan Guide to Credit Derivatives, published by Risk Magazine.