Market Risk Neutral Strategies : Modeling and Algorithmization

Traditional “buy & hold” strategies in the stock market are effective within the established trend direction. Under condition of the absence of directional dynamics of stock market indicators the efficiency of such strategies is low. Traditional strategies do not entirely exclude the market risk and the risk of an incorrect choice of the moment to open or close positions, and require a lot of experience with financial instruments. This causes the need of the development of investment alternatives that can provide an adequate rate of return on investment regardless of the stock market indicators movement. The development of automated trading systems (trading robots) in the 2010 is supposed to make market risk neutral strategies available to be used by the wide range of investors. The aim of this paper is to study and develop the market risk neutral strategies to manage the investment capital on the stock market. As a result of the research the algorithm of the pairs trading investment strategy was developed, which is effective regardless of the direction of market assets movement. Long-term pairs trading allow to take into account fundamental factors, as well as to hedge market risks. Such an algorithm is able to provide an adequate level of return on investment.


Introduction
Stocks and securities market professionals trade under conditions of uncertainties and risks.That is the reason why many investors tend to make profits in this stock market using different investment strategies.The history of market-neutral strategies research has only a few decades.Development of market-neutral strategies started with the CAPM (CAPM stands for the Capital Asset Pricing Model), developed in the 60s of the 20 th century (French, 2003), (Cheremushkin, 2009).Nevertheless, given the complexity of the analytical calculation of the indicators used for the formation of market risk neutral portfolios, as well as weak development of algorithmic trading tools, until the end of the 90s these strategies remained confined to individual traders and analysts (Whistler, 2004).
In the 2000s, due to the steady uptrend in global equity markets, despite the availability of the necessary technological capacity, investment products based on market neutrality also evolved slowly and are often limited to use within small circles theoretically savvy enthusiasts.However, in the 2010s, after the development of automated trading systems (trading robots), based on algorithmic strategies, it is fair to expect an accelerating dissemination of strategies based on market neutrality (Serebrennikov, 2011), (Pravduk, 2011), (Pravduk, 2011), (Vidyamurthy, 2004).
The stock market has historically characterized by several fairly stable phases limited in time that can be called in general terms the growth period, a period of decline and a period of high volatility.(Tobin, 1965) For example, in the analysis of the U.S. stock chart indicator S&P 500 it is a clear upward trend, which lasted from 2003 to 2007-a period of growth.It was preceded, on the contrary, by the down trend, the signs of which appeared in 1999-a period of decline.Since 2010, the situation does not look so clear.(Standard & Poor's, 2014) On the one hand, the growth of stock markets is contributed by liquidity inflows, provided within programs of stimulation the economy by the world's leading central banks.On the other, the set of global macroeconomic risk does not allow this growth to become stronger.The period 2010-2012 is supposed to be a period of high volatility.
Referring to the Russian stock market, it is easy to note that during the period January 2010-August 2012 the graph of the MICEX index had 15 medium-term trend.That means that the trend has changed its direction 15 times which determines the increased volatility during this period.At the same time, in August 2012, the index was at the level of January 2010.(MICEX, 2014) This example analysis shows that the effectiveness of passive investment in Russian equities according to the procedure "buy & hold" during the period mentioned above was factually zero.
In this regard, an excess of market risk can be stated, which limits the range of effective strategies for investing in stocks and leads investors to move to safer assets.
Undoubtedly, market risks can be minimized by applying a speculative strategy which involves: purchase of shares with beta more than 1 in the early days of growing micro trend, profit-taking near the extremes on the graph, then the acquisition of securities with beta less than 1, the output in the money or open short positions in the early days of the downward micro trend.Thus, theoretically, the investor's securities portfolio will always outperform the market index and to have a positive trend in the long term.However, this approach is not entirely exclude the market risk, the risk of an incorrect choice of the moment to open or close positions, and requires a lot of experience with financial instruments, possession of tools for technical and fundamental analysis and the availability of sufficient time to manage the individual account and to analyze financial instruments.
Given the complexity and riskiness of speculative strategies as well as the ineffectiveness of passive strategies "buy & hold" in periods of high volatility, it seems reasonable to pay special attention to minimize market risk.In the meantime, the specificity of the financial service market now is that the investment and asset management companies are supposed to offer such decisions to customers that would not require significant time and effort.Investment decision to meet the above requirements may be modeling market-neutral strategies, which means portfolios of securities whose value changes, regardless of market movements and thus relieved of market risk (Figure 1).
In view of the above, it seems very relevant to create and study the algorithms for simulation of market-neutral strategies based on techniques of formation of market-neutral strategies for the Russian market investment instruments.

Materials and Methods
The idea of market neutral strategy is to perform in a steady manner regardless of whether the market goes up or down, in good times and bad.(Vidyamurthy, 2004) The essence of the simplest market-neutral strategy is to select a portfolio of assets, which beta is equal to or close to zero.To provide this it is sufficient to include the investment instruments with positive and negative beta.Another way is to purchase a long one and a short sale of other assets.It is worth mentioning that the results are typically achieved with a lower volatility.
The introduction of CAPM has influenced a lot on the market portfolio model.The CAPM is based on the concept of beta which is the measure of risk associated with general market movements.Along with the idea of beta, CAPM also served to formalize the notion of a market portfolio.A market portfolio in CAPM terms is a portfolio of assets that acts as a proxy for the market.Although practical versions of market portfolios in the form of market averages were already prevalent at the time the theory was proposed, CAPM definitely served to underscore the significance of these market averages.(Vidyamurthy, 2004) CAPM concept is based on the portfolio model and beta as the only measure of expected market risk.The required asset rate of return in CAPM concept is presented as a sum of two rate of return components -non-diversifiable (systematic or market) risk factor (represented by beta) and the residual (nonsystematic) component: where r p : return on the asset, As is well-known from the definition, beta is the factor calculated for a security or a portfolio of securities and demonstrates the variability of securities (portfolio) yield, depending on the variability of the benchmark (usually an index, calculated by the Stock Exchange).A positive value of beta coefficient refers to the share of asset growth in benchmark growth.A negative value indicates how the asset will rise in price by decreasing the index unit and vice versa.Thus, bringing the beta coefficient to zero allows to achieve the effect, in which the variability of the portfolio is not related to market volatility.(Blume, 1975), (Levy, 1971) According with the latter statement, portfolios whose beta is zero are referred as market neutral portfolios.
Whicn means the numerator of the beta calculation formula strategies are strategies that are neutral to market returns, that is, the return from the strategy is uncorrelated with the market return.(Vidyamurthy, 2004).
The simplest model of market-neutral strategy should not assume an active portfolio management.Thus it needs to exclude the possibility of changing the fundamental valuation of assets capable of significant impact on their beta.In this regard, the related assets are selected to form the portfolio: a futures contract on RTS index and the futures contract on RTS Volatility Index (RTSVX).(Moscow Stock Exchange, 2014) Beta coefficient for RTSVX is (-1.0877), which means that the RTS index growth by 1% leads to a reduction RTSVX to 1.0877%.
To achieve beta neutrality conditions for the simulated portfolio it is necessary to determine weights for the instruments it is composed of.Coefficients are calculated as follows: where x, y: weighting coefficients for the RTS and RTSVX respectively.
After having solved the system of equations, we obtain the distribution of shares in the portfolio: 52.1%: RTS; 47.9%: RTSVX.

Figure 2. Comparison of the relative dynamics of investment portfolios
Beta ratio of the formed portfolio is 0.0012.Thus, the formed portfolio takes into account the potential growth of the Russian economy and thus is less sensitive to market down spikes that allows to hedge risks in periods of crisis.
The graph on the Figure 2 clearly demonstrates the advantages of this model.Undoubtedly, the historical performance does not determine the future performance, however, relying on statistical apparatus, it is possible to judge the appropriateness of this model for long-term hedging.
The above model has several drawbacks.First, it has poor application in practice due to the low liquidity of futures contracts on the RTS index volatility.This problem can be solved by the withdrawal of capital abroad and investing in similar instruments-the S&P 500 and the VIX (S&P Volatility Index).However, Russian legislation imposes increased requirements on private investors presented on foreign stock markets.Second, the beta coefficient used in the calculations is taken as a constant, and it is not.The coefficient is changed at the end of each billing period.However, modeling the portfolio satisfies the criteria listed in the beginning of the paper, the formation of such a position are not difficult.

Results
Development of automated trading systems and trading robots allows to create algorithms of market-neutral strategy, excluding major risks and in the meantime preserving investor's participation in the work with a trading account in the regulated level.Within algorithmic trading the strategies of pairs trading have shown active development (Serebrennikov, 2011).Pairs trading is an example of a market neutral strategy, its simplest form.
The theoretical basis of the pairs trading is a concept of co-integration proposed by econometricians Engle and Granger in the 1980s.The essence of co-integration is that even under conditions of components non-stationary of double row of time series, a certain row combination makes a series stationary (Engle & Granger, 1987).In other words, in relation to trading, the price of an established ratio should be compensated in favor of long-term parity (Pravduk, 2011).
The market neutral portfolios are constructed using just two securities, consisting of a long position in one security and a short position in the other, in a predetermined ratio.The spread of the market neutral portfolio is computed using the quoted prices of the two securities and forms a time series.The spread is in some ways related to the residual return component of the portfolio p  . (Vidyamurthy, 2004) Practically the idea of pairs trading works according to the following algorithm: when the spread is substantially away from its mean value, the investor should put on positions with the expectation that the spread will revert back.
In pairs trading, investors select two correlated stocks or other comparable equities and trade only those two stocks based on their performance relative to each other.The investors would find a mean ratio for the prices of the two stock selections, buy the stock that is calculated to be underpriced, and sell the stock that is overpriced.The idea is that in the long run, the price ratio between two stocks fluctuates less than stocks themselves.So when the price of a particular stock deviates too much from the calculated mean, there is an opportunity for profits as the price will eventually go back to the mean ratio.(Zhang, 2012) The profitability of pairs trading strategies is one of the most discussible issues after they have acquired popularity among the investors.According to some researchers using pairs trading only the first users can benefit from the arbitrage opportunities or market inefficiencies.(Zhang, 2012) They argue that as knowledge spread, these market inefficiencies would be eliminated in no time.(Do et al., 2006) Others had supporting evidence of the opposite and argue that "the public dissemination of the results has apparently not affected the general risk and return characteristics of the strategy, despite curiosity from the professional sector" (Gatev, 2006).
Beta-neutral position will be formed on the basis of two assets, such as shares (Vidyamurthy, 2004).The essence of the method is that at different times the value of shares reacts to external factors, however, reacts differently.At certain times there may be a discrepancy between the spread value of the highly volatile shares.A long position in slower security combined with a short position in faster one allow to form of market-neutral portfolio, designed to return the spread to the settled value.At the same time, software tools allow to consider the following factors: • inconsistency of beta securities (its recalculation is required for each period of results fixation); • the need for regular recalculation of weighting coefficients (due to the inconstancy of beta); • the longer the investment period is, the greater is the emphasis on formalized fundamentals factors rather than technical and statistical ones.
Doubles trading is attractive because it is possible to build the algorithm for day trading (closing positions within the day (intraday)), and for longer-term investment.In both cases, the goal is to find market inefficiencies.It is important to understand that the longer the investment period is, the more the spreads are explained by changing the fundamental prerequisites.
The algorithm of pairs trading strategy is presented on the Figure 3.

Figure 3. Pairs trading strategy as an algorithm
The algorithm presented above requires some explanation: Searching of the pair: appropriate pairs of assets are those which correlation coefficient is more than 0.8.Definition of the period: purchase or sale transactions may be closed within one hour, several hours, one day.At the end of the positions are compulsorily closed, even if unprofitable.The longer the period, the greater the likelihood of the spread difference which is not due to the inefficiency of the market but because of the fundamental prerequisites.Risks of working within an hour are lower as well as a potential profit, while the commission costs are higher.Thus, the definition of the period should be based on the optimization of these factors.
Beta recalculation: each point of time corresponds to a certain beta value.Beta is calculated based on the closing prices of the approved number of previous periods (200 periods applicable).
Recalculation of weighting coefficients according to new betas: to determine the weighting coefficients the following formula is used: (3) where: A, B: assets which correlation coefficient is greater than 0.8; X, Y: weighting coefficient of the assets A and B; β A , β B : betas for assets A and B.
Recalculate assets prices ratio: to determine the relative values of two assets one asset's price is divided by the price of another one: P A : price of the asset A; P B : price of the asset B.
Forming of a feedback filter: based on the deviation of the assets prices ratio graph from the indicator the positions are opened or closed.A classic indicator of the parity is considered to be the simple moving average (SMA) or exponential moving average (EMA).However, there are also other instruments: EMA adjusted for the average error, modified EMA (Bulashev, 2003), (Roll, 1977), the weighted average with the Fibonacci numbers or with the Kalman filter (Pravduk, 2011), (Teweles et al., 1969), Bollinger Bands (Serafin, 2007).Decision whether the asset is undervalued and overvalued can be taken on the basis of the analysis of the deviations on the graph.
Signal to buy is the time to open a long position in asset A, which is relatively undervalued comparing to the asset B, and to open a short position in asset B, which is relatively overvalued comparing to the asset A.
Signal to sell is the time to open a short position in asset A, which is relatively undervalued comparing to the asset B, and to open a long position in asset B, which is relatively overvalued comparing to the asset A.
Thus, the key factor of uncertainty in pairs trading algorithmization intraday is identification of the ideal dependency defining the moment of opening position.First the most appropriate feedback filter for each pair of assets should be chosen analytically.Then it is necessary to analyze the absolute deviation of the ratio from the filter for the period.It is necessary to identify key support and resistance levels, as well as the extremes of variation within the period.When setting restrictions for interest rate fluctuations it needs to be born in mind the broker's commission for the transaction: the potential profitability of the operation (opening positions at the extremes, closing at the filter level) must always exceed the commission for the transaction.
Intraday trading can detect speculative market inefficiency and neglect of the fundamental component.At the same time, intraday trading or especially trading within an hour is factually impossible without the trading robot support because of the complexity of the changing portfolio parameters and significantly large arrays used in the data analysis.
Objectives of the trading robot: • maintaining of portfolio's beta-neutrality by correcting share of assets; • calculation of values and forming the graph of the feedback filter; • opening positions when the user-defined levels of deviation from the filter are achieved; • closing positions when the filter level is achieved or at the end of the period.
Disadvantages of intraday trading: • the choice of pairs of assets is rather narrow due to the need to meet liquidity criteria; • discount of the requirement of closing position at the end of the period may increase the loss of the position due to increased fundamental component in the asset prices with increase of the investment period.
Successful trading robot has more profitable trades than losing ones.The yield is determined by the difference between profits and losses.It is worth mentioning that the establishment of a trading robot working intraday is advantageous for the brokerage firms whose income is formed of commissions for the transaction.In addition, implementation of algorithmic trading using robot meets the requirements to minimize the involvement of the client in the process.
An algorithm for the long-term strategies of the pairs trading is similar to intraday trading algorithm, but includes a greater number of factors necessary to be taken into account: • Identification of the period in this case is not critical.
• Statistical tools for decision making concerning opening or closing positions are not sufficient.
• Transactions are carried out based on the calculation and comparison of some key analytical parameters on the graph: P/E, P/S, EV/EBITDA, P/BV (for banks' shares), ROE and others.The values of these parameters are calculated in the same way -for the end of the reporting period on the graph (day, week, month).Changing the values of the numerator can be regarded as a fundamental change in the situation, which causes a change of the spread.
• Transaction decisions is worth taking in case of the coincidence of several discrepancies in the different graphs.
The potential return on a single transaction may be around 10-15%.
Long-term pairs trading allows to take into account fundamental factors, as well as to hedge market risks.Costs of long-term strategy is relatively similar to the classical portfolio investment, and trade does not require the use of complex software systems.
Running an investment business a private client-amateur is hardly able to independently control such a market-neutral portfolio.Thus, this strategy can be implemented within the framework of classical premium service "trust management", which is described and approved by the stock market regulatory authorities.

Discussion
The aim of this paper was to study and to model the algorithms of investment portfolios, neutral to market risk.Despite that the market neutral strategies, especially pair trading strategy, are widely studied and analyzed nowadays (Vidyamurthy, 2004), (Whistler, 2004), (Gatev, 2006), (Pravduk, 2011) along with trading algorithms (Serebrennikov, 2011), there is still no the consistent algorithm for implementing the pair trading strategy.In the paper the simplest forms of market-neutral portfolios, and algorithms for trading robots designed to maintain the neutrality of the market trading account of the client are presented.
This paper presents a simple algorithm for implementing the pairs trading strategy, which, in particular, does not include a requirement to the marginality of the securities, as well as brokerage commissions.Moreover the process of cointegrated pairs choice is discussed poorly.For further development of the subject it is advisable to consider more carefully the selection of the most effective filter (Bulashev, 2003), (Serafin, 2007) for the calculation of the spread price deviations.

Conclusion
Thus, it is proved that the investment strategies modeling, based on market neutrality, despite the apparent non-triviality from the first glance, in fact, allows to minimize the risks of market volatility with minimal participation of the investor.
Market neutral strategies nowadays have tremendous marketing potential.It is worth noting that this niche in the Russian investment business is still unoccupied and is developed only by a limited range of traders-enthusiasts.Such services for market participants as market-neutral strategies of trust management or, even more attractive, trading robots, which algorithm is based on the identification of market failures in pairs trading (provided the appropriate advertising campaign) are able to modify the market shares of investment services for individuals.

Figure 1 .
Figure 1.Comparison of speculative and market-neutral strategies component or residual return on the portfolio.