Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the restrict-user-access domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home1/portfol1/public_html/wp/wp-includes/functions.php on line 6114

Deprecated: Class Jetpack_Geo_Location is deprecated since version 14.3 with no alternative available. in /home1/portfol1/public_html/wp/wp-includes/functions.php on line 6114

Deprecated: preg_split(): Passing null to parameter #3 ($limit) of type int is deprecated in /home1/portfol1/public_html/wp/wp-content/plugins/add-meta-tags/metadata/amt_basic.php on line 118
performance | Portfolio Yoga

Judging a Fund

One of the often repeated statements I hear is about Distributors advising clients to stick to the funds even though the fund may have under-performed for 2 – 3 or even 5 years (rare but have heard that number). The essence though is that if you stick long enough, who knows, even the tortoise may cross the finishing line (remember, goal has shifted from winning to completing).

I would actually have agreed with the waiting period if some one came up with evidence on why it makes sense to wait for X years in a fund that is under-performing but before we go further, lets first try and understand how performance is measured.

Basically there are two ways to measure performance

  1. Relative Performance: Here, you compare the performance of a fund with its peers. For instance, if you are a investor in say HDFC Top 200, you will likely compare the fund against funds such as Franklin India Bluechip Fund / Birla Sun Life Frontline Equity Fund
  2. Comparing against the Benchmark Index

In Relative Performance, the key is whether the fund one is invested in remains in the top quartile for the maximum period of time. This check ensures that you are with a fund whose fund manager has showcased the ability to deliver the goods.

The second way of measuring performance is by comparing its returns against the Benchmark Index. Any additional returns generated here without adding for Risk is known as Alpha though you will need to make certain that the performance has been delivered without actually investing big time in stocks which are in no way associated with the Benchmark under consideration.

The reason I say this is because, fund managers (especially of Sector funds) have shown how they achieved out-performance by investing in sectors which are no way connected with the core sector the fund is named after.

While you may argue, any out performance is good, the point that gets missed is that the performance may be more due to Luck and less the skill of the fund manager. But I am digressing

Lets start with what happens when funds start under performing for long (3 years by my score is a long time indeed). If you have a housing loan, you will know that all other factors being the same, a small hike in interest rate can extend the term of your loan by years.

When funds you have invested under perform, they impact in terms of how fast you can achieve your financial goals. Remember, the whole concept of Retiring at X years or ability to fund children’s education is based on the assumption that investment in MF’s (which can be a big part of one’s portfolio) yield a certain return. Take out a percentage or two and you will find yourself either having to commit more per month or worse finding it too late that more sacrifices would be necessary to achieve the goals outlined years earlier.

And as much as its true that on the long term, you can get better returns by just sipping regardless of what is happening in the real world, do note that blind investing can only return you average returns (and many a time even worse) which you could have well achieved without having to take the risks that come with the market.

And finally, the fund manager is paid big bucks to get you the extra returns since you can always perform in line with the Indices by buying a cheap ETF (Nifty Bees on Nifty 50 for example).

 

 

Trading System Performance – Skill or Luck

So, you have finally devised your trading system which seems to have produced good returns in the back-testing you have conducted and is ready for trading with real money. Pat yourself on the back since regardless of what happens next, you have taken a step towards being a better trader by using a rule based strategy than implementing a discretionary strategy where every rule has a exception and every failure is easily rationalized.

By accepting that we have our limitations which can prevent us from succeeding in markets, we are able to make our trading more process driven and one where mistakes aren’t rationalized but seen through the eyes of it being either a part of the system or the failure of the system. Either way, the results showcase how good or bad your system is (assuming you take every trade and do not try to over-ride your own system).

While a back-test is a good way to analyze as to whether the system has any merit or not, it is not the end of testing but actually the beginning. It is said that if you were to give typewriters to monkeys, its just a matter of time before one of them hits all the right keys and gets you a Shakespeare’s plays in order.

Or as the character Dr.Alfred Lanning in the film I, Robot says “Random segments of code, that have grouped together to form unexpected protocols”. If one keeps testing ideas, especially using optimization feature, one is bound to hit the right system. Its just a matter of time.

The question hence is, is the system performance due to Skill or pure Luck. A system that is based on some skill or market  inefficiency. A system that is based on luck is one where in the streak of profits is just purely driven by luck and its just a matter of time before the said system starts misbehaving.

So, how does one determine whether the profits that are shown in the back-test is due to it being inherently good or just a matter of luck.

There are a few ways to analyze that and I shall lay out a few of them out here. To start with, let me choose a system which will be used for the testing.

The system that I shall use for the test below is a EMA Crossover. To get the two parameters, I ran through a Walk Forward Optimization which finally gave me the 2 variables I was after.

Now that the main requirement is fulfilled, lets move onto what are the ways by which you can detect whether the performance of your system is more based on luck than skill.

The first thing to do is to test your system on other time frames / markets. No single system performs exceptionally well in all time frames / markets and hence if you are looking for a 100% score, you are bound to be disappointed. What we are looking instead is performance that is well within limits.

Lets take the EMA Cross system that we have now created. The testing was done on Daily time frame. Lets compare this to Hourly as well as Weekly and see how different the numbers will be. To keeps things simple and as well as have a standard format, we shall use Expectancy as the parameter to judge. Time frame of the Test is from 1st Jan 2010 to 1st Jan 2015.

Other test settings are

  • We trade on Close Value
  • No Commissions or slippage is included.
  • We do not compound our position size
  • We take both Long & Short trades (Always in the trade)

We shall first test the system on the Daily time frame. While the optimization was done on CNX Nifty (Spot), we shall see how the system fares on other Indices

Index Time Frame Expectancy
©Portfolio Yoga
Nifty-F1 Daily 25.84
Bank Nifty F1 Daily 212.42
CNX Auto Daily 87.64
CNX Commodites Daily 10.83
CNX Consumption Daily 16.04
CNX Energy Daily -28.55
CNX Finance Daily 95.2
CNX FMCG Daily 82.34
CNX Infra Daily 21.56
CNX IT Daily 22.04
CNX Media Daily 24.48
CNX Metal Daily 28.9
CNX MidCap Daily 255.5
CNX MNC Daily 52.34
CNX Pharma Daily 4.87
CNX PSE Daily 57.34
CNX PSU Bank Daily 98.52
CNX Realty Daily 5.45
CNX Service Daily 23.82
CNX Small Cap Daily 98.66

The system is profitable in most indices save for CNX Energy where it saw a loss. This is good since it indicates that the system is not curve fitted to Nifty.

We shall now move to testing the system on hourly data.

Index Time Frame Expectancy
©Portfolio Yoga
Nifty-F1 Hourly 7.07
Bank Nifty F1 Hourly 17.9
Reliance Hourly 0.87
State Bank of India Hourly 1.09
ICICI Bank Hourly 0.21
Tata Motors Hourly 0.89
ITC Hourly -0.24

 

 

Once again the system trumps (though if you were to observe closely, expectancy is in dangerous area for stocks such as ICICI Bank & Reliance while it out right loses money on ITC.

While we cannot decide based on above data as to whether the system is good or not, what it does show is that there is some amount of skill and its not entirely due to luck.

We next move back to Nifty F1 on Daily time frame and test the result using the Bootstrap method as well as Monte Carlo Testing.

The p-value using Bootstrap for Nifty F1 (Daily) comes to 0.55 which is way above the null value requirement of 0.05 to reject the thesis that the results seen above are based on random luck. In fact, the 0.55 number indicates that 55% of the result probability is just due to random luck and no more. This is pretty damming evidence of the fact that while our system seems to perform great, it actually is nothing more than a lucky streak.

Lets move forward and test our hypothesis using Monte Carlo Analysis. Once again, we are looking at the whether our result is based upon blind luck or is there something worth while.

Before we get into Equity Curves, lets compare and contrast a few other details.

In our regular back-test, we get a max draw-down of 19.70%. In contrast, the 95 percentile says that the probability is high that we may see a draw-down as high as 60%.

In our regular back-test we see a maximum losing steak of 7 trades while in the Monte Carlo approach, the figure comes to 20

And finally, lets look at  the various ways in which our equity curve could have been plotted. We ran a total of 10000 stimulations and as expected, chart is messy. But what is does show is the high probability (test of the lower line) of the system losing more than 50% of capital and hence running out of capital.

Eq

But should we be surprised with the answer that this system is not suitable for trading since far too many trades hinge on luck than actual skill?

Too many traders believe that one can come up with great system by just optimizing data. If only life was that simple, we would all be chilling out in our favorite place while the system kept earning for us without a sweat 🙂

 

Oracle of Omaha on outperforming the Index

Nearly a month back, I wrote about how one way to Analyze how good a system is, is by comparing the returns to Buy & Hold returns (Measuring Performance). Its hence nice to see similar thoughts echoed by the Oracle of Omaha in his 2013 Annual Report  

Image

 

While Buffett writes his thought based on he being a fund manager, if you are running money, you are your own fund manager and the benchmark to beat would be the Index returns regardless of the methods you use. 

Measuring Performance

We measure, compare and contrast when it comes to a lot of things but one thing that I find amusing in a way is that the same rigor is not applied when it comes to understanding and shifting between good and ordinary trading systems.
 
Whether we wish to buy a Laptop or a Mobile or even a Car, we try to compare between the options present and select the one best suited for our requirements. But when it comes to strategies, too many are happy with something that works regardless of the fact that one may actually have made more money by just buying and sitting tight.
 
Too many traders / investors out in the real world care more for the thrill of trading than for actual returns. As one broker said in a interview and I quote ““Every month, your trading ‘fund’ gets replenished by your salary,”. When you aren’t there for the money, it doesn’t matter whether you outperform or under-perform as long as you get the thrill of trading.
 
But then again, there are many serious traders / investors out there trying to find ways to consistently beat market retursn without having to assume risks higher than what the markets showcase.
 
The primary belief that is needed to invest in the markets is the belief that the Index (country) shall continue to grow and stocks shall perform leading to returns that are better than what is available elsewhere (Fixed Deposit for instance). This is especially true for Buy & Hope investors since they need a market that is going up over a long duration of time rather than try and replicate the performance of Nikkei 🙂
 
Buy & Hold is the easiest way to take part in the market. Choosing stocks is not as easy as that though since a lot of parameters have to be looked into before buying today’s blue-chip lest it turn out to be tomorrow’s bust chip. A easier way is to instead buy funds / ETF’s that track the Index. 
 
With most Indices being well managed (read that as including performers and dropping under performers / dud companies), the risk of loosing on the long term is significantly low. The biggest advantage in such a strategy is that you need not track the markets on a daily basis or even weekly and still be able to perform inline with the market (both on the upside and the downside). 
 
While the strategy looks great in rising / bullish markets, when the markets get into extended periods of bearishness / range territory, one would not outperform the savings account interest let alone other benchmarks.
 
To overcome that deficiency, one needs to have an active trading strategy (active doesn’t have to mean intra-day trading or even end of day trading. Even a weekly / monthly trading strategy can be a active strategy). 
 
There are various statistical ways to verify as to how good or bad the system is, but to me the simplest way to measure how good a system is (especially one that is used for trading the Index) is to see whether it has performed Buy & Hope returns. After all, there has to be something for the amount of time and effort we make and if we cannot even beat B&H, we may well just Buy, sit tight and hope that we shall eventually come out as a winner.
 
The benchmark idea is widely prevalent in the Mutual Fund industry as every fund is bench-marked against a Index which it hopes to outperform on the medium to long term. Without such a performance, a Do-it-Yourself passive investor will easily make more without having to pay anyone to manage his funds.
 
So, the next time you find some incredible strategy on the Internet, take a step back and check whether the incredible returns beat market returns or does it fall apart on a deeper investigation.

Performance of Markets in the months prior to National Elections (India)

With Elections due in May (unless early elections are called for), I look at how the markets have behaved prior to previous elections. Have used BSE Sensex returns for the computation. Election month performance is the performance of the market during the month of the election (results may or may not have been out in the same month).

Image 

NSE Sector Performances over multiple periods

How have various sector indices fared over recent times:

1 Month Performance

Ticker

Prev. price

Price

% Change

CNX IT

6474.25

7858.35

21.38%

CNX Pharma

6880.95

7036.1

2.25%

CNX FMCG

16938.75

17148.15

1.24%

CNX Consumption

2432.45

2428.35

-0.17%

CNX Service

7006.6

6857.1

-2.13%

CNX Media

1678.15

1637.65

-2.41%

CNX Nifty

5857.55

5677.9

-3.07%

CNX 100

5768.3

5545.85

-3.86%

CNX AUTO

4589.35

4390.35

-4.34%

CNX MNC

5707.5

5457.7

-4.38%

CNX 200

2932.5

2794.8

-4.70%

CNX 500

4542.8

4314.95

-5.02%

CNX Energy

8048.55

7502.85

-6.78%

CNX Nifty Junior

11808.05

10837.5

-8.22%

CNX Infra

2310.6

2095.9

-9.29%

Midcap – Nifty 50

1933.3

1746.35

-9.67%

CNX Dividend Oppt

1623.8

1463.1

-9.90%

CNX Midcap

7467.8

6702.2

-10.25%

CNX Commodities

2159.5

1913.6

-11.39%

CNX Finance

4874.4

4294.75

-11.89%

CNX Smallcap

2964.95

2584.4

-12.83%

BANK Nifty

11614.25

9997.8

-13.92%

CNX PSE

2726.55

2312.9

-15.17%

CNX Metal

1987.6

1639.05

-17.54%

CNX PSU Bank

2793.75

2222.7

-20.44%

CNX Realty

198.6

153.75

-22.58%

 

3 Months Performance

Ticker

Prev. price

Price

% Change

CNX IT

6205.9

7858.35

26.63%

CNX Pharma

6574.55

7036.1

7.02%

CNX FMCG

16988.4

17148.15

0.94%

CNX Consumption

2418.2

2428.35

0.42%

CNX Nifty

5999.35

5677.9

-5.36%

CNX Media

1732.7

1637.65

-5.49%

CNX AUTO

4647.7

4390.35

-5.54%

CNX Service

7276.6

6857.1

-5.77%

CNX MNC

5803.2

5457.7

-5.95%

CNX 100

5917.35

5545.85

-6.28%

CNX Energy

8024.85

7502.85

-6.50%

CNX 200

3023.15

2794.8

-7.55%

CNX 500

4695.05

4314.95

-8.10%

CNX Nifty Junior

12223.3

10837.5

-11.34%

CNX Dividend Oppt

1707.8

1463.1

-14.33%

CNX Infra

2469.1

2095.9

-15.11%

CNX Midcap

7913.1

6702.2

-15.30%

CNX Commodities

2289.65

1913.6

-16.42%

CNX Finance

5196.95

4294.75

-17.36%

Midcap – Nifty 50

2123.2

1746.35

-17.75%

CNX Smallcap

3255.95

2584.4

-20.63%

CNX PSE

2937.7

2312.9

-21.27%

BANK Nifty

12709.95

9997.8

-21.34%

CNX Metal

2200.4

1639.05

-25.51%

CNX PSU Bank

3333.3

2222.7

-33.32%

CNX Realty

244.45

153.75

-37.10%

 

1 Year Performance

Ticker

Prev. price

Price

% Change

CNX IT

5670.4

7858.35

38.59%

CNX FMCG

13036.75

17148.15

31.54%

CNX Pharma

5468.4

7036.1

28.67%

CNX Media

1333.35

1637.65

22.82%

CNX AUTO

3804.1

4390.35

15.41%

CNX Service

6207.1

6857.1

10.47%

CNX Nifty

5227.75

5677.9

8.61%

CNX 100

5119.45

5545.85

8.33%

CNX Nifty Junior

10135.45

10837.5

6.93%

CNX 200

2639

2794.8

5.90%

CNX 500

4138.9

4314.95

4.25%

CNX MNC

5311.7

5457.7

2.75%

CNX Energy

7508.7

7502.85

-0.08%

BANK Nifty

10379.6

9997.8

-3.68%

CNX Dividend Oppt

1522.65

1463.1

-3.91%

CNX Midcap

7255.9

6702.2

-7.63%

CNX Infra

2376.2

2095.9

-11.80%

Midcap – Nifty 50

2094.05

1746.35

-16.60%

CNX PSE

2890.4

2312.9

-19.98%

CNX Smallcap

3255.3

2584.4

-20.61%

CNX PSU Bank

2965.7

2222.7

-25.05%

CNX Realty

219.4

153.75

-29.92%

CNX Metal

2757.25

1639.05

-40.55%