The fund bought back, and the villa is near the sea? Buying the bottom ten funds every year, can you earn so much? Python quantitative analysis tells you the answer [attached code]...

cf87d397edb94bf692229c8462ede9ec.jpeg

This is the sharing of Xing Buxing's 83rd Quantitative Lecture

Author | Xing Bubu, Mies Zinc Selenium

When the fund rankings are released at the end of each year, I believe many people will stare at the top-ranked star funds , but sneer at the bottom-ranked funds .

After all, in everyone's mind, the higher the fund's ranking, the better its follow-up performance . The bottom-ranked fund will naturally be eliminated by the fund company .

But is it true?

If I say that the income of buying the bottom ten funds every year is far higher than that of the top ten star funds , do you think I am talking nonsense?

Don't rush to refute. Next, I will use Python to quantify the fund rankings , and use the data to tell you how to look at the annual fund rankings.

01

Recap


In the previous article, we explained: if you buy the top ten star funds every year and hold them for the next year, you will win or lose in the long run.

3faba4f1cffdf88dc943249ce5e107ee.jpeg

Click on the picture to view the article

The final conclusion is shown in the figure below.

It shows the return of the top ten funds each year relative to the CSI 300 Index representing the broader market in the following year.

b2d69b3312041f05b181b4108d24c5d5.png

The relative return rate of the top ten funds in the next year

For example, it was 17% in 2012, that is, the average return of the top ten funds in 2012 in 2013 (9%), relative to the increase of the Shanghai and Shenzhen 300 Index (-8%) in that year, the excess return was 17% (17 % = 9 %-(-8%) ).

At first glance this payoff looks good. But looking at the earnings of all the years from 2008 to the present, you will find that this is not the case.

In 2008, the top ten funds underperformed the broader market by 64% in the following year, and the top ten funds from 2013 to 2016 also failed consecutively, underperforming the broader market . Overall, the top ten funds each year do not have an advantage over the broader market in the following year.

8ea1fb3213c682766ed85d3fc4ce1390.png

The top ten funds underperformed the market in a row for the next year

We also constructed an investment portfolio: Suppose you bought the Shanghai and Shenzhen 300 Index with 1 yuan in 2009. After more than ten years of ups and downs, you will have 2.54 yuan, which is the yellow curve in the figure below. To be honest, the return is not high .

17868cedad380afa2f937bbc97cbddec.png

But if you use this 1 yuan to buy the top ten star funds of the previous year and hold them for a year, as shown in the blue curve in the figure, it will eventually become 2.12 yuan, which is not even as good as the market.

This result is to remind everyone: when star funds are the hottest, you should not rush, rush, or rush to buy, and you should actively avoid them. Chasing high star funds is actually an important reason why many new entrants lose money.

For more details about star funds, you can read my article:

I buy the top ten celebrity funds every year. Will I earn or lose in the long run? Python tells you the answer [Xing can't]

At the end of the article, we also mentioned other ideas for buying funds:

c5906087f48f62dc5bde8357a154da99.png

Surprisingly, among the many ideas, the most popular idea is the performance of the bottom ten funds in the following year.

In order to satisfy everyone's curiosity, I went to run the data, looked at the results, and then I fell into deep thought. . .

96d62c032b21ef4e1d79c172c0d0f393.jpeg

So what was the result? Below we will explain in detail.

02

data collection

To know the performance of the last ten funds, we first need to obtain the relevant data of all funds.

You can choose a financial website like Tiantian Fund.com , which has relatively complete fund income data. The fly in the ointment is that the data cannot be downloaded directly for analysis.

If you can program, you can try to write a crawler to crawl fund data from the website and use it in Excel.

382696cc240102c1c6304fe887d2e6bf.png

Tiantian Fund website: fund.eastmoney.com

I extracted the fund data from the paid database. Relatively speaking, the fund list is more complete and the data accuracy is higher .

This data includes all the active equity-biased funds over the years , and excludes the newly listed funds of the year.

After opening, it is shown in the picture: the first column is the code of the fund ; the second column is the name and tenure time of the previous fund managers ; the third column is the annual rate of return of the fund from 2008 to 2021 .

8a38ece396a60f0af9ffcf3f24b126d2.png

The data includes all partial stock funds from 2008 to 2021, a total of 3216 , which is very comprehensive.

If you need this data, you can scan the QR code below or add me on WeChat xbx8662 , and I will send it to you directly.

1947519f719d947237defeef59e70582.png

03

Fund Statistics

Once you have the data, you can start to do fund analysis and statistics.

1

Statistics of last ten fund managers

d9139847c7f69262349f63757b884a33.png

Last Ten Fund Managers Over the Years

First of all, we are very embarrassed and listed the bottom ten fund managers over the years.

The names of some fund managers will appear repeatedly, which shows that several funds under his umbrella were ranked low at the same time.

In contrast to this list, let's look at the yields of the bottom ten funds each year.

224585e321af5fd9322a7203e7aa3bf6.png

This table is in one-to-one correspondence with the manager ranking table above

I have to say that these funds have fallen a lot .

If I buy them at this time, I will retreat because I am worried that they will continue to fall next year. After all, everyone is afraid that these funds will be liquidated directly in the second year .

2

Fund Liquidation

For this reason, I specially checked the existence of these products, and the result was beyond my expectation .

Except for one of the bottom ten funds in 2019 that was liquidated in 2020, the number of liquidations of these so-called precarious funds in the following year was basically zero .

90698b6ec2d38a5b0d956a033df3d98e.png

Liquidation of the last ten funds in the next year

And take a step back, even if the purchased fund is liquidated, all the assets will be realized and distributed to you , instead of losing everything like a stock delisting.

5235d444c11ca78634fc52be9587def7.png

Fund liquidation details

By this we can ensure that the bottom ten funds rarely wind up in the second year. This also greatly improves our confidence in buying .

Since the bottom ten funds will basically not be liquidated, what will their fund managers do?

3

Fund Manager Change

With such questions in mind, I sorted out the data on the changes of the bottom ten fund managers.

As shown in the figure below, the personnel turnover of the last ten funds in the current year or the following year is counted .

ee088c5db05fbcd98f6f392cf841665c.png

Fund Manager Change

For example, 6 of the bottom ten funds in 2011 directly changed their fund managers in that year.

In 2012, 7 of the bottom ten funds ranked in 2013 also underwent trade changes.

This also shows that the bottom ten funds often have a very high ratio of changing fund managers . It is enough to see the cruelty of the industry . Once the ranking is low, the fund manager will be demoted to cleaning.

But on the other hand, as investors , we should feel lucky .

b2ccadec349c183b8b169ed77719fc86.jpeg

Because a fund manager or foundation that stretches the hips affects the reputation of the entire company. At this time, the fund company will have great pressure and motivation to replace the fund manager .

Fund managers who are often appointed in times of crisis are relatively good, able to support the performance of the fund and be responsible to investors .

After understanding the basic information of these funds, let's take a look at the ranking performance of the bottom ten funds in the following year.

04

Next Year Ranking Performance

1

for example

We first arrange the funds according to their 2008 yields from low to high and take the top ten.

a3daf60c464185b78c41a7bd81ab4c4a.png

Then calculate the ranking of the top ten funds in 2008 in 2009.

As shown in the figure below, the bottom-ranked fund in 2008 still ranked low in 2009 . However, the penultimate and third funds ranked among the best in 2009 .

ab884a92cc5ce0a9fb73b6a872c51842.png

In 2008, the ranking of the top ten funds in the following year

Then we calculated that the average ranking of the last ten funds in 2009 was 83rd , ranking 31% of the 270 funds (83÷270=31%), which looks pretty good.

2

Next year's ranking

After getting the data of 2008, we can use the same method to get the ranking percentage of the next ten funds from 2009 to the next year .

Although EXCEL can also complete this step, but it is relatively cumbersome, we can use Python programming to calculate the results.

e1c28299bfd1958e7e58d33d3d81efef.png

If you need data and codes, you can scan the QR code below or add me on WeChat xbx8662 , all of which can be sent to you for free.

ab1da1110f3875c5bdd5fd32e6f9c5f9.png

The calculation result of the program is shown in the figure.

For example, the average ranking of the bottom ten funds in 2012 was 46% in 2013.

The best performance was in 2018, and the average ranking of the last ten funds in the following year was even as high as 24% .

3705f025d5af2dd63ec34efdb8186a8a.png

The ranking percentage of the top ten funds in the next year

Of course, there are also some years that are worrisome . For example, the ranking of the top ten funds in 2011 was 70% in the following year, 77% in 2019, and 78% in 2020.

4af4bfff59713ffa7715f5aa7a25d86b.png

year of dismal performance

But overall, after so many years, the average ranking is around 50% . It can be seen that the progress of the bottom ten funds in the following year is very obvious.

bf420cdb4f8370ed4c4c84b8b17e3c3f.png

The average performance ranking of the last ten funds in the next year

Of course, just looking at the rankings is not straightforward enough. Let’s look at the income of the next ten funds in the following year .

05

Earnings for the next year

1

for example

Similarly we take 2008 as an example.

First take out the bottom ten funds in 2008, and calculate their average rate of return in 2009 to be 77%.

1f1fda25dc7b1d929687098e2df2fe2c.png

We also use Python code to calculate the next year's income of the last ten funds in other years.

2830fe60b1bd87143843e956f72673b5.png

If you need data and codes, you can scan the QR code below or add me on WeChat xbx8662 , all of which can be sent to you for free.

5286c97b8228d826544db3a69089b4f8.png

The calculation result is shown in the figure.

For example, 17% in 2012 means that the average yield of the bottom ten funds in 2012 was 17% in 2013.

00ed6fe425c17d31e8910529af9de294.png

Returns of the last ten funds in the next year

Looking at the full picture, you can see that only 4 of the past 13 years did the bottom 10 funds lose money the following year.

Other years have been slightly profitable, and some have been quite profitable, such as 2008, 2014 and 2018.

bc455261fa194e0ae09913ffa012b645.png

Returns of the last ten funds in the next year

Of course, we all know that to evaluate a fund is not only based on its absolute return , but also on its relative return relative to the broader market .

2

The relative return of the last ten funds in the next year

The so-called relative return is to compare the fund's return with the rise and fall of the market in the same period , which is commonly known as how much it outperforms or underperforms the market .

For example, the last ten funds in 2008 rose by 77% in 2009, which looks very good on the surface. However, the Shanghai and Shenzhen 300 Index, which represented the broader market, rose by 93%, which means that it underperformed the broader market by 16% (77%-93%=16%) in 2009 .

c0ae8c38ddf4c357e296abd5ff222e1b.png

Relative Yield Calculation

We have calculated the relative returns of the last ten funds in the following year , and the specific results are shown in the figure:

d18b8497c907b56e959df1c13f36681d.png

Statistics on the relative return rate of the next ten funds in the current year

It can be seen that the bottom ten funds in 2013 underperformed the market by 22% in the following year. The best performance in 2014 outperformed the market by 41%.

Generally speaking, in the past 13 years, it has underperformed the market in 5 years and outperformed the market in 7 years , which looks good.

Based on the above statistical results, we can even try to construct a trading strategy to see how the bottom ten funds will perform in the long term.

06

How about buying the Post Ten Foundation every year?

Assuming that we initially have 1 yuan, at the beginning of each year, we buy the top ten funds ranked last year on average at the beginning of each year, sell all of them after one year of holding, and buy new bottom ten funds according to the new ranking, and so on .

Finally, calculate the accumulated rate of return for the last ten years of holding the fund .

720d570049684a0315db8d4de3bca98e.png

In view of the complex calculation of this strategy, we still use Python programming to implement it.

23c4b53884a46625dd559c209bcd745f.png

If you need data and codes, you can scan the QR code below or add me on WeChat xbx8662 , all of which can be sent to you for free.

672fa85533256496dfac6656f64e7281.png

The result of running the code is shown in the figure below:

c7ce2f57539abb08591af9d24060057e.png

Backtest results


The blue curve is the final return we get after buying the last ten funds every year. It has changed from the initial 1 yuan to the current 4.56 yuan.

The orange curve is the trend chart of the CSI 300 Index, which has increased by about 2.54 times.

So we were surprised to find that the last ten fund portfolios actually outperformed the CSI 300 Index representing the broader market by a large margin .

And looking at the top ten fund portfolios represented by the green curve, none of them even outperformed the broader market .

73bfa2a2d326d5af50a2e1b52c569bd1.gif

So next time when the annual fund ranking comes out, don't rush to eat the melons of the bottom ten funds, and don't keep staring at the big names at the top.

After all, judging from historical data, the bottom ten funds performed better than the top ten funds in the following year .

07

Fund Ranking In-Depth Research

In view of the above research, some people may think that the number of samples is too small to only look at the top ten and bottom ten , and there will be a certain degree of chance.

Next, we will further verify the relevant conclusions through a comparative academic statistical analysis .

1

group backtest

Every year, we sort the funds according to their returns from high to low and divide them into five groups .

The funds with the highest 20% returns are divided into the first group, those with returns ranked between 20% and 40% are the second group, and so on.

After grouping, we treat each group of funds as an investment portfolio, buy all the corresponding funds at the beginning of the next year and hold them for one year, and so on.

The final result is shown in the figure below:

148d4d1a4ccce50d6b17a1babc21df0f.png

Fund ranking group backtest (2009-2021)

Taking 80% - 100% as an example, that is, assuming that starting from 2009 with 1 yuan, the average position is bought at the beginning of each year of the fund ranked 80% -100% last year, and the position is adjusted after holding for one year, and the final result is 4.72 yuan.

In the same way, each column in the figure measures the long-term comprehensive performance of its corresponding ranked funds .

Observing the data, we can find a very interesting phenomenon: except for 60% - 80% of other fund portfolios, the lower the ranking, the higher the return.

eed230a1bbde8d55db817da2619e7296.png

During the same period, the Shanghai and Shenzhen 300 Index changed from 1 to 2.54

For example, the return of 80% - 100% fund portfolio is 4.72, which is the group with the highest return ; the return of the top 20% fund group is the lowest , which is 4.02.

Based on this, we can initially draw an overall conclusion:

21cc02f62b74ebe75dbc11c04995fa93.png

In addition, there is an interesting conclusion in the group statistics. Students who have found it can scan the QR code below or add me on WeChat xbx8662 to communicate.

41026d357e6be934ac9ddbcd9ee4d056.png

2

Cause tracing

If we delve deeper, in fact, there are corresponding theoretical support for the outstanding performance of the funds that ranked lower in the year and the next year .

One of the more important reasons is that the market style will continue to change . For example, blue chips performed well last year, but this year may be the rise of small and medium-cap stocks. It is difficult for a fund manager to step on the right track continuously amid sudden changes in market style , but it is also impossible for a fund manager to keep stepping on the wrong track.

In addition, the scale of funds ranked lower will generally shrink , which is conducive to the operation of fund managers.

As mentioned earlier, when a certain fund under its umbrella performs poorly, the entire fund company will have the motivation and pressure to replace it with a better fund manager to back it up .

2a9a521e55d60ab112004e86b79818bd.png

Other reasons are not listed one by one. If you know, you can scan the QR code below or add me on WeChat xbx8662 to communicate.

7a32787a290b0a619c35c185845b6561.png

08

new direction

So far, we have used two articles to fully understand how the ranking of the fund in the current year affects the performance of the next year .

In addition, there are many directions worthy of our research.

For example, from the perspective of a fund manager , it only depends on whether the income ranking in the past year is objective, and what will happen if it is extended to 3 or 5 years.

Or we can also observe how the top ten funds of different sizes perform in the following year.

580827775a96a748f95d26d44b90eb43.png

The above-mentioned questions are all very good directions for exploring funds. After you get the data and code, you can play with it yourself, choose an interesting angle to conduct research, and use Python programming to verify it . You can also add me on WeChat xbx8662 to discuss with me.

If the article in this issue exceeds 100 likes, we will write another article soon to explain more good ideas for choosing funds.

In the final analysis, we speak with data.

09

postscript

At the end of the article, I would like to share with you some experience in quantitative investment.

Many people ask me how Xiaobai started to learn quantitative investment, and what books can I recommend.

My suggestion is never to look for this book directly.

If you read a programming book, you will finish typing "Hello World"; if you read a math book, you will fall asleep when you see the formula on page 7.

ddb8f8a3ab5eed1d09cdb43929b54cff.jpeg

A better way to learn is to do actual projects and learn quantitative strategies in practice.

Research reports are good quantitative practice projects.

A research report is a strategy. The authors are highly educated securities analysts with an annual salary of one million. All you have to do is to understand the strategy research report and implement it with code.

7138aece66cd42af3808068bffde398e.jpeg

During this period, learn what you don’t know, what you don’t know, and learn with a problem-solving mentality, which will get twice the result with half the effort.

Read 300 Tang poems by heart, even if you don't know how to compose poems, you can also recite them.

33876a88ba7dc17dd0689e9cf069d395.jpeg

So where can I get the research report?

You can add my WeChat, I have tens of thousands of research reports by category, and they will be updated in real time.

I will distinguish the difficulty and send it to you after selection.

0cd3a2ff69b925324bb334c3a945e6ca.jpeg

After adding me on WeChat xbx 8662 , you can also exchange questions about quantitative investment . I am busy and reply slowly, but I will reply to everything I see.

Have a happy chat, have a good chat, and a lot of quantitative data and information can be given to you .

You can also look through the content of my circle of friends , a lot of quantitative dry goods . Some content that will not be published publicly will be said in the circle of friends.

bb9842e70f1da528eb499f17c1d70323.jpeg

contact author

e3e87fb90462c398ef73fa12fd1241d5.png

Guess you like

Origin blog.csdn.net/likun557/article/details/129187648