Wednesday, October 24, 2012

Betting/trading strategies- Chunking

X%- a concept to unify different betting strategies
Following last post, a similar trading cousin for the Martingale gambling strategy is the sit and wait strategy (buy and hold with no stop losses and exit when you reach a predefined take profit level). This trading strategy is similar to the gambling strategy in the sense that both depend on the market/game to eventually do something (if I wait for long enough/try enough times it will eventually happen and I will be profitable overall). Sit and wait is like a more conservative version of Martingale. Lets say for the Martingale, instead of doubling down each time you lose, you increase your bet by x%. For example, x could be 200% (triple down) or 0% (sit and wait for casino bets). The stock market equivalent is re-balancing and increasing your original exposure by x%. (ie. let's say you had invested $100 in stock, it goes to $75. For Martingale strategy you invest another $125 to make it 2x original exposure = $200) This rebalancing assumes you are still under the same return distribution situation.

As we increase x, we are more likely to win/get back to breakeven when we are losing. For example, let's say we just lost k in a row. For doubling down on a 50/50 bet, we are 50% likely to get back to winning $1 overall by the next turn, but for sit and wait, we are only (1/2)^k likely to get back to breakeven.

At the same time, our losses increase at an exponential rate (1+x%) if we keep losing. This creates an embarrassing problem- how do you avoid bankruptcy if your losses increase exponentially? This goes back to the "chunking" mentioned in the first post. In trading this would be how much extra margin/loss buffer should you budget for this trade before it starts to win. And if you are going to double down/add, at what point should you do this? ie. if you go bankrupt/can't take the pain/extreme exposure after the third time you are wrong, then you need to split the potential worst case scenario into 3 segments and add as you cross between segments. In general you would split these segments by P&L, but it could also be possible to split it by underlying price movements, or even time or a function of all of the above. In the case of the stock mkt, it is also meaningful to vary x as a function of the underlying stock price movement, p&l change, time and other parameters.

Chunking- trade planning/margin budgeting
Let's derive the formula for how to chunk. For gambling, this is relatively easy. You lose b, b*(1+x), b*(1+x)^2,...,b*(1+x)^(n-1) So our total loss is a geometric series and equal to b*[(1+x)^n-1]/x. So given n (how many times you lose before you bankrupt) and x (the double down amt), you can calculate how big your bankroll has to be relative to bet size b:  bankroll is [(1+x)^n-1]/x times that of bet size b. For example, if x = 100% (martingale; doubling down each time), n = 10 (will go bankrupt if wrong 10 times in a row), you need 2^10 - 1 = 1023x initial bet.

It is however more complicated for trading, since you don't lose everything that you bet. Let's define a set {p_0, p_1...p_n} to stand for the stock price at which we would dial up our exposure another 1+x. We could have the set be in arithmetic progression (eg: keep adding per every $1 price drop), or it could be a function of P&L (eg: keep adding per every $100 loss), or time (eg: keep adding every 1min- here we would not be able to predict what p_i is before time t).

Let's start with the common “Martingale-like” case where p_i is an arithmetic sequence, we have a defined stop loss pt p_sl determined by the stock price terms (not P&L), and we rebalance by doubling the # of shares that you own each time. Then p_i = p_0 + (p_sl - p_0) * i / n. And the shares you buy each time b_i = b_0 * 2**i. (note ** means exponential).
Your worst loss is sum[b_i * (p_sl - p_i)] where i is the set of integers from 0 to n-1. Courtesy ofWolfram Alpha, we see:

Since m = n-1, this simplifies to b_0 * (p_sl - p_0) * [2**(n+1) / n - 1 - 2/n]. So let's say you had 1 mil budgeted to buy this stock, and you wanted to bet 4x before you go bankrupt, and you expect p_sl - p_0 = 100-70 = $30. Then we can look at how much (# of shares) to bet initially if we want to be able to rebuy n times.

We can also create a table showing how the intial bet size (both in terms of shares- b_0 and also as a % of total risk budgeted/worst case loss) increases with n.

Initial Bet
NShares% of Budget
133,333333%
216,667167%
39,09191%
45,12851%
52,92429%
61,66717%
79459%
85315.3%
92963.0%
101641.6%

Note that, for example, for n = 1 (just bet once and don't redouble ever), then you would be buying stocks with a notional amt that is 3x your risk budget. Notice that this does not necessarily mean that you are "taking on leverage"- for example, if you had 10mil, and budgeted 1mil for this trade, and so bought ~3mil, then you are not going over your total account equity. The traditional concept of "leverage" is insufficient to describe your trades/risk levels when it comes to more complicated trading strategies.

A more useful version for trading is perhaps this:

Initial RiskLoss
N(as % of budget)Multiplier
1100%1x
250%2x
327%4x
415%7x
58.8%11x
65.0%20x
72.8%35x
81.6%63x
90.9%113x
100.5%204x

And then to get how much notional to invest, you simply divide this percentage by the worst case scenario return. eg: N = 2, worst case is -25%, then you should buy notional amt of 0.50 / 0.25 = 2x that of risk allocation initially. The loss multiplier is simply the inverse of the risk %. You can also use this to figure out what your max loss will be if you bought some amt and you are not sure how many times you will redouble:

eg: you bought 100 shares, and prices went from 120 to 110. You have been redoubling every $5 (so this will your third buy). If you are wrong again, then by 105, your total loss will be 1 / 0.27 * (100 * 15) = 5.5k. Let's check this:

PriceSharesLoss
120100-1500
115200-2000
110400-2000
Current Price105
Total Loss-5500

So this checks out.

Food for Thought- Thinking about Risk
This x% concept can be thought of as a trading style/bias. People who trade by x% (ie. doubling down on losses and taking profits vs cutting losses and adding to winners) are essentially trying to convert a payoff distribution that is linear to stock prices (ie. if stock goes up $1, you make b, if stock goes down $1, you lose b, where b = # of shares), to a distribution that is non-linear and path dependent. It is more complicated to understand and incorporate the risks involved with this sort of dynamic trading strategy when you are evaluating your portfolio's risk characteristics. You might realize that what I described is very similar to a description of options. There are interesting ways to integrating traditional methods of looking at options risk and concepts presented here (eg: chunking and taking into account your trading style):

(1) Bringing options concepts to x%. Your trading style (especially in the extreme case where you preset limit/stoploss orders religiously) can essentially be converted into discretized chunks of gamma. Using this, you can do standard risk analytics taking into account your intended future trades (eg: the increased tail risk? the expected theta?). Another possibility is to use x% as a way to normalize for some portfolio measures. eg- if you use a high +x% for this bucket of trades, then you would expect high success rates and probably equal-ish avg profit vs avg loss but also significant long tail losses. In fact, you could also back out an implied x% from your success rates or your avg profit vs avg loss.

(2) Bringing risk budgeting to portfolio analytics on derivative positions. One problem with current scenario analysis and stress testing techniques is that they is usually purely based on past data, and that they are used as a control- ie. someone/some software will give us this number and let's just keep our losses under this threshold. One thing to do is to be more logical when it comes to estimating the risk budget/max loss. For example, we developed a formula for max loss (given n) above. I believe that a model based on fundamental characteristics (eg- for stocks this could be using a P/E range to derive a max loss) could be an interesting supplement to standard risk models nowadays. Unfortunately, traditionally, the risk manager is not involved in the investment research process and so lacks the in-depth fundamental knowledge required to create such a model.

Wednesday, October 17, 2012

Rules

I'm a big fan of rule-based policy over discretion-based policy. This is especially important in areas which 1) inherently have a lot of uncertainty and 2) affect lots of people, such as fiscal, monetary, and regulatory policy.

Rules are a predetermined, objective and comprehensive set of responses to changes in inputs (e.g. changes in economic conditions). You should think of rules as computer-implementable replacements for human policymakers. This has advantages in reducing uncertainty, encouraging transparency to the public, enforcing government discipline, being resistant to time inconsistent behavior and providing optimal economic policy.

Rational Expectations vs. Uncertainty

One of the most important foundations of modern economics is that individual agents (me, you, workers, corporations, etc.) are rational and will discount future expectations. Thus, one of the most important channels in which government policy acts is through expectations management. If you expect interest rates to go up in the future, you will borrow more now. If you expect taxes to go down, you will defer consumption for later. And so on.

Uncertainty about future policy prevents these channels from working correctly. After all, in order to discount future expectations, you need to know what policy will look like in the future. Uncertainty, at best, undermines the public's confidence in politicians and at worst, can cause or deepen a recession (e.g. by essentially freezing consumers and producers in place). Furthermore, when a fundamental assumption of modern economics, rational expectations, is no longer true, most economic theories fall apart.

The advantage of rules is that it eliminates uncertainty. Furthermore, simply by doing this, it makes policy more effective, thus necessitating less drastic policy changes, making the policy path smoother and less volatile (no artificially induced fiscal cliffs here). Furthermore, rational expectations will be more applicable to the real world.

Monetary Policy

Monetary policy refers to the central bank's actions of controlling the money supply, usually through targeting interest rates. Expansionary monetary policy refers to increasing money supply and lower interest rates, which leads to higher levels of economic growth at the cost of higher inflation. Contractionary policy refers to decreasing money supply and higher interest rates, which lead to lower economic growth with lower inflation (or deflation, negative inflation).

Currently, how monetary policy works is that Chairman Bernanke calls a closed-door meeting with the rest of the Federal Reserve Board of Governors. After the meeting, they issue a short one page press release immediately. Three weeks later, they release the more in-depth minutes. Scores of private economists and consultancies make their business forecasting Fed policy through official and unofficial statements by Fed officials. Even minor word changes between successive press releases, such as from "growth in business fixed investment appears to have slowed" and "growth in business fixed investment has slowed" are analyzed and interpreted.

In contrast, the Taylor rule replaces a discretionary interest rate regime with a simple three-variable equation (inflation, real rates, and GDP). In a Taylor rule regime, a computer collects data for the inputs, plugs it in, calculates the equation output, which is set as the new interest rate. The parameters and data are publicly available, so the people can easily follow along in real-time.

Nobel Prize-winner Milton Friedman also had an even simpler rule: you simply grow the money supply at k percent. If a rule is too complicated or has too many parameters, that just replaces the original source of uncertainty for new ones. Friedman understood this well with his simple k-percent rule.

Rules are especially applicable to monetary policy since the Fed is constantly playing a game of "expectations management" with the public. If you ever read Fed minutes or listen to Fed statements, you will know how often they emphasize maintaining credibility. This is how it works: monetary policy is credible because people believe it works because people believe monetary policy is credible because monetary works because...

The moment that the public stops believing in the Fed's promise to maintain its commitment to price stability is the moment that prices become unstable. Bernanke's claim that he will keep rates low until 2015 is not credible, simply because he will leave office in 2014. However, if a computer program were Chairman instead, its forecasts of its future actions would be credible (provided someone locked the computer and threw the password away to prevent tampering), because the public would know exactly what the computer program is likely do, since its programming would be transparent and open to the public. 

The main problem is that it's difficult to say what is the best rule. Should we follow Taylor or Friedman? Evan's ruleNGDP target? Or something completely different?

Fiscal Policy

Fiscal policy refers to government spending and (tax) revenue collection. Expansionary fiscal policy refers to increasing spending and/or decreasing taxes, which creates deficits, runs up debt and boost the economy. Contractionary policy refers to decreasing spending and/or increasing taxes, which creates surpluses, decreases debt and slows down the economy.

Deficits aren't bad in and of themselves, if they are balanced by surpluses in other years. Unfortunately, governments tend to have a bias towards deficits. One reason is that politicians like to boost the economy in order to ensure re-election. Another reason is because deficit spending is a transfer of wealth from young generations to old generations, and politicians tend to belong to the latter.

One way to think of debt is your present-self borrowing from your future-self. It might seem that your creditor is your direct lender (bondholder, credit card companies, mortgage banks, etc.). However, they are merely middlemen between your present-self and your present-self's ultimate creditor, your future-self. In developed nations, older demographics tend to see most of the immediate payoff of government spending (social security, medicare, etc.) and furthermore, they will unlikely be around when debts need to be paid off.

Thus, deficit spending is a transfer of wealth from the future (young) to the present (old). Older generations tend to be more politically established than younger generations (the average age of a US congressmen is around sixty). Of course, none of this is a problem when economies are developing and there are much more young than old (as in the leftmost pyramid). However, what happens when an economy stops being youthful (as in the rightmost pyramid)?

File:DTM Pyramids.svg



Fiscal rules can be thought of limits on either the spending side and/or the tax side. Some types of rules that you may already know about are 1) balanced budget amendments and 2) debt ceilings.

A balanced budget amendment would require non-negative deficits in every year. The problem with this type of policy is that it's inflexible and inherently pro-cyclical. Since in recessions, real incomes fall, tax revenues fall, which necessitates an increase in the tax rate in order to maintain tax revenues. Ideally, a rule should be counter-cyclical.

You may already be familiar with the US debt ceiling debacle of Summer 2011. The problems with this type of rule are that there has been no real consequences for missing it (not for the better part of the past century at least), and as a result, the debt ceiling has been raised 74 times. This is the equivalent of setting a clock alarm in order not to be late for work, but upon waking, hitting the snooze button about a dozen times. If your clock didn't have a snooze button, you wouldn't be so ready to fall back to sleep upon hearing the alarm go off. Ironically, the very existence of a snooze button decreases your willingness and ability to rise in the morning. Thus, in addition to being counter-cyclical, the ideal rule needs to be credible and thus, difficult to change.

Unfortunately, most of these rules are determined on an aggregate top-down level, and thus, have no meaning to individual lawmakers. Instead, spending increases and cuts can be (and frequently are) decided bill by bill. A lawmaker's immediate interests lie not in meeting some high-level target, but rather, in ensuring he gains federal funding for his pet projects. Thus, rules should instead target individual legislation rather than annual aggregates.

For example, one favorite idea of mine is that legislation needs to come in pairs: spending bills must be accompanied with revenue (tax, etc) bills. The exact proportion doesn't have to be dollar for dollar. In fact, you could have an independent board target the spending:revenue ratio, somewhat like a fiscal Fed. For example, a Keynesian board would dictate a spending:revenue ratio >1 during economic slowdowns and a ratio <1 during economic booms, in true counter-cyclical style.

Algo-Government

While the prospect of electing computers to presidential office may never come, there are places for strict but transparent algorithms in government. This reduces uncertainty about government policy, allowing rational expectations to work and making purchasing and investment decisions easier for both consumers and producers. As political gridlock is unlikely to go away for the foreseeable future, continuing uncertainty over fiscal issues (such as the fiscal cliff) and monetary policy (such as the end of Bernanke's term in 2014) shows that discretionary policy is mainly just terrible policy.

Thursday, October 11, 2012

E-commerce same day delivery

It's interesting to see so many e-commerce businesses warming up to the idea of same day delivery. Kozmo.com tried a more ambitious version of the idea (1-hour delivery) back during the tech bubble, and failed when the bubble burst, but now, Amazon.com, ebay, and Walmart are all looking to offer it to their customers. There are significant and expensive logistical hurdles involved in offering same day delivery, even for a brick-and-mortar like Walmart. It remains to be seen how online businesses who choose to offer this service will negotiate these difficulties.

If anyone is up to the challenge, its Amazon. For the time being, they STILL don't have to collect sales tax in most of the states. They've even worked out deals with some states to delay collection of sales tax for several years into the future, in exchange for building vast warehouses that employ thousands in these states. These warehouses will, in turn, serve as the logistical backbone that allows Amazon to ship products even quicker to their customers.

The benefits of offering same day delivery are quite clear. It is the holy grail of convenience shopping. Shoppers have had to choose between buying online for a lower price and waiting for delivery, or driving to a brick-and-mortar and getting the product right away. With same day shipping, online retailers offer even more instant gratification than their offline counterparts. Imagine you completely forget that its your SO's birthday. You order her a gift and a nice card while you're at work, and its waiting for you at your home (or Amazon locker) by the time you get back. You don't even have to spend time and gas driving to the store.

Its still unclear, though, if same day delivery will be worth the effort for a general retailer like Amazon. Already, Amazon's position as a cost leader is eroding. No doubt, adding huge warehouses stocking tons of products across the country won't help lower expenses. Amazon's acquisition of Kiva systems could potentially cut expenses considerably - we'll have to wait and see. Most importantly (in my opinion), for many products Amazon sells, convenience isn't a huge factor. Do you really need to get a book or a TV delivered right away, or would you rather wait and get the lowest price?

That's not to say I think same day delivery is a bad idea - in fact, depending on the product, I think its a great idea. Groceries and drugstore goods, for instance, fit the model well. Time-sensitive purchases also work (e.g. air conditioners, last minute buys, and broken important stuff). Even Kozmo.com managed to be profitable in a few regions before it closed down. And while Amazon doesn't really sell these types of products yet, it wouldn't be the first time Amazon jumped into new retail sector. Will definitely be keeping an eye on what Bezos decides to do.

Anyone got any thoughts on the issue? Will same day delivery work (and if so, how), or is it over-hyped?

Tuesday, October 9, 2012

WOTD: bloviate, hirsute

First it was palaver (to ramble unnecessarily), then it was bromide (platitudinous and boring), now we can add bloviate and hirsute to our arsenal of awesome words found from political commentary.

Bloviate [bloh-vee-eyt]
adj. to talk at length, especially in an inflated or empty way

Bloviate is a compound of blow with a pseudo-Latin ending. It was popularized by none other than former President Warren Harding, who was apparently an expert at it, in the 1850s - he used to describe it as "the art of speaking for as long as the occasion warrants, and saying nothing". This reminds me of Fedspeak, which refers to the incomprehensible jargonistic dialect of Greenspan when he was chairman of the Federal Reserve Board.

Hirsute [hur-soot, hur-soot]
adj. hairy; shaggy

From The New Yorker, "often dismissed even on the right as a hirsute blowhard, [paleo-con John] Bolton appears to have persuaded Romney to take him seriously".

I love election commentary: it teaches me new creative ways to insult people! Especially meat-head jocks who might not understand the insults themselves, such as the kind typically found at upcoming five-year high school reunions.