Finance, Mathematics, Software

Using mathematics and software to model financial concepts


How to make a sequence of true statements.

That is mathematics in a nutshell. People seem to overestimate the expressiveness of mathematics.
Math is limited to propositions: statements that are either true or false.
Philosophers have the luxury of making statements that cannot be proved either true or false.
“As synthetic a priori judgments, the truths of mathematics are both informative and necessary.”
What the heck does that mean?

Math is just following your nose. The real truth tellers in this world have no choice. They are
born artists that suffer from a need to communicate what they see.

Propositional Calculus

When you limit yourself to statements that are either true or false, you also limit the vocabulary you can use.
The only words used in the Propositional Calculus are ‘not’, ‘and’, ‘or’, and ‘implies’.

Syntax

What you can say in mathematics is easy. What it means, not so much.
There is no limit on the number of atomic propositions you
have. P1, P2, P3,…
The rules for making propositions are

  1. Atomic propositions are propositions.
  2. If P is a proposition, then (~P) is a proposition.
  3. If P and Q are propositions, then
    (P∧Q), (P∨Q), and (P⇒Q)
    are propositions.

That’s it.

Symantics

When the atomic propositions in a proposition are assigned true or false values,
that determines the value of the proposition. This is described by truth tables.

P ~P
T F
F T
Published by kal, on August 31st, 2009 at 10:57 pm. Filled under: Uncategorized1 Comment

Colossal Failure?

I’ve read books by people that don’t really know all the details of what they are selling to their publisher as facts. That seems to be a good way to sell books when you think you got fired because you knew more than the people that hired you.

At Morgan Stanley, I took over the slot of a guy that went into the group described in a book by Frank Partnoy. I inherited the Monte Carlo engine this guy wrote for pricing the trades that did not fit into any of the standard models. He went into a different world where his quantitative expertise was no longer so important. His new world was very much about slicing up a collection of cash flows and getting the various tranches favorable ratings from S&P, Moody’s and Fitch so that institutional investors would buy them. Partnoy had a very limited understanding of what he was seeing and got fired because of that. Maybe he will write another book about the Morgan Stanley investors that lost money from the trades they willingly entered. Except he can’t. Facts are a bitch.

I also know something about Ugly Americans. That guy sued one of my clients and I got a $15,000 lesson in third party subpoenas. Relevence does not matter. You either have to respond to everything their lawyers demand or spend money fighting. And if you do, that will send up a red flag. The judge gets to look at the transcripts of the deposition and decide what is relevant after you hand over everything.

I just finished reading A Colossal Failure while on vacation at my grad school friend’s “cabin” in British Columbia. That’s what Canadian mathematicians call 3,000 ft2 with floor to ceiling windows and a great view of the bay

My take was that McDonald was quite honest about what he saw and he had people at Lehman that genuinely liked him and kept him in the loop even after things went pear shaped. If you just listen, people tell you things. His buddies tried to help him capitalize on shorting Lehman and he lost money on that. Cue John Maynard Keynes.

Published by kal, on August 11th, 2009 at 11:12 pm. Filled under: Uncategorized1 Comment

The limits of mathematics

My wife and I spent a glorious day with our friends on July 4th. It was a potluck with the theme of typical American food, but almost everyone was born somewhere else. My potato salad didn’t go over so well, mustard was a must in my upbringing in the South, but my baked beans with bbq pork was a hit with the meatatarians.

Usually we watch the fireworks from our deck in Brooklyn if they are being exploded somewhere around the Brooklyn bridge, but this year Macy’s shot the works over the Hudson instead of the East River. The last time they did that was 400 years ago, or something like that.

Our friends live next to Battery Park which juts out a bit into the Hudson, but the local papers claimed it would be closed. Fortunately it was not. It was a perfect spot to view the fireworks with old friends and young kids on a global warming defying day. My friend’s wife is an artist that suggested, after we retired post fireworks, and a few gin gimlets, that mathematics could explain the world.

Silly artists. Actually, she’s not silly at all. She has a PhD in philosophy and is a very talented artist. One of her paintings showed up on the cover of Best American Short Stories 2008. Somehow. But that is a different story.

Her claim was far from the truth, and only mathematics can make a real claim at describing truth. I was at a loss at where to start. I suggested mathematics does not really have much to say about a statement like “‘I have a Love I love too well; Where Dunkery frowns on Exon Moor.”

One funny thing about math is that even though it deals with absolute truth, it is very difficult not to lie when describing mathematics in short sentences. I’m going to do that now. Mathematics deals only with sentences that are either true or false. These are called propositions. The good/bad thing about this is that only a handful of words that we all use in the real world are needed: ‘not’, ‘and’, ‘or’, ‘implies’ to make new propostions. And even these are redundant. One of my hobbies is Category Theory. One branch of it attempts to provide a new foundation for mathematics. 

My friend was on to something, though. One goal of mathematics is to increase the scope of what human beings can think rigourously about. Category Theory seems to be the latest attempt silly humans are making at that. How can Horner’s Rule for reducing the number of multiplications in evaluating a polynomial expression be an intial object in a category? According to Richard Bird and Oege de Moor in ‘Algebra of Programming’, it is.

My current subway reading is ‘First-Order Logic” by Raymond Smullyan. His tableau method beats the heck out of the axioms combined with modus ponens proofs I had to do in my first course in mathematical logic. I must have learned this at one point, but I forgot that Godel proved first order logic is both complete and consistent.

Maybe that makes it even more amazing he derailed David Hilbert’s program by showing how if you add enough axioms to do simple arithmetic that you can no longer prove those rules are consistent.

Published by kal, on August 3rd, 2009 at 10:02 pm. Filled under: Uncategorized4 Comments

Lines

It is not the case PQ is the line segement from the point P to the point Q. It is more like the line containing P and Q having magnitude Q – P. If PQ = ST, then PQS = 0 and so S = P + s(Q – P) for some s. Likewise, T = Q + t(Q – P) for some t. Hence ST = PQ + (t – s)PQ so s = t and Q – P = T – S.

This gives the first example of the boundary operator, . It shows PQ = Q – P is well defined.

Published by kal, on July 10th, 2009 at 3:42 pm. Filled under: Uncategorized8 Comments

What’s the vector, Victor?

Math is all about following your nose. Grassman had the notion that P2 = 0, where P is a point, was how to detect intersections and somehow that idea generalized to higher dimensions. Don’t forget that in Grassmann’s time the of notion working in general n-dimensional space was a novelty. He ran into trouble when he tried to define a product that went beyond the dimension of the space. We’ll get back to that later.

Given points P and Q, what is Q – P? Note that Q – P is not equal to R(t) = (1 – t)P + tQ for any t. Since PQ(Q – P) = 0, it should be on the line determined by P and Q. In this sense, it has a direction. If Q – P = T – S, then T = S + (Q – P). In this sense, it has a magnitude. Differences of points are vectors.

Published by admin, on July 6th, 2009 at 9:31 am. Filled under: mathematics1 Comment

Plugging my Plugin

I tried various LaTeX WordPress math plugins and didn’t like any of them. In fact, I thought they were all pretty awful. Wedging ancient TeX technology into the world of HTML seems to be an impedance mismatch. Don’t get me started on MathML. That is a nonstarter.

Every time I tried a new WordPress theme things turned ugly so I rolled my own that uses straight HTML. I’m no Donald Knuth, but it does what I need. Here are some tests:

Use standard HTML entities for anything other than sub and superscripts

α^2^ + β^2^ = γ^2^

α2 + β2 = γ2

Use curly braces for grouping

a_{b_1_ + 2}_

ab1 + 2

Feel free to hardwire standard HTML if you think that will make things look better.

∫_a_^b^ f(x) dx

ab f(x) dx

Published by kal, on July 2nd, 2009 at 6:05 pm. Filled under: UncategorizedNo Comments

Grassmann Algebra

Hermann Grassmann had the notion that it was possible to use algebra to prove geometric facts. Instead of using scalar Cartesian coordinates, he used actual points in space. Let E be Euclidean space and call the elements of E points. If P and Q are two points then PQ should represent something like the line from P to Q. If P, Q, and R are three points then PQR should resemble the triangle having vertices P, Q, and R. And so on.

If t is a scalar tP is the point P with weight t. Let R(t) = (1 – t)P + tQ, where P and Q are points and t is a scalar, then R(0) = P and R(1) = Q. In general aP + bQ is the point (a/(a + b) P + b/(a + b) Q = R(b/(a + b)) having weight a + b.

What is PQ if P = Q? If PQ resembles the line segment from P to Q, then the line from P to P is the point P. Assuming P = P2 we have P + Q = (P + Q)(P + Q) = PP + PQ + QP + QQ = P + PQ + QP + Q so 0 = PQ + QP and hence  0 = PP + PP = 2P for any point P. That might have been the first theory Hermann discarded before he came up with the idea PQ = 0 if P = Q. We have 0 = (P + Q)(P + Q) = PQ + QP so PQ = -QP. Since 0 = -0 we don’t have to discard this theory yet.

Note that  PQR = 0 if P = Q or Q = R or R = P. More generally PQR(t) = 0 for all t with R(t) as above. In general, PQR = 0 if and only if the three points are colinear.

For example, P(Q + R) is the median of the triangle PQR from P to the midpoint of QR. The barycenter of the triangle is P + Q + R. Note P(Q + R)(P + Q + R) = PQP + PQQ + PQR + PRP + PRQ + PRR = PQR + PRQ = 0. This proves the medians of any triangle meet at a point, if you think about the symmetry for a second.

Grassman’s rule that P2 = 0 enables the detection of points not being in general position, i.e., they don’t determine an n – 1 dimensional object. If n points belong to a subspace of dimension less than n – 1 their product vanishes, not just for n = 2

Published by admin, on July 1st, 2009 at 8:51 am. Filled under: mathematics Tags: , , , , 2 Comments