System Development with acrary

Discussion in 'Journals' started by acrary, Jun 3, 2004.

Thread Status:
Not open for further replies.
  1. acrary

    acrary

    Correlation cont'd.

    Ok, so far most of this is probably old news to most of you. I needed to post it as background for those just getting started.

    The whole idea of combing models is to improve the consistency of the results. We've seen in a macro way how they can provide some benefit. Now, how do we know which models to combine? Also how much of model 1 should we trade with how much model 2 and how much of model 3? Also if I had a model 4 how could I tell if I should add it in as well?

    Those are questions I wanted to answer when I started down this path. Hopefully it won't be too difficult to follow.

    If you've taken a elementary stats class you'll know that std. deviation measures dispersion from the norm. Norm being defined as the median or average. You'll also note that the level of std. deviation measures the distance away from the median. We also know that if we can estimate the number of std. deviations away something is, we can look it up as a Z score in a normal distribution table to see how far away from the norm we are.

    One of the nice tools in trading are the sharpe ratios which are designed to measure consistency. One of them is the modified sharpe ratio. It's defined as average return / std. deviation. For example, if the average return is $100 and the std. deviation is $50 then the sharpe ratio is 2.0. So in other words for me to breakeven or start to lose money I'd have to have a return that was 2 std. deviations worse than the average return. If you look up 2 std. deviations in a stats book under z score you'll note that it equates to 95.44%. So if my returns are normally distributed then I have a 95.44% chance of breaking even or making a profit.
    The modified sharpe ratio can be thought of as a z score. The higher the number, the closer we are to achieving consistent profitability. In my case I want to be 99% sure of making a profit each month. So if I were to look it up in a normal distribution table I'd know the Z score I need is approx. 2.58 or a modified sharpe ratio of 2.58.

    We also know that the returns are not going to be normally distributed. There will be fat tails so whatever sharpe ratio we come up with, it will be higher than we should expect in normal trading. This is where using the modified sharpe ratio and non-correlated methods pays off. I don't have a way to measure directly the benefit of using non-correlated methods but I know it improves the smoothness of the equity curve. If I combine that with a high modified sharpe ratio I can have a high degree of confidence that my models will be consistently profitable.
     
    #61     Jun 18, 2004
  2. Why didn't anybody tell me about this thread? I am now on board, a little late but I am here. I got to read these pages now... bye.

    Michael B.
     
    #62     Jun 18, 2004
  3. acrary

    acrary

    Correlation cont'd.

    In this example I've taken our 3 models and applied the modified sharpe ratio in column F. I believe the normal method of computing the modified sharpe ratio is to use 36 periods. In this example I've only chosen to use 12 periods. If I used 30+ periods of the 65 total I'd have very little information to evaluate. I included the 36 period numbers in column G. As you can see the numbers in column F are all over the place. I think is because the sample size of 12 periods is too small to get reliable numbers. You can see it's much smoother in column G. In a sec. I'll post how I try to use most of the data and adjust it so we can get a feel for the overall modified sharpe ratio.
     
    #63     Jun 18, 2004
  4. 5/04 -15205 -27810 33990
    4/04 27490 94795 33985 = $156,270
    3/04 38405 48070 -3815
    ...
    ...

    Forgive me if I missed this, but looks like these are real $$$ trading results (as I spit out my beer and choke...) from your models?

    If they are, good job! :cool:

    And thanks for the interesting thread!
     
    #64     Jun 18, 2004
  5. acrary

    acrary

    Correlation cont'd.

    To come up with a single modified sharpe ratio what I've done is simply average all of the 12 period modified sharpe ratio's. In this way I've smoothed it and used most of the data so the results are more likely to represent what is going on. On this screen I've highlighted it as 1.44 in column F. In column G I've posted the average of the 36 period number. As you can see they are resonably close. What does 1.44 represent? It means we'd have to have a month that was more than 1.44 std. deviations away from the average before we'd expect to lose money. If we look it up as a z score we'd see 85.02%. So 85% of the time we'd expect to have a winning month. 85% of 65 months is 55 1/4 months, so we'd expect to see about 10 losing months. In our case we have only 7 losing months. I have no way to measure it but my guess is the other 3 months are improved by the 3 methods being non-correlated.
     
    • ave.gif
      File size:
      29.5 KB
      Views:
      1,830
    #65     Jun 18, 2004
  6. virgin

    virgin

    Acrary,



    Instead of using 3 different models on the same instrument

    you can also use 1 model on 3 different non-correlated instru-

    ments to getter smoother results...



    P.S. Hi Electric, the world is small...:p
    My brother doesn't have the files anymore, you should
    do a search on Google..
     
    #66     Jun 18, 2004
  7. virgin

    virgin

    The advantage of the other way around is that you only

    have to develop 1 good model....:cool:
     
    #67     Jun 18, 2004
  8. acrary

    acrary

    Yes, you can. If you do the tests and inspect the rolling correlations you can determine that the instruments are non-correlated. I do that for some markets with longer holding timeframes (mainly because the further out in length of trade you go the better a single trendfollowing system seems to work).
     
    #68     Jun 18, 2004
  9. virgin

    virgin

    Acrary,



    I believe we have to do some brainstorming together one day..

    Where you live in the States ?
     
    #69     Jun 18, 2004
  10. acrary

    acrary

    Correlation cont'd.

    With the one number I now have a way of doing comparisons. If I combine say model 1 and model 2 and run the same tests I'll get one result. If I combine model 2 and 3 I'll get another. And if I combine 1 and 3 still another. Then if I do many runs in which I weight each pass say 1 unit of model 1 and 2 units of model 2 I'll get more results. In the end what I found I had to do was develop a program to do all these passes. It weighs each model from 1 - 100 units and determines the optimal modified sharpe ratio. Then it determines the ratio between each of the methods to determine how much of each should be traded. If I have 4 models it'll do tests on all four of them, five, six, 10, 50, etc. All it takes is compute time. For 3 models it takes about 15 sec. for 30 it takes about 1 1/2 hours. If I choose to do all my models, I leave for a couple of days. In the end it gives me the optimal balance for the best modified sharpe ratio. For my trading I had to use 8 very good models to get the number up to 2.58 so that's why I trade against 8 models.

    In our 3 model example I ran my program and here were the results:

    combine model 1 & 2

    Best modified sharpe ratio 1.395 using 1 unit of model 2 to 1.5 units of model 1

    combine model 1 & 3

    Best modified sharpe ratio 1.666 using 1 unit of model 1 and 1.333 of model 3

    combine model 2 & 3

    Best modified sharpe ratio 1.057 using 1 unit of model 2 and 2.04 units of model 3

    combine model 1 & 2 & 3

    Best modified sharpe ratio 1.461 using 1 unit of model 2, 1.26 units of model 1, and 1.08 units of model 3

    From this test I can see I should be trading only models 1 and 3 in the ratio shown to achieve the maximum consistency. Adding model 2 actually reduces the consistency. At 1.66 I should see 90.3% of the months being winners. Not up to the 99% level but a definite improvement.

    If I had a fourth model I could do the same test and see if it should be included, and if so, what the optimal ratio should be.
    It might seem silly to use a lower profit factor, lower win %, and lower total profit model but I'll show the comparison and why I'd do it.
     
    #70     Jun 18, 2004
Thread Status:
Not open for further replies.