Built on Facts

Sunday Function

Draw the graph of a function. Roughly speaking, if there’s no holes, jumps, or other choppy weirdness it’s a continuous function. The function is connected to itself like a curvy rope laid out on the ground, with no cuts.

Now if that function has no sharp points, it’s a differentiable function. Again roughly speaking, imagine that the rope is free of kinks or sharp bends. The absolute value function is an example of a function which is not differentiable at the origin: there’s a sharp point there.

It’s well known that if a function is differentiable, it’s also continuous. This is formally provable in a couple of lines, and it makes sense. If a function is smooth, it can’t possibly be disconnected from itself. But what’s a little less obvious is that the converse is not true. A function can be continuous and not differentiable.

Now in a way this is not implausible. The absolute value function isn’t differentiable at the origin because of that sharp point, but it is connected to itself there and thus it’s continuous. But that’s just a problem at one point – the rest of the function is both continuous and differentiable. What’s weird is that there are functions which are continuous everywhere and differentiable nowhere. Here’s one due to Weierstrass:

i-d4bb9fe09d6b78eb832985821d8a307f-1.png

i-b2c23942b4c53c41ada1ba3dc53669b3-pathology.png

Image credit Mathworld

It’s continuous everywhere. It’s not differentiable over any finite interval. Zoom in between two sharp points, and you’ll find more small sharp points. Keep zooming and you’ll keep finding even smaller sharp points between those. Almost every single point on this function is sharp, there’s nowhere the function is smooth for any length at all. I say almost because there is a disjoint set of points of measure zero which are differentiable, but there’s no interval however small in which every point is differentiable.

Fortunately these are mathematical curiosities and do not appear in any physical situation I’ve ever heard of – though you never know.

Mathematics. Lewis Carrol couldn’t make this stuff up.

Comments

  1. #1 Steve
    September 14, 2008

    Actually, such “mathematical curiosities” turn out to be incredibly important in the field of stochastic differential equations, which are all over the financial field. The Wiener process, also known as Brownian motion, is a continuous no-where differential function that is very useful in a number of fields. The example you gave is very similar to what is known as a Karhunen-Loeve expansion, where an infinite series of sines can be combined to give any realization of white noise.

    As so often happens, a mathematical object studied for its own sake later becomes incredibly useful!

  2. #2 Michael F. Martin
    September 14, 2008

    Steve,

    Could you say more about the experimental tests of such models? I know there are many who claim to have modeled price stochastically, and many have failed.

    Why should stock prices be analogous to Brownian motion?

  3. #3 Matthias
    September 14, 2008

    Thank FSM this does not happen in nature. Us poor physics students would have to actually memorize all those preconditions on theorems and stuff, instead of just assuming everything to be sufficiently smooth

  4. #4 brian smith
    September 14, 2008

    There’s been a huge amount of testing of Brownian-motion type fluctuation of stock prices, and other financial time series. Technically, most of it lately has based on the more general concept of a (sub)martingale: this sort of model is also known as the efficient markets approach, the idea that market prices basically reflect all currently available information so that changes depend on the arrival of new unanticipated information, which is essentially a random process.

    The underlying idea is that it should be hard to make money by day-trading stocks on a consistent basis without access to inside information: that seems about right — day traders as a group seem to make money only in a rising market.

    The path of stock prices seems to reflect random fluctuations around a generally upward long term trend: the positive trend is why the underlying model is a submartingale, not a ‘fair game’. The idea has something to it. For a more skeptical but accessible review of the evidence see Robert Shiller’s book, ‘Irrational Exuberance’ published in 2000. I haven’t paid much attention to this topic for a while, so there may be more good stuff from the last 5 years.

    The whole area is indeed the study of stochastic differential equations: nowadays Ito’s Lemma, the key result here, is as familiar to economics/finance graduate students as physics majors.

    The above Weierstrass function is indeed remarkable since it is the uniformly convergent continuous function sum of individually everywhere infinitely differentiable sine functions, but is itself NOWHERE differentiable. That’s really even more surprising than the saw-tooth VanderWaerden function that ‘propagates’ from the absolute function that is non-differentiable at just one point.

    Finally, as I understand the physics (poorly) the Weiner process is just a useful mathematical model, an idealization, since it would theoretically take infinite power to wiggle the signal so irregularly.

  5. #5 eddie
    September 14, 2008

    I’m currently reading The Search for Certainty by John L Casti. It is about how we seek to understand natural processes and how confident we can be in our models.
    It has a chapter on financial markets that’s very interesting.

  6. #6 Steve
    September 14, 2008

    Michael, while I don’t work in the field, I do know that almost everyone working in financial mathematics uses stochastic differential equations at some point. It is clear that financial systems are not truly deterministic, and throwing in Brownian motion as a piece seems to fit the data very well. But its only a piece. The Wikipedia article on the Black-Scholes equation is instructive, pointing out some of the approximations involved.

    Matthias, you are lucky you don’t have to deal with diffusion problems or molecular dynamics — very “physical” problem where random processes are involved. While most mathematicians associate stochastic differential equations with financial mathematics, they are used in other areas, and the better they are known, the more they are used. But the numerical analysis required to deal with them (yet alone understand them!) is a quantum leap beyond typical undergraduate numerical methods.

    And remember, all mathematical models are approximations to reality, with varying degrees of accuracy. All the traditional differential equations of physics are approximations that are too smooth, since at the molecular level physical structures are not smooth, and the Wiener process is too nondifferentiable, again because of the granular nature of reality. But over a ridiculous number of orders of magnitude, these approximations are very accurate, and it turns out that completely smooth or completely non-smooth functions are way easier to deal with mathematically than “reality” (whatever that is).

    Brian, one slight error — the Weierstrass function is in fact differentiable at a countable number of points. Check the reference Matt gave in his original post.

    On a related point Matt, a true “mathematical curiosity” would be a function like f(x)=1 if x is rational, 0 if it is irrational (Dirichlet’s function). Its a “simple” example of a function whose Riemann integral doesn’t exist, but whose Lebesgue integral does. However, I’ve never come across a “physical” example where this particular function is useful. At least, not yet…

  7. #7 Paul Johnson
    September 15, 2008

    what is the k term?

  8. #8 Matt Springer
    September 15, 2008

    k is just the variable being summed over. a is a free integer parameter (the plots here are for a = 2, 3, and 4), but I’m not sure what the restrictions on it are.

  9. #9 Alan
    September 15, 2008

    Sounds like a description of a 2D fractal to me. The classic example of such a curve is the coastline of an island. Looking at smaller and smaller sections of the curve just reveals more curves that look like the original coastline. Such a 2D graph can give the weird result that an infinitely long edge contains a finite area.

  10. #10 Peter Morgan
    September 15, 2008

    Matthias, #3, it’s not whether such functions happen in Nature or not that matters to Physics students, it’s whether such functions happen in the mathematics we use to model Nature that matters. Equally in financial models, there is no infinitesimal part of a dollar really in play, but the model can still be a useful way to think about the markets.

    The mathematical model for Brownian motion has turtles all the way down, whether the world is like that or not. Classical fields at finite temperature and quantum fields both have mathematical structure in this class, which is why the 2-point correlation function goes to infinity as we consider the limit in which two points coincide; the trick is to consider functions of the model’s DOF that are finite and ignore functions that are not finite (that is, assert that only finite functions are observable). Hence the use of smooth “test functions” in quantum field theory; renormalization is all about the consideration of sets of observables that are finite only at finite scales.
    The infinitesimal in our models and the infinitesimal in Nature are not open to experiment, but we base our confidence in theory on our ability to compare models of experiments at many finite scales. This largely reiterates Steve’s points, #6.

    Finally, to comment on Brian Smith’s comment, #6, “Finally, as I understand the physics (poorly) the Weiner process is just a useful mathematical model, an idealization, since it would theoretically take infinite power to wiggle the signal so irregularly”, the trick, as above, is to consider the ratios of energies of different signals, when the ratios are finite, not about the energies, which are not. I can “smash” two such signals together, perhaps, and see what the theory predicts will happen (the theory has to have a well-enough defined mathematics for what it means to “smash” signals together, and some description of how you would do an experiment that corresponds to the mathematics, and what the results would look like in the experimental apparatus datasets).

  11. #11 Peter Morgan
    September 15, 2008

    Erratum: Classical FREE fields at finite temperature and FREE quantum fields both have mathematical structure in this class, which is why the 2-point correlation function goes to infinity as we consider the limit in which two points coincide; for interacting fields, renormalization muddies the waters enough that it’s best not to think in quite these terms.

  12. #12 Chris
    September 15, 2008

    Piggybacking to some extent on the above comments, I’d love to read a bit more about Browning motion (and, I think, the related idea of “brown noise”)

  13. #13 Paul Johnson
    September 15, 2008

    Wow I can’t believe I missed that.

    The A- i got studying series is not paying off.

  14. #14 IBY
    September 16, 2008

    Wow, that is one of the strangest function I have ever seen in my life. It is all spiky everywhere.

  15. #15 CCPhysicist
    September 16, 2008

    These curiosities are important for analysis, period, because they can expose misconceptions about the real numbers.

    My favorite has always been the Cantor Set (aka Cantor’s ternary set). If used to define a function (1 for points in the set, 0 for those not) on the domain [0,1], you get a function that is not Riemann integrable. It is, however, Lebesgue integrable with measure zero.

    But its most entertaining property is the fact that the number of points IN the set is exactly equal to the number of points NOT in the set. So you have split the interval [0,1] into two pieces. One piece has length = 1 (the same as the set you started with) and the other has length = 0 … but both have exactly the same number of points in them. And the same number of points as were in the original set [0,1].

    Great fun.

  16. #16 Jon Claerbout
    March 1, 2009

    My favorite puzzling function is the autocorrelation of a signal of random numbers. View the dependence of the autocorrelation with the time duration (number of points) in the signal.

    For even more fun, look at the Fourier transform of this autocorrelation and try to decide if the spectrum is constant or if it is pure noise like the original random numbers.

  17. #17 Urban Garlic
    March 1, 2009

    I’m late to this party (came here from Cosmic Variance), but @#9 Alan:

    Surely, being a function, this is disqualified from being a fractal? It’s isomorphic to the unit interval, i.e. has a unique y for every x, so its graph in the x-y plane, however jagged, is still one-dimensional, right?

    Or am I mis-remembering the definition of a fractal?

  18. #18 josslyn
    August 7, 2009

    how to prove brownian motion is continuous but nowhere differentiable? in what condition, the martingale property is a brownian motion?

  19. #19 josslyn
    August 7, 2009

    hey everyone, is there any one can help me to solve the queation of finance mathematics, about brownian motion.
    Let {Wt }t≥0 be standard Brownian motion under the measure P. Which of the
    following are P-Brownian motions?
    (a) {−Wt }t≥0,
    (b) {cWt/c2 }t≥0, where c is a constant,
    (c) {√tW1}t≥0,
    (d) {W2t − Wt }t≥0.
    justify your answer