Friday, April 24, 2009

Automating the process of risk management

Blessed is he who believeth. This expression is remembered when it comes to investors and traders, persistently trying to create a trading system. Their efforts are often wasted because the wrong is determined by the task, and incorrectly formulated criteria for the selection rules. World standard of risk assessment allows the application of well-known model in the management of capital in the financial markets to maximize revenue.

Who is faster: the system or trader?
The main difficulty in the creation of trading systems is not so much with the problem, but with the way it is handled, and what criteria guided by its creators, creating an algorithm for generating trading signals. Illustration of what can lead to inaccurate understanding of the objectives is presented in the diagram (Fig. 1).

In fact, the efforts of traders and analysts in the design of trading systems designed to create a set of technical indicators, providing information on the possibility of the deal. Despite the abundance of all kinds of indicators, in reality, we almost always deal with some middle-or compilation, which is expected to better analyze the behavior of prices.

Perhaps best of all possible options - to refer to indicators that provide the ability to monitor the processes of convergence and divergence. Think for yourself if the price rising or falling, and we can see, and without an indicator, then why do we generally refer to it for advice, whether price increases or decreases it?

Is well known that the enormous effort spent on the search for effective solutions in the investment industry, do not provide the necessary return on invested work and time spent. This raises the question: Is there any sense at all to deal with this issue, if it turns out that its decision may only be temporary in nature? Indeed, in this case, it turns out a simple truth: any investor, self-created or purchased by the trading system must be understood in advance of its doomed. In fact, it has only two options: he will have to make some money before the system would destroy his own expense, or it will destroy investment capital before you will make money. Unfortunately, no system of decision-making in financial markets is indispensable. At least, because only a specific set of rules will help to determine when, why and when to enter the market, get out again, and where to install a security freeze order designed to limit the risk of trading positions. Hence the natural question: what criteria should govern in determining the level for the production of protective stop orders?

Search criteria
The concept of determining the measure of risk by the criterion of allowable losses, called VaR (Value-at-Risk), - to solve this problem is almost automatic. This is because the VaR is the maximum loss for the specified time horizon and the size of the position in a particular financial instrument [1].

The amount of risk in this methodology is evaluated on the basis of the principle of determining the maximum possible deviation of the price at a specified level of probability, which are known as level of confidence. That provides a measure of price zones that are known, we likely will not be reached the market.

For example, if the 95% VaR of spot foreign exchange market the euro / dollar for the position of $ 100 thousand in the 5-day time horizon is 1878.80 (= 1.645h0.0051h100000hv5 - where 0.0051 - daily volatility, 100000 - the size of the position 5 - the horizon, the number of days ), it means: with a 95% probability of position-term value of $ 100 thousand would not be changed by more than $ 1878.80. In another it can be interpreted as follows: for three days 95% of the total price will be scattered around a reference point in such a way that the deviation does not provide a change in the value of the position of more than $ 1878.80. Naturally, the remaining 5% loss probability of an event that will provide the excess of this figure. The same way you can describe any confidence, for which the calculation of VaR. We have an opportunity to assess the exact numbers, the value of potential losses in any obviously depends on the level of probability. To do this, we should change the coefficient in the formula for calculating VaR. For example, desiring to find the 99%-ing chance, instead of 1.645 ... 2.3264 should be used ... (often rounded up to 1.65 and 2.33). A natural question is: where do these numbers and how many should we use when we suddenly wanted to know 98 -, 97 - or 65 per cent probability?

The author of any book involving the subject, feels obligated to bring the table to find the required value. But it is not suitable for the modern trader, which requires quick assessment of the situation, rather than yawing posting. In addition, it is sufficiently powerful computers, so the prospect of yaw on the books is just ridiculous. Fortunately, the formula used in the VaR ratio is the argument of the cumulative normal distribution function, therefore, to ascertain its value can be much easier - just ask the capabilities of spreadsheets. For example, in Excel there is a feature that allows you to extract the argument, knowing the importance of confidence, or - the likelihood, which is recorded as NORMSINV (probability).

Having now an opportunity to fully automate the process of ascertaining the measures of risk for any specified probability, we define a formula for calculating the amount of protective stop orders. In the context of the task it will be as follows:

The amount of stop-loss = (F (probability) x x Size Volatility position x vGorizont - Operating costs for the position) / volume of the position.

Using the derived formula may allow qualified to monitor market risk. But the most important point is that it is based on generally accepted methods of risk assessment, has now become almost standard in the industry.

Test fitness
Attempting to use this formula to specific assets shows: in some cases, we obtain a protective stop order that can scare their size.

For example, a 3-day stop-order, which is 95% will not be hurt by random market swings, the market for euro / dollar will be located at a distance of 135 points, and the shares whose daily volatility of 3%, the model will offer a stop-loss at a distance not less than 8% from the current price. The nature of the mutual dependence of the value of loss and the probability of its occurrence almost unchanged for any market. The difference is the amount of loss, which depends on the volatility of the instrument (Fig. 2).

Of course, such values do not appear reasonable, if only we do not have the appropriate coverage in the form of profits, comes back to us as a result of the use of risk. But, based on empirical observations, one can say that in reality, traders are ready to take on far greater risk than the accepted estimate of the model. For example, if we assume that we are only 35% of the cases to get a loss (and have noticed that this proposal will have to taste a large number of traders), it turns out that the model tells us quite a different value of maximum risk. For example, a 3-day 65% VaR 100 thousandth position on the euro / dollar would now equal $ 334, and stop-loss is proposed that no more than 25 points. A similar conclusion may be reached by contacting any other asset that is well demonstrated Table 1.

If you look at the market as a random stochastic process (analysis of science necessarily say "Wiener process"), we might note that our chances of getting a loss is still above 35%. If the price change has not brought us to the profit and resulted in a loss that is less than creating a protective stop-order, in this moment of time we have ravnoveroyatnostny outcome for any market direction. But we do not consider the situation from the standpoint of statistics, but from the perspective of a trader trying to act in direction, and assume that it has at least a few rules to ensure proper entry into the trend and getting the maximum possible (or pre-set) returns. This radically changes the situation. For example, the trading system creates signals for opening and closing of the long and short positions. Risk management is carried out as follows.

1. Initially, the protective stop order is determined by the 3-day 65% VaR.
2. At the end of 3 days with a favorable outcome (the occurrence of return) starts the procedure "tracking" stop-order, excluding the loss.
3. If after 3 days of creating the position of loss, but the stop-order is not affected and there is no signal to close a position, it is seen as a new position, and presented a new protective stop-order on 3-day 65% VaR. This will ensure a permanent presence in the market, while protecting against losses that exceed a specified limit trader.

Obviously, the probability of winning with this strategy will depend on the nature of the probability distribution of two independent systems. The first is a set of rules that create trade signals, and the second - that the above system of risk management, with the exception of "tracking" stop-order. In general, it is the third system, but we are not going to take it into account. Rate the likelihood of earning income, as well as the probability value of gains and losses it is now possible, using the VaR model for multiple assets. If your trading system will be characterized by high skorrelirovannostyu, you should expect losses no higher than 35%, whereas the gains will occur in the remaining cases (65%). Accordingly, the reduction of the correlation will lead to a deterioration in this ratio. With zero correlation distribution yield the position will take the form presented in Figure 3 (without leverage).


The key to high yield
Now ask, but what may be the performance? So, we have every reason to benefit, the value of which is in the degree of dependence on time, which is derived from the model for calculating VaR. Since the establishment of a trading system described above, we believe that we will be in the position longer than 3 days (this period we have released to verify the truth of trade signals), then to assess the value of return is reasonable to use another time horizon. Obviously, it depends directly on the holding time positions, which creates revenue, so we define it as "the horizon of income." Accordingly, the time horizon used to determine stop-loss, is called a "horizon of losses."

Given all the considerations, we can determine the value of the income position by expressing it as a spread between the VaR-s different time horizons (for a per option):

Spread income (%) = F (probability) x x Volatility (vGori-income umbrella - vGorizont losses).

Based on this formula, it is possible to estimate the annual yield. To do so, must take into account the impact of costs and turnover. If the number of trading days is equal to 252, the wording of the net revenue will be as follows (per option):

Net yield (%) = 252 x (Spread income (%) - Costs (%))/( probability of income x vGori-income umbrella + Probability of loss x vGorizont loss).

The study of behavior of this function leads to rather curious results. First, while reducing the horizon, an increase in yield loss. Secondly, there is a point to maximize the likelihood for fixed parameters (the trader shall appoint its own).

In doing so, with the growth rate "the horizon of the income / loss of horizon" at the outset there has been an increase in yield, which upon reaching the maximum starts to progressively decline. Solution of Partial gives a formula directly calculating the rate at which the maximum yield is observed. Bring it here is impossible because of the excessive length, but the basics of owning a differential analysis can easily obtain it themselves.

Figure 4 gives a visual representation of the nature of returns, depending on levels of income and losses. In general, however, consistent with other variables, the growth rate "the horizon of the income / loss of horizon" occurs when the reduced volatility and loss of horizon, as well as increasing the probability of loss (reduced confidence) and an increase in transaction costs.


These laws are essential for practical application. Of all the variables that affect the resultant yield only a temporary loss of horizon, and to-let rate probability of loss is directly dependent on the investor. All other parameters virtually unchanged for the market and the existing terms of trade.

Thus, the maximum possible rate of return can be obtained only if a certain investment horizon, which is closely linked to the horizon losses. Studies have shown that the rate does not differ-resistant: it is different in the same market for different values of the horizon of losses due to the impact of costs.

In Table 2, calculations are made for the 65% case the confidence level (35% likelihood of loss).


The boundaries of the horizon of income (last column) were determined by the criterion of deviation of the annual yield from the maximum value of 10%. It should be noted: compression horizon losses up to 1 hour model requires significantly lengthen the horizon of income, which has more than 1 trading day for the currency, and stock markets. The range of indicators and the horizon ratio of income to the FOREX market is the result of ambiguity of defining the number of trading hours, which should be taken into account because of substantial fluctuations in the volume of trade and liquidity.

Do not forget to improve the performance!
Thus, the results show one thing: to maximize the annual yield is only possible while maintaining a certain ratio between the horizon and the horizon is the loss of income. As in the analysis we are dealing with a factor, the induction conditions could come not only from the horizon of losses, but also on the horizon of income. This is extremely important, because much investor confidence, and traders can determine the time spent in the position, ie investment horizon of (income, as we have defined above) than the horizon of the loss (the time of initially put a protective stop order).

For example, if a trader on the stock market involves working with 65% by confidence level (35% loss), while in the trading position of no more than 3 days, the horizon must be stowed in the loss of 2.5 hours (if the trading activity lasted 7 hours). That is, if the rules of entry into the market make use of time schedules, the stop-loss should no longer act in 3 hours. If a trader wishes to operate at 95% by level of confidence (to take greater risks), the time horizon of losses should not exceed 4 hours. Is expected (of course, theoretical) rate of return would increase almost threefold.

At half-diagrams period ALPHABETICAL allowed to get confidence, stretched to a maximum of 6 bars. After this time a strategy should be to create a profit or have to decide whether to remain in the position further. Please note the rules for risk management (see above) suggest at this point to review the level of protective stop orders if the trading system did not give conflicting signals. Finally, in this model, we find a clear border investment, expansion of which is not conducive to the growth of profitable operations in the financial markets.

The test, remove all the questions
Left to consider the results of applying the concept of risk management, using the model of VaR.

To test was chosen as a typical trend trading system (such systems are not very effective, as opposed to specially created for the purpose of the actual earnings of money). Nevertheless, it is actually used one of the banks that manage assets of clients, and successful. Accordingly, it has a detailed history of transactions on the great historical depth and allow for an objective study.

In order to not change the correctness of any one trading signal, including a mechanism for closing loss-making transactions through the stop-loss. The only thing that was done - added automatic floor protective stop orders, computed for the 65% case the confidence level and 1-day horizon. The choice of the horizon was due to the nature of the medium-term trading system which makes the retention of positions within 2-3 days. If not, a favorable movement in prices is supposed to use a stop-order, which appeared first in the way of the market. As a result of this connection, it turned out that the modified strategy is significantly ahead of the typical trading system. The test was carried out on the market shares of RAO UES of Russia "and covered the period of almost three years, more precisely - 1031 daily. Re-investment had been made and the initial capital of 10 thousand rubles, including the reserves to cover possible losses. During the studied time interval the value of stop-orders, identified by the 65% VaR, undergoing fluctuations from 0.24% to 3.3% of the value of shares.

Main results
Main results are presented in Table 3, which shows that consistent with the key indicators that determine the gains, there has been a significant increase in annual revenue, as positive indicators of change, describing the loss. Please note, the increase in the effectiveness of the strategy it has a factor of risk management that is well demonstrated by reduction in the maximum "The settling of a" (drawdown), and recorded losses in one transaction, as well as the sharp decline in the total loss.


In general, the risk of initial trading strategies declined by at least two times, while the growth return on capital. In conclusion, the illustration is to present changes in equity for the different versions: the original trading system and that which includes the principle of freeze-VaR-orders (Fig. 5).


Thus, the proposed model of risk management, which determines the size of a protective stop-order and using the concept of VaR, seems quite promising. Most importantly, the considered algorithm is based on generally accepted standards and methods for assessing market risk. And since the VaR model is widely applied in the working practices of financial institutions, holding the leading position in the industry, despite the obvious shortcomings of the existing and the concept of stop-VaR-order simply has no equal. An additional argument in favor of the scheme outlined - this is its compatibility with the VaR-method for determining the reserves to cover market risk, is now used by the civilized world banking community. Of course, the question remains as to how qualified can be used by the model, because without understanding the foundations of risk management solutions at 90% over today's volatile markets will provide losses that are able to correct any of the most sophisticated financial technologies.



Michael Chekulayev

No comments: