賭博、風險與預測
賭博、風險與預測
為什麼明明知道贏的機會比較小,人們還要去賭?答案不在數學,而在心理學。對某些人來講,賭博不過是一種刺激的游戲、一種不同於看電影的娛樂;但對另一些人來講則沉溺上癮,賭博可能發財,也可能讓他們“後悔一世”。概率論可以預測隨機事件的可能性,但不可能準確地預測某個人的命運。
概率的方法往往與直覺相對,可以揭示一些表面上看不到的東西。不少職業賭徒成為業余數學家,一些數學家專注賭博問題。例如,1657年荷蘭科學家惠更斯就完成了《論賭博中的計算》一書;笛卡爾年輕時應用數學,曾是一個獲利的賭徒;據說,華盛頓在獨立戰爭期間,還在自己的帳蓬裡聚賭。
樸克牌產生於埃及,為中世紀的歐洲引入阿拉伯數學扮演過關鍵角色,現在則是世界上通用的賭博工具。從樸克牌的洗法到玩法,都有人作概率分析。美國加州有一名數學專家,1991年發明了“紙牌的二十一點”理論,因而成為賭徒崇拜的偶像。他聲稱這是對內華達州賭場的“報復”。
數學提供了一個工具,把不確定性轉化為風險分析,以便控制風險。保險業根據未來可能發生也可能不發生的概率來索取保險費,推動了早期遠洋貿易,迎合了歐洲人的海洋擴張。企業中出現的風險管理、風險投資、決策理論等等,則催化了經濟的發展。
和投資股票一樣,過去人們認為炒賣期貨是純粹的賭博,它的複雜性遠遠超過了數學的解釋範圍。期貨以預先固定的價格購買存貨,如果將來存貨昇值,你將獲利;如果存貨貶值,你將虧本。如何確定那個預先固定的價格?過去人們憑著信心和勇敢,現在人們則可以用數學來預測,1997年哈佛和斯坦福大學的兩名教授因此而獲得諾貝爾經濟學獎。
人自己也許是最複雜的,暴露了數學預見力的有限。就像一個看上去自信的賭徒也知道扔出去骰子可能把他的財富擲掉,諸多有關博弈的預測就象蹩腳的 “天氣預報”。對於戰略游戲來講,不確定的因素不在於自然,而在人自己。正如莎士比亞所說的:“過錯不在我們的星辰,而在我們自己。”現代複雜性理論(Complexity theory)揭示:人們之間的相互作用從本質上來講是無法預測的。
因此,在人類共存的社會裡,風險無法完全被戰勝,利益不可以獨享而必須和其他人形成妥協。這不是擲骰子或旋轉彩票輪盤的簡單游戲,而有些類似於橋牌或象棋裡的變化。前者純靠幾率,或者在一定程度上靠智謀。在商業裡,客戶、職員、投資者都是決策的變量。每個人都在為其他人創造不確定的紊亂。玩這類風險游戲的方法就必須合理地回應由他人引起的不確定性。
概率論的奠基者也給人們留下了一些疑難雜症。帕斯卡晚年戲劇性地提出:上帝存在或者不存在,不可以用推理來回答。但可以把這個問題看作是一個硬幣的兩面,各有二分之一的概率。人可以有選擇,假如拒絕,而教義又是假的,你沒有什麼損失;但教義如果是真的,你就會在地獄裡受苦。假如接受,而教義又是騙人的,你可能什麼也得不到;而如果教義是真實的,你就可以進天堂。因此,他主張接受是上策。這是對後世的一種賭博。
這裡至少可以提出兩個問題。一是佛教、伊斯蘭教裡也有天堂和地獄,帕斯卡是否同意有兩種以上的信仰?二是這樣的推論有濫用“中立原則”之嫌。經濟學家約翰·凱恩斯認為:如果沒有充分的理由來說明某件事的真偽,就選對等的概率來確定每件事物的真實性,他稱之為“中立原則”。但應用不當就會鬧出笑話。
例如,“立方體悖論”。如果櫃子裡藏著一個立方體。你知道它的邊長從2米到4米,根據“中立原則”,最好的估計是它的邊長為3米。根據體積,這個立方體的體積從8立方米到64立方米之間,同樣根據“中立原則”,最好的估計是它的體積為36立方米。顯然,這個估計的體積的邊長不可能是3米。這就是使用“中立原則”不當造成的。
同樣,按照帕斯卡的計算方法,上帝存在有二分之一的概率。如果進一步推下去,上帝創造宇宙的概率是二分之一,上帝創造人類的概率也是二分之一。因此,上帝既創造宇宙也創造人類的概率就是四分之一,而上帝不存在的概率就是四分之三,不定的因素越多,上帝存在的可能性就越小。反之也是一樣,上帝存在的可能性就越大。人將如何選擇?回答這個問題很簡單,“中立原則”不適合解決這個問題。
上帝無情地拒絕了我們知道未來,但人類至少邁出了一大步。古人也許並沒有認識到變化無常的背後,天氣往往是影響他們收成的唯一變量,除了祈禱沒有別的辦法。隨著時代的變遷,愛因斯坦相信上帝不玩擲骰子的游戲,但也有人斷言,上帝在任何場合無不擲骰子。但具有操縱風險觀念的現代人,至少在一定程度上知道了人類的行為可能導致與願望相反的概率分布,可以用文明的大腦來擺脫危厄的命運,在過去的五百年裡,我們正是這樣做的。
盯住止損
點評 一個好的交易系統會有很明確的買賣信號!止損以自己所能承受的風險為限,引出資金管理的問題!不同的交易方法和投資理念對止損的設置各有不同,但終究一點,止損是貫穿交易的始終的必不可少的程序,當一個頭寸贏利了解時,止損就變成了止贏,其實質是一樣的。止損的目的是使虧損限於小額,讓利潤充分增長,所以止損也必須是不斷移動的,這樣才能保住既得得利潤。一個適合交易的點位首先必須是一個便於止損的點位!好的交易系統要和投資理念和交易技巧融合一體形成一種交易的信念,用信念交易,使各種紀律和交易守則成為一種交易的習慣!
我的止損理念
Pyramiding and Martingale
In the case of a random process, such as coin tosses, streaks of heads or tails do occur, since it would be quite improbable to have a regular alternation of heads and tails. There is, however, no way to exploit this phenomenon, which is, itself random. In non-random processes, such as secular trends in stock prices, pyramiding and other trend-trading techniques may be effective.
Pyramiding is a method for increasing a position, as it becomes profitable. While this technique might be useful as a way for a trader to pyramid up to his optimal position, pyramiding on top of an already-optimal position is to invite the disasters of over-trading. In general, such micro-tinkering with executions is far less important than sticking to the system. To the extent that tinkering allows a window for further interpreting trading signals, it can invite hunch trading and weaken the fabric that supports sticking to the system.
The Martingale system is a method for doubling-up on losing bets. In case the doubled bet loses, the method re-doubles and so on. This method is like trying to take nickels from in front of a steam roller. Eventually, one losing streak flattens the account.
Optimizing - Using Simulation
Once we select a betting system, say the fixed-fraction betting system, we can then optimize the system by finding the PARAMETERS that yield the best EXPECTED VALUE. In the coin toss case, our only parameter is the fixed-fraction. Again, we can get our answers by simulation. See figures 3 and 4.
Note: The coin-toss example intends to illuminate some of the elements of risk, and their inter-relationships. It specifically applies to a coin that pays 2:1 with a 50% chance of either heads or tails, in which an equal number of heads and tails appears. It does not consider the case in which the numbers of heads and tails are unequal or in which the heads and tails bunch up to create winning and losing streaks. It does not suggest any particular risk parameters for trading the markets.
Figure 3: Simulation of equity from a fixed-fraction betting system.
Figure 4: Expected value (ending equity) from ten tosses, versus bet fraction,
for a constant bet fraction system, for a 2:1 payoff game,
from the first and last columns of figure 3.
Optimizing - Using Calculus
Since our coin flip game is relatively simple, we can also find the optimal bet fraction using calculus. Since we know that the best system becomes apparent after only one head-tail cycle, we can simplify the problem to solving for just one of the head-tail pairs.
The stake after one pair of flips:
S = (1 + b*P) * (1 - b) * S0
S - the stake after one pair of flips
b - the bet fraction
P - the payoff from winning - 2:1
S0 - the stake before the pair of flips
(1 + b*P) - the effect of the winning flip
(1 - b) - the effect of the losing flip
So the effective return, R, of one pair of flips is:
R = S / S0
R = (1 + bP) * (1 - b)
R = 1 - b + bP - b2P
R = 1 + b(P-1) - b2P
Note how for small values of b, R increases with b(P-1) and how for large values of b, R decreases with b2P. These are the mathematical formulations of the timid and bold trader rules.
We can plot R versus b to get a graph that looks similar to the one we get by simulation, above, and just pick out the maximum point by inspection. We can also notice that at the maximum, the slope is zero, so we can also solve for the maximum by taking the slope and setting it equal to zero.
Slope = dR/db = (P-1) - 2bP = 0, therefore:
b = (P-1)/2P , and, for P = 2:1,
b = (2 - 1)/(2 * 2) = .25
So the optimal bet, as before, is 25% of equity.
Optimizing - Using The Kelly Formula
J. L. Kelly's seminal paper, A New Interpretation of Information Rate, 1956, examines ways to send data over telephone lines. One part of his work, The Kelly Formula, also applies to trading, to optimize bet size.
Figure 5: The Kelly Formula
Note that the values of W and R are long-term average values,
so as time goes by, K might change a little.
Figure 6: Optimal bet fraction increases linearly with luck, asymptotically to payoff.
The Expected Value of the Process, at the Optimal Bet Fraction
Figure 7: The optimal expected value increases with payoff and luck.
Finding the Optimal Bet Fraction from the Bet Size and Payoff
Figure 8: For high payoff, optimal bet fraction approaches luck.
Non-Balanced Distributions and High Payoffs
So far, we view risk management from the assumption that, over the long run, heads and tails for a 50-50 coin will even out. Occasionally, however, a winning streak does occur. If the payoff is higher than 2:1 for a balanced coin, the expected value, allowing for winning streaks, reaches a maximum for a bet-it-all strategy.
For example, for a 3:1 payoff, each toss yields an expected value of payoff-times-probability or 3/2. Therefore, the expected value for ten tosses is $1,000 x (1.5)10 or about $57,665. This surpasses, by far, the expected value of about $4,200 from optimizing a 3:1 coin to about a 35% bet fraction, with the assumption of an equal distribution of heads and tails.
Almost Certain Death Strategies
Bet-it-all strategies are, by nature, almost-certain-death strategies. Since the chance of survival, for a 50-50 coin equals (.5)N where N is the number of tosses, after ten tosses, the chance of survival is (.5)10, or about one chance in one thousand. Since most traders do not wish to go broke, they are unwilling to adopt such a strategy. Still, the expected value of the process is very attractive, so we would expect to find the system in use in cases where death carries no particular penalty other than loss of assets.
For example, a general, managing dispensable soldiers, might seek to optimize his overall strategy by sending them all over the hill with instructions to charge forward fully, disregarding personal safety. While the general might expect to lose many of his soldiers by this tactic, the probabilities indicate that one or two of them might be able to reach the target and so maximize the overall expected value of the mission.
Likewise, a portfolio manager might divide his equity into various sub-accounts. He might then risk 100% of each sub account, thinking that while he might lose many of them, a few would win enough so the overall expected value would maximize. This, the principle of DIVERSIFICATION, works in cases where the individual payoffs are high.
Diversification
Diversification is a strategy to distribute investments among different securities in order to limit losses in the event of a fall in a particular security. The strategy relies on the average security having a profitable expected value, or luck-payoff product. Diversification also offers some psychological benefits to single-instrument trading since some of the short-term variation in one instrument may cancel out that from another instrument and result in an overall smoothing of short-term portfolio volatility.
The Uncle Point
From the standpoint of a diversified portfolio, the individual component instruments subsume into the overall performance. The performance of the fund, then becomes the focus of attention, for the risk manager and for the customers of the fund. The fund performance, then becomes subject to the same kinds of feelings, attitudes and management approaches that investors apply to individual stocks.
In particular, one of the most important, and perhaps under-acknowledged dimensions of fund management is the UNCLE POINT or the amount of draw down that provokes a loss of confidence in either the investors or the fund management. If either the investors or the managers become demoralized and withdraw from the enterprise, then the fund dies. Since the circumstances surrounding the Uncle Point are generally disheartening, it seems to receive, unfortunately, little attention in the literature.
In particular, at the initial point of sale of the fund, the Uncle Point typically receives little mention, aside from the requisite and rather obscure notice in associated regulatory documentation. This is unfortunate, since a mismatch in the understanding of the Uncle Point between the investors and the management can lead to one or the other giving up, just when the other most needs reassurance and reinforcement of commitment.
In times of stress, investors and managers do not access obscure legal agreements, they access their primal gut feelings. This is particularly important in high-performance, high-volatility trading where draw downs are a frequent aspect of the enterprise.
Without conscious agreement on an Uncle Point, risk managers typically must assume, by default to safety, that the Uncle Point is rather close and so they seek ways to keep the volatility low. As we have seen above, safe, low volatility systems rarely provide the highest returns. Still, the pressures and tensions from the default expectations of low-volatility performance create a demand for measurements to detect and penalize volatility.
Measuring Portfolio Volatility
Sharpe, VaR, Lake Ratio and Stress Testing
From the standpoint of the diversified portfolio, the individual components merge and become part of the overall performance. Portfolio managers rely on measurement systems to determine the performance of the aggregate fund, such as the Sharpe Ratio, VaR, Lake Ratio and Stress Testing.
William Sharpe, in 1966, creates his "reward-to-variability ratio." Over time it comes to be known as the "Sharpe Ratio." The Sharpe Ratio, S, provides a way to compare instruments with different performances and different volatilities, by adjusting the performances for volatilities.
S = mean(d)/standard_deviation(d) ... the Sharpe Ratio, where
d = Rf - Rb ... the differential return, and where
Rf - return from the fund
Rb - return from a benchmark
Various variations of the Sharpe Ratio appear over time. One variation leaves out the benchmark term, or sets it to zero. Another, basically the square of the Sharpe Ratio, includes the variance of the returns, rather than the standard deviation. One of the considerations about using the Sharpe ratio is that it does not distinguish between up-side and down-side volatility, so high-leverage / high-performance systems that seek high upside-volatility do not appear favorably.
VaR, or Value-at-Risk is another currently popular way to determine portfolio risk. Typically, it measures the highest percentage draw down, that is expected to occur over a given time period, with 95% chance. The drawbacks to relying on VaR are that (1) historical computations can produce only rough approximations of forward volatility and (2) there is still a 5% chance that the percentage draw down will still exceed the expectation. Since the most severe draw down problems (loss of confidence by investors and managers) occur during these "outlier" events, VaR does not really address or even predict the very scenarios it purports to remedy.
A rule-of-thumb way to view high volatility accounts, by this author, is the Lake Ratio. If we display performance as a graph over time, with peaks and valleys, we can visualize rain falling on a mountain range, filling in all the valleys. This produces a series of lakes between peaks. In case the portfolio is not at an all-time high, we also erect a dam back up to the all time high, at the far right to collect all the water from the previous high point in a final, artificial lake. The total volume of water represents the integral product of drawdown magnitude and drawdown duration.
If we divide the total volume of water by the volume of the earth below it, we have the Lake Ratio. The rate of return divided by the Lake Ratio, gives another measure of volatility-normal return. Savings accounts and other instruments that do not present draw downs do not collect lakes so their Lake-adjusted returns can be infinite.
Figure 9: The Lake Ratio = Blue / Yellow
Getting a feel for volatility by inspection.
Stress Testing
Stress Testing is a process of subjecting a model of the trading and risk management system to historical data, and noticing the historical performance, with special attention to the draw downs. The difficulty with this approach, is that few risk managers have a conscious model of their systems, so few can translate their actual trading systems to computer code. Where this is possible, however, it provides three substantial benefits (1) a framework within which to determine optimal bet-sizing strategies, (2) a high level of confidence that the systems are logical, stable and efficacious, and (3) an exhibit to support discussions to bring the risk/reward expectations of the fund managers and the investors into alignment.
The length of historical data sample for the test is likely adequate if shortening the length by a third or more has no appreciable effect on the results.
Portfolio Selection
During market cycles, individual stocks exhibit wide variations in behavior. Some rise 100 times while others fall to 1 percent of their peak values. Indicators such as the DJIA, The S&P Index, the NASDAQ and the Russell, have wide variations from each other, further indicating the importance of portfolio selection. A portfolio of the best performing stocks easily outperforms a portfolio of the worst performing stocks. In this regard, the methods for selecting the trading portfolio contribute critically to overall performance and the methodology to select instruments properly belongs in the back-testing methods.
The number of instruments in a portfolio also effects performance. A small number of instruments produces volatile, occasionally very profitable performance while a large number of instruments produces less volatile and more stable, although lower, returns.
Position Sizing
Some position sizing strategies consider value, others risk. Say a million dollar account intends to trade twenty instruments, and that the investor is willing to risk 10% of the account.
Value-Basis position sizing divides the account into twenty equal sub-accounts of $50,000 each, one for each stock. Since stocks have different prices, the number of shares for various stocks varies.
$50
500
$50,000
Value-Basis Position Sizing
Dividing $50,000 by $50/share gives 1000 Shares
Risk-Basis position sizing considers the risk for each stock, where risk is the entry price minus the stop-out point. It divides the total risk allowance, say 10% or $100,000 into twenty sub accounts, each risking $5,000. Dividing the risk allowance, $5,000 by the risk per share, gives the number of shares.
$5
500
$5,000 $50,000
Risk-Basis Position Sizing
Dividing $5,000 by $5 risk/share gives 1000 Shares
Note that since risk per share may not be proportional to price per share (compare stocks B & C), the two methods may not indicate the same number of shares. For very close stops, and for a high risk allowance, the number of shares indicating under Risk-Basis sizing may even exceed the purchasing power of the account.
Psychological Considerations
In actual practice, the most important psychological consideration is ability to stick to the system. To achieve this, it is important (1) to fully understand the system rules, (2) to know how the system behaves and (3) to have clear and supportive agreements between all parties that support sticking to the system.
For example, as we noticed earlier, profits and losses do not likely alternate with smooth regularity; they appear, typically, as winning and losing streaks. When the entire investor-manager team realizes this as natural, it are more likely to stay the course during drawdowns, and also to stay appropriately modest during winning streaks.
In addition, seminars, support groups and other forms of attitude maintenance can help keep essential agreements on track, throughout the organization.
Risk Management - Summary
In general, good risk management combines several elements:
1. Clarifying trading and risk management systems until they can translate to computer code.
2. Inclusion of diversification and instrument selection into the back-testing process.
3. Back-testing and stress-testing to determine trading parameter sensitivity and optimal values.
4. Clear agreement of all parties on expectation of volatility and return.
5. Maintenance of supportive relationships between investors and managers.
6. Above all, stick to the system.
7. See #6, above.
止損的設定
有計劃而沒執行是屬於紀律的問題,和投資人對市場的認識程度有關,也和其性格有關,這裡就不討論了。本文想著重談談投資計劃中關於“止損的設定”的問題。
投資計劃是一項系統工程。由於不同的投資人在投資喜好、投資取向、風險承受能力、用於投資的錢的性質等各方面有所不同,故而會有不同的選擇。比如:在投資喜好方面,有人喜歡短線搏擊,有人熱衷中線炒波段,也有人醉心於長線投資;在投資取向方面,有的人喜歡進取些、刺激些,有的人則喜歡穩健些、踏實些;有的人家庭比較富裕,有穩定而豐厚的收入來源,甚至是腰纏萬貫的大款,用於投資的又都是自己的閑錢,其風險承受能力自然強些;有的人家庭經濟拮據,甚至失業,用於投資的是養命錢又或是借來的錢,風險承受能力自然低。所以,投資計劃不能一概而論,只有是適合自己的,才是最好的。
由於有不同的選擇,因而在止損的設定方面也應該有不同的宗旨。比如:立足做中、短線的,大都是依據中、短線的技術分析之類定進出。然而,中、短線的技術指標多有騙線,反映到個股層面更是如此,而且具體到每個人對中、短線技術分析的理解也未必那麼透徹,一旦發生與自己預期相反的情形,就應該嚴格執行預先設定的止損計劃,止損點的設定也多以一些中、短線的支撐位(如:中短期的上昇趨勢線、移動平均線、平台等)為主。以損失若干個百分點為止損界限也是一個常見的做法。由於做中、短線炒作大都不以個股內在的投資價值為入市依據,更多的是追逐市場當時的熱點和概念,如果套住以後不止損,變中、短線為長線,持股的風險更高。立足長線,在選股方面自然應該以投資價值為依歸,在具備相當安全邊際的價位上介入,當然可以忽略中、短期的股價波動,但也不等於就可以不設止損,只是止損的設定不同而已。在技術層面上,雖然我們也會以長線的技術分析方法定止損,但由於是在具備相當安全邊際的價位上介入,買在長期頭部區域的機會幾乎為零,所以,長線止損更多的是在發現選錯了投資對象,或所選的上市公司經營變壞,又或其所處的行業景氣度變差的情況下執行