• I wanted to give you an idea of what using wavelets is like. This is just scratching the surface, but it’s stuff I happened to already know how to do. Basically, you can transform some data, mess with it, and transform it back. What you get out of it is useful manipulations localized in both time and frequency. That’s the wavelet’s major advantage over something like a Fourier transform… all that localization means that they deal with nonstationary signals quite well.

    Enjoy!

    [EDIT: If you download the FREE Mathematica Player, then you can play with the demonstration code I made on as many random walks as you like. Just download the demo file 20090925WaveletDemo.zip. The mathematica player also gives you access to thousands of cool demos at the Wolfram Demonstrations Project.]

    This entry was posted on Friday, September 25th, 2009 at 7:29 pm and is filed under Mathematics, Trading. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
  • 10 Comments

    Take a look at some of the responses we've had to this article.

    1. Eternum
      Sep 25th
      Reply

      Thanks Richard.

    2. BG
      Sep 26th
      Reply

      Wow Richard, wavelets are really cool. Thank you so much for the demo, as I snooped around on the web, but the information was a little intimidating to me at first, but I will keep at it :-). Wow, do I understand correctly that one of the uses of such filters would be a low to no lag to proxy price without the use of averaging? Thanks.

      • Sep 26th
        Reply

        Well, we have the price proxy indicator now for that kind of thing. As you can see in the demonstration app, you can use wavelets to get a zero-lag cleanup on the data, but it’s not a right-edge thing like a moving average… you are operating on all of the data after the fact. In my limited experience, if you do a windowed transform and only plot the right edge, then you get an answer not unlike an EMA. Maybe just plotting the current right edge without windowing does better. All to be figured out in the future.

        On the other hand, if you don’t mind the much-maligned “repainting indicator,” then you could get a constantly updated filtered look at your chart. Sometimes I do use repainting indicators, but usually only if the repainting is limited to the last 2 or 3 bars. I don’t like the whole picture changing up on me.

        Nevertheless, you can use a clean repainting indicator to feed a right-edge indicator’s inputs, which sometimes gives you the best of both worlds. Again, all to be investigated in the future.

    3. Eric
      Sep 27th
      Reply

      Kick Arse man! I love how you’ve offered a proof that you can take many angles to end up with something that looks like a stepma *giggle* This approach should yield awesome sauce. :)

      ps. you sound in a good mood too :)

      E.

    4. I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.

      Trader Blastradius

      http://goldstreamcapital.blogspot.com

    5. taotree
      Oct 13th
      Reply

      Here is a gentle introduction to wavelets. And you can download it free.

      http://www.conceptualwavelets.com/index.html

      • Oct 13th
        Reply

        cool, I’ll check it out! Good to hear from you, BTW.

    6. taotree
      Oct 14th
      Reply

      Actually, you can’t download the whole book for free (conceptualwavelets.com)–just some of the chapters. But reading the first 4 chapters online for free certainly gives a good conceptual feeling for what wavelets are about. At least it did for me. Got me thinking of all sorts of possibilities.

    7. I never heard of wavelets until now. You were very good in presenting your information in the video. This all looks great. I will be looking into this more. Thank you!

  • Leave a Reply

    Let us know what you thought.

  • Name (required):

    Email (required):

    Website:

    Message:

PHVsPjxsaT48c3Ryb25nPndvb19hYm91dDwvc3Ryb25nPiAtIGh0dHA6Ly93d3cubW92ZXRoZW1hcmtldHMuY29tL2Jsb2cvcmljaGFyZC88L2xpPjxsaT48c3Ryb25nPndvb19hZF9mb290ZXI8L3N0cm9uZz4gLSBmYWxzZTwvbGk+PGxpPjxzdHJvbmc+d29vX2FkX2Zvb3Rlcl9hZHNlbnNlPC9zdHJvbmc+IC0gPC9saT48bGk+PHN0cm9uZz53b29fYWRfZm9vdGVyX2ltYWdlPC9zdHJvbmc+IC0gaHR0cDovL3d3dy53b290aGVtZXMuY29tL2Fkcy93b290aGVtZXMtNDY4eDYwLTIuZ2lmPC9saT48bGk+PHN0cm9uZz53b29fYWRfZm9vdGVyX3VybDwvc3Ryb25nPiAtIGh0dHA6Ly93d3cud29vdGhlbWVzLmNvbTwvbGk+PGxpPjxzdHJvbmc+d29vX2FkX2ltYWdlXzE8L3N0cm9uZz4gLSAvaW1hZ2VzL2FkLmdpZjwvbGk+PGxpPjxzdHJvbmc+d29vX2FkX2ltYWdlXzI8L3N0cm9uZz4gLSAvaW1hZ2VzL2FkLmdpZjwvbGk+PGxpPjxzdHJvbmc+d29vX2FkX3VybF8xPC9zdHJvbmc+IC0gaHR0cDovL2V4YW1wb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