Skip to content

NLV2: Capturing the 3rd Derivative

December 9, 2014

3rd derivative

In the previous post, I introduced the concept of a non-linear filter that combines volatility and acceleration. However, this is just one configuration to leverage the concept of a non-linear filter. Using a traditional volatility calculation assigns each data point an equal weight, when in practice some data points should logically have more weight than others. To capture different weighting functions, one could use multiple indicators to weight data points in the volatility calculation to make it more responsive to incoming market data. Using acceleration was an interesting idea to reduce lag and quickly capture changes in volatility. Preliminary analysis showed some promise in this regard. Acceleration is the 2nd derivative, so an interesting question is whether the 3rd derivative- or the velocity of acceleration-can produce even better results. I created a new framework to capture the non-linear weighting that is much simpler to understand and implement:

A) Calculate the rolling series of the square of the daily log returns minus their average return
B) Calculate the rolling series of the absolute value of the first difference in log returns (acceleration/error)
C) Calculate the rolling series of the absolute value of the first difference in B (the absolute acceleration/error log returns) this is the 3rd derivative or velocity of acceleration.
D) Weight each daily value in A by the current day’s C value divided by the sum of C values over the last 10 days-
F) Find the sum of the values in D- this is NLV2

Here is how NLV2 performs on the S&P500 (SPY) versus the other methods previously presented:



The profile of this method is very different than the others, and while it hasn’t performed as well comparatively in recent years it has been the best performer over the entire period that was tested. While other people may dismiss things that have underperformed recently, my own research suggests that this is a mistake- many systems and methods mean-revert around some long-term average. Since this method has fewer moving parts than NLV, that makes it inherently more desirable and perhaps more durable. In either case the point of presenting this method is not to evaluate performance or suggest that it is a superior weighting scheme. It is to present an alternative way to look at the data- clearly different derivatives of log returns carry different pieces of information, and combining these into a calibrated forecast model or a non-linear filter may add value above and beyond the standard volatility formulation.

11 Comments leave one →
  1. Juspa permalink
    December 9, 2014 3:22 pm

    Thanks David,

    Any chance that you could provide spreadsheet of NVL2 and NLV so I could check what I got right?

    • david varadi permalink*
      December 18, 2014 1:39 am

      hi Juspa, i will try to post those at some point next week.

  2. marcus permalink
    December 9, 2014 10:48 pm

    basically isn’t this a variation of VIX gamma?

    • david varadi permalink*
      December 18, 2014 1:40 am

      Marcus, i suppose that could be a loose analogy. Interesting insight.

  3. Peter permalink
    December 12, 2014 3:32 pm

    I must say that I really inspire your work. I am studying econometrics at an under graduate level in Sweden and are bulding trading models in at my spare time (only in Excel so far). I wish though that I would have the same creativity as you 🙂

    I was playing around with VOA and F-VOA today and I found something interesting. Instead of using the average value in your calcuations I used the median value which makes the indicator more reactive. But it seems like the sharpe and cagr get much better and I’ve tried a lot of different number of days in the look-back period.

    Care to give your thoughts on this?

    I must add though that I am trading a model with five EQ-indices. And I use the inverse of this vol-calculations to get the weight of the different parts.

    • david varadi permalink*
      December 18, 2014 1:47 am

      Hi Peter, thank you. I personally only use excel for simple ideas–but tend to do serious work with other programmers and languages. I didn’t notice the same result you are describing using the median if you take out the change in the VOA. Perhaps what you are noticing is that the median smooths out the jumps in the change in VOA which create noise. typically a median is less reactive and ignores outliers. But if you take that part out, in the simple version of the VOA (ie using the absolute value of first differences in log returns) the average performs better across the board based on the brief testing that I did.

  4. January 3, 2015 1:36 pm

    David, I just found your blog and really appreciate what you are sharing. It’s great stuff. I found it because I was googling on second derivative ideas, to find comparisons for a way of doing this I’ve created ((totally different than yours) and backtested to March 2004 through Nov 14th 2014, trading back and forth between SPY and cash. I have an odd request. Would you be willing to tell me how yours has performed from a similar time period? Mine backtests at 13.2% CAGR with a 16.8% max drawdown, compared to 8% and 56% for a buy-and-hold SPY during that same time period. I’m just looking for benchmarks to understand whether my work compares well with what others are doing. Thanks.

    • January 3, 2015 1:40 pm

      I should add, my volatility is 7.08%

    • January 3, 2015 7:31 pm

      I’ve rechecked the results and what I reported above is from an older version. Here’s what my approach currently delivers.

      Start/end date: March 26, 2004 – Nov 14, 2014.
      CAGR: 13.61%
      MaxDD: 15.7%
      Volatility: 6.99%
      Sharpe ratio: 1.05
      Skew: -0.09
      % 12-month gains: 83.9%
      Sortino: 1.68

      I’m wondering if it would be worthwhile to start a blog to invite people to submit results from their systems for some standard portfolios. I know people (including me) are understandably reluctant to share what their systems are, but I think everybody would like good benchmarks for how well their systems might perform compared to those others are working on. I certainly would. For example, I’ve tried mine out doing a long/short pair trade between the SP500 leveraged 3X ETF’s SPXL/SPXU and it returns:

      CAGR: 40.77%
      MaxDD: 54.32%
      Volatility: 26.97%
      Sharpe ratio: 1
      Skew: -0.63
      % 12-month gains: 84.7%
      Sortino: 1.57

      I was disappointed with these results but should I have been? I would really love to know how hard a problem this pair trade is and getting a sense of the results other people are able to get would help lots. What do you think?.

  5. alex permalink
    January 15, 2015 2:35 am

    Hi David, thanks for sharing. Excellent post. It reminds me somehow of the Volga options traders use. It would help tremendously if you could post a spreadsheet to illustrate the calculation for the mathematically challenged 😉 Best,Alex


  1. The Whole Street’s Daily Wrap for 12/9/2014 | The Whole Street

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: