Pairs Trading Workshop conducted at IIT-Kanpur by ALPHABETA
Benefits of back-testing to analyze stocks for investment
How many of you remember, back in the days when we looked into the newspapers to get quotes of stocks, then pore over rows and rows of data on the newsprint, debate with friends, family and colleagues and then try and reach a consensus on which script to invest in? One fine day came CNBC, where they started broadcasting real time stock prices on their channel and the faithful went mad with joy! Slowly and steadily, as we moved into the digital age, different brokerage houses evolved over the course of time and started providing different types of real time market information - stock alerts, news flashes, etc. and their customers couldn’t be more hooked.
Times have changed, so must data processing
Even as much as 20 years ago, data availability was tough but now there is an explosion of data. There are so many details available on all listed companies, that processing the same into anything meaningful is slowly reaching beyond the capability of even an excel sheet. By the time one manages to complete an analysis on say, 10 stocks, which may take a week or two, to arrive at an intrinsic value, we would have to reconsider the valuation with new and updated data again at the time of purchase.Information being just a click away has actually turned into a major concern today, if one has to glean anything meaningful out of it in a timely manner. The data available is mainly unstructured or semi-structured. For quick results, we need coding to process and extract useful insights from it to make smarter trading choices.
Do you listen to music? Of course, yes. If you have tried JIO Saavn, it compiles music from all over the world but still manages to provide recommendations of your choice of songs. Astonished? Don’t be, because you must have played a few songs as per your liking and the platform has smart capabilities to mine the data and understand the taste of its customers. In a similar manner, Myntra, Amazon, Youtube and many more identify their customer’s behavior by understanding the patterns from their data inputs (browsing history, clicks, etc.) In the same manner, coding can help us process this vast amount of data available for making trade decisions as well
Are structured databases and back-testing a monopoly of Institutional Investors?
Online databases for almost all listed companies are available and accessible today, with many brokerage houses giving them as an add-on feature with their subscription. What most investors do is to go through the stock picks recommended by their broker(s), deploy ready to use past charts available on their platform and validate the strategy against them. The human brain is extremely good and creative at finding patterns, so once they find a similar pattern, they take a trading decision. However, to invest prudently over time, just finding patterns on past charts is not enough. It is important to understand how and why a given strategy works and performs under specific conditions.
The below figure shows the statistics provided by the ALPHABETA platform, that provides enough information to validate or discard the strategy as per back-testing results. Even small retail investors can use platforms like this for their own analysis. Strategy back-testing is no longer a luxury they cannot afford.
As an investor we have two options – Go with our feelings and most likely fall prey to human biases which cause more harm than good. Or systematically test out the historical evidence and then follow the strategy/ model with discipline and constant tracking. Quantitative investment strategies are just that - all about following rules. As a sportsman, you can enhance your skills by practicing more. The same rule applies to investing as well. However, just spending hours staring at charts and account statements will not give you a sudden correct perspective on stock picking. One has to systematically back-test and given strategy or model.
Importance of Back-testing:
Back-testing is a way to evaluate and optimize a given trading strategy/model before implementing it in real-time. Based on the assumption that past performance predicts future performance, the notion is that if a strategy would have worked in the past will probably work in the future and vice versa. This is one of the foundations of Algorithm (Algo) trading. There are many tools and platforms available in the market today that help investors back-test stock data. One doesn’t necessarily need to be a software engineer to be able to do so!
ALPHABETA Guide is one such platform that allows for back-testing NSE-100 stocks going back 8 years. Switching from one time frame to another is easy and quick and anyone can back-test the risk and profitability of a strategy before investing actual capital in the real market. The virtual portfolio mode of the App allows one to track and manage a portfolio on a daily basis and compare performance with a benchmark.
The best part about back-testing is that it saves money and helps an investor learn from mistakes without the threat of losing real money. Back-testing also ensures whether stated goals are met or not, and if not met, what could be the reasons. It helps in understanding the minute details of any strategy, such as when to enter and exit, how much capital should be allocated, and so on.
Evaluating and understanding back-testing results
The ability to interpret the results of back-testing and evaluating them properly is important as well. There is a need to look at a variety of things – not just beating a given benchmark or achieving high returns. The winning percentage, number of trades making profit or loss, identifying the conditions and filtering the variables which can improve profitability are some pointers to look into in detail. All types of market conditions should be used in back-testing such as flat markets, volatile markets, downtrends and uptrends, as it is important to correlate and annotate market conditions to each trade which will enrich the statistical analysis and further refine a given strategy.
If we want to try and forecast the market 6-months from now? A more fair approach would be to ask and understand what happened 12-months ago. Ignore the noise of the crowd and follow your own investing methodology. We can do this by back-testing with a 12-month old snapshot of any model that you are following.
Whether you are an investor who is new to the markets or some one who has seen the cycles, it is always prudent to invest money based on a disciplined approach. Validation and cross validation of model are important to get robust results. History always repeats itself...
“There is no better teacher than history in determining the future… There are answers worth billions of dollars in a $30 history book.” – Charles T. MungerComments