Sunday, 27 January 2013

Who are market participants?

I'm about to start reading a book which looks interesting and wanted to give my thoughts on the subject before I start reading it.  The book is an investigation into how certain financial markets behave, form the point of view of modelling some fraction of the agents involved.  The book is called 'Predatory Trading and crowded exits' and came out in 2010.  I don't plan to read this book fully in a hurry, so if you're looking for a pithy review, this isn't it.

The book itself seems to be a summary of Clunie's PhD work which appears to have been an investigation into the effects of short selling constraints.

But for me the real question is the broader one, about what is a good model of the set of market participants?  

As I've been doing with my a man walks into a bar theme on interest rates, I'll try to work out in principle all of the ways that  it would be useful to approach the subject of modelling market participants but describing an increasingly involved reference story.   This is clearly at heart mathematically an issue of game theory, but I don't know enough about it to properly relate it to game theory.

Sunday, 20 January 2013

What just happened?

To price a convertible, the queen of the capital structure from a pricing point of view, you need to know about volatility, credit, rates.  Indeed, to price volatility you need rates.  And likewise with credit.  So it all points back to rates.  Which is why I decided to start with looking at simple rates products - certificates of deposit, then on to treasuries.  But while looking at CDs, I decided to strip it down to the basic question 'what is a rate?'

Given that the maths associated with rates is uncontroversial, and has been around for centuries, I guess most people don't spend a long time here.  But I want to.  I want to feel what a rate means.  So I invented the 'a man walks into a bar' story to give me space to spell out the elements.  I also have in my mind a slow-camera zoom of rates contexts, starting with macro-economic, then markets, then contractual, then participant based.

The biggest macro-economic variable which provides a context to rates is the likely inflation during the life of the loan.  I'd now like to summarise this in a simplistic mathematical way.

That unpredictable stick of dynamite under every loan

In a previous post I mentioned that knowing the rate offered on a loan by a lender to a borrower isn't enough to know what the lender's fee is.  This is, of course, usually the main element you need to know to decide whether the lend is an attractive proposition for you as a potential lender (and borrower too).  But that's only because inflation is usually well understood.  It has happened often during the last several hundred years  to be well understood and also small in magnitude.  Strictly speaking, it doesn't need to be small, just well understood.  That is to say, predictable.  If inflation was at a rock solid 10% per annum, pretty soon peoples' uncertainty around how to deal with it would be reduced.  The public would factor in this certain knowledge into their future plans.  If inflation was totally unpredictable, but only within a narrow range, say 9.8% to 10.2%, then this pretty much is the same thing.  But if the unpredictability is accompanied by a wide range of values, say from -20% per annum to over 40 quintillion % per month (as it did in Hungary after the second world war), then that's clearly a different matter.  If this is a genuine possibility then it can render trivial all outstanding debt in the hyper-inflated currency.  The above link shows that even major world economies can fall into monthly inflation of over 20,000% per month, as did Germany after Lloyd George and the French lumbered Germany with unpayable levels of war reparation debt after the first world war.  In the Hungarian case, people weren't paying for bread in wheelbarrows full of marks, as in Germany, rather road sweepers would sweep smaller denominations up from the ground where they were discarded.

Inflations of all kinds, from uncontrolled hyper-inflations to strategic and temporary ones, in effect diminish the real value of a borrower's loan.  From the point of view of the lender, they effectively lose their capital.  It  has this effect across the board, since virtually all debt is still contracted in nominal terms.  Another way to view it is that inflations re-distribute real value from lenders to borrowers.  Under those circumstances, the fact that the original contract agreed to pay the lender some rate $r$ pales into insignificance.  So if someone in Hungary after the war agrees to lend 100 pengo to a borrower for a rate $r$ for a year, this was free money for the borrower, since the present value of $100(1+r)$ in a year's time is a very small number of pengos (assuming you had a decent idea what the real discount rate was).  So the lender handed over 100 now for a contractual promise which was worth a tiny fraction of that value now.  The lender would not even bother collecting the payments since the process of trying to collect it would cost thousands of times more than the value.

Saturday, 19 January 2013

LaTeX in blogger

I've added LaTeX to this blog as per the instructions in this link.  This is the second method I have discovered to render maths, the other having also used a third party server to pre-process the HTML.  Unfortunately that original server doesn't seem to be working any more.  I hope this one is more stable.  I have to say the current method renders uglier LaTeX.

Wednesday, 16 January 2013

The myth of the harmlessness of 'taking profits'

Thee percentage of winning trades - in the broadest sense of the word -  is something every trader ought to be familiar with in his own trading.  Let's call this percentage (on a 0-1 scale, so that it also doubles up as a probability of winning) $p_w$.  0.5 is the score a coin tossing machine gets.  Anything consistently lower than that, then you're really on to something - just start doing the opposite of what you are doing and soon untold wealth will be yours.  0.6 I think is a decent batting rate.  0.7 and 0.8 very good.  I doubt many human beings have ever consistently achieved 0.8.

So, given all that, in the following analysis, let's consider an extraordinary trader who scores 0.9.  Unbelievable, I know, but 9 out of 10 of all his trades win, in the technical sense of return > 0.  One out of ten returns <= 0.

Next, let's take a principle you see mentioned in a lot of books on trading: don't risk more than 1% of your total capital on any one trade.  Let's assume mister 9-out-of-10 sticks to that rule religiously, and indeed is happy to stay in the position on the downside as long as he isn't stopped out at a level which triggers a stop, closing the trader for a loss of 1%.  I will call the monetary value of a failed trade as $0.01 P$, or 1% of AUM.

So the set up is in place - our trader wins nine times out of 10, and has a 1% of AUM stop loss.  Sound plausible?  Happy?  Even more so, let us force him to only put on is best trade at any given time.  That is, a maximum of only 1 trade on at any moment.  He can be holding no positions if he likes, for as long as he likes.  Nothing forces him to open a position unless he feels compelled to.

The point of all this set up, which sounds rather wonderful, is to show that it all comes to nothing if you set your trades to get you out of the trade on a +10 basis points profit.  That is, if you close your winners, all 90% of them, for a 10 basis point gain, you've effectively imposed a rule on yourself which prevents you from making any money at all, since $(p_w \times 0.001 \times P) + (1-p_w \times - 0.01 \times P)$.  I assume your 1 win out of 10 comes on average at any point in a series of trials, and isn't clustered and otherwise exhibits no informational characteristics within the series.  On average this set up will bleed 1 basis point of your AUM every time.  You will go bust.  You can't abandon the 1% stop loss, due to the more violent downside of many markets (equities, bonds) on occasion, so get rid of the safe-sounding 'sell out on a 10 basis point profit' rule.

With a more realistic 6 or 7 out of 10 batting average, you need to make them all count by at least 20 basis points for a break even strategy.  That's a lot.  And if you're thinking 1% AUM can be tightened to a smaller loss, then remember that this transformation of a fraction of AUM into a stop loss on a specific market leaves you open to the volatility of that market.  If your trading account is under-capitalised, then that stop loss is way too close to the market, meaning there's not much chance at all that you'll hit your winning out-target price before you hit your loss making out target price.  Strictly speaking, it is a function of the minimal trade size and the deposit requirement of that market.  Additionally, the outcome is partly a function of the volatility of tick-by-tick returns.  A handy rule of thumb is: if your ideal place to put a stop means you could lose 1% or more of your capital, then you're under-capitalised.

Wednesday, 9 January 2013

Anchoring all at sea

Imagine that the EUR/USD fx rate really does look like a random time series.  Pretend, if it helps, to imagine that the market right now is traded exclusively by algorithms, with no psychological human biases.  Those two major economic blocks, in long-term way, are probably going to be making similar sorts of macroeconomic decisions and monetary decisions - not necessarily in the same decade, but in general.  Being mature western pseudo-federal democracies, they'll probably mirror each other through time.  At least, pretend so for the purposes of this article.  It could be that the seeming randomness may be a martingale, with no discernible long term up or down drift.

Now, bring human beings into the trading picture.  Kahneman highlights a major behavioural bias of anchoring.  We like to compare potential gains or losses against certain reference points - be that the current state of wealth, a desired level of gold, a break-even stock price, we tend to evaluate risky ventures against these reference points.

But what happens when you're faced with a time series which seems quite random to you?  Where do you hang those anchors when you're out to sea?  First of all, there are anchors personal to one trader, around his p&l.  You might have an anchor in the form of a stop level which means he can't lose more than 1% of his AUM.  But his AUM is essentially a private fact.  Trader 2 will have a different AUM and so will have a disposition to construct private behavioural biases at a different point.  Similarly for the whole population of traders out there.  The best you can say is these biases are clustered around where the market is trading now.  So in a sense I would expect these personal anchors to be distributed, perhaps normally, about the current market level.  But certainly not concentrated or lumpy.

But there are two other shared set of exogenous, non-fundamentals based set of anchor possibilities right there in front of all N human traders in that market when they look at a chart of EUR/USD.

  1. The numbers on the chart's Y axis.  As human beings we tend to be drawn to big numbers - like when the year 2000 came around.  Or in FX when the USD/JPY hits 100.0.  And with FX there are layers of 'big number' anchors as you increase the number of decimal points.  Ie 100.100 would be more of an anchor candidate than 100.897.  And so on.  But if a significant fraction of those behaviourally biassed anchor-seeking traders implement, say, stop levels around big number levels in that market, then it'll have a real effect.  You may see more, or sometimes less volatility around these big numbers. You might see the market moving towards these anchors almost as a ship gets drawn to the rocks by the call of irresistible sirens.
  2. The traders also see the local history of the evolution of that random looking time series.  But in their desire to discover or invent anchors to help them with their trading decisions (when to get in, when to profit, when to call it quits on the trade) based on so-called support and resistance levels.  Even though these start   of as a kind of collective insanity or collectively expressed behavioural biases, again, the setting of those stop loss and limit orders have a real effect on the dynamics of that market.
So anchoring effects crystallising out from fantasy into reality can be at least partly explained by an all-pervasive human bias to attach anchors to the decision making process, even in the face of randomness, perhaps in this case especially in the face of randomness.  Additionally the same rather small set of anchor points are shared by the wider trading population since they're all positively re-enforcing the anchors which are indicated by the particular local evolution of that market price over the time horizon(s) of interest to traders.

As a trader, therefore, it would be wise to assume that these unjustified support and resistance effects, and big-number effects are real, become real.  The evolving positive feedback loop has a kind of performativity in the construction and realisation of support, resistance, big number 'attractors'.

Saturday, 5 January 2013

The possibility effect and the certainty effect redraw the expected utility curve

The expected utility of an outcome or a collection of outcomes is the various utilities (or values, often financial values, that is, cash amounts) multiplied by their probability of happening.  (Assuming that such a probability was stable and estimable in the first place).  So for any binary bet where the payoffs are $P_0$ and $P_1$ respectively you can work out the expected utility for for any valid probability $p$ that $P_1$ happens.  As $p$ ranges from 0 to 1 you ought to see the expected utility trace out a straight line between $P_0$, when $p=0$ up to $P_1$ when the outcome is certain.

With call and put options, the delta tells you the risk neutral probability that the instrument will be exercised.  So following Kahneman's observation that we tend to operate not by expected utility (which would be the line y=x in the above chart)but by over-valuing low probability events and under-valuing nearly certain events, maybe there's an inherent tendency for the very out of the money call to be too valuable in the marketplace, which would mean some strategy like covered calls (where you're selling that over-priced call) would have an edge.  I got the decision weights above from a table in Kahneman's book.

Conversely a low delta put is also a way out of the money put so buying protection against tail risk is expensive not only for local supply and demand reasons.

However, against all that is the thought that this is fundamentally how humans set decision weights, so don't expect them to 'converge' to expected utility.  In other words the market price isn't over-valued as such from a human valuation perspective, only with respect to a theory of expected utility.  Perhaps this effect will get smaller with the rise of algorithms making the trades, on the assumption that they'll be programmed to be more like utility expectation machines.

This raises an interesting question - on average is the implied volatility of a way-OTM call expected to 'converge down' to the implied volatility which would be in play assuming the market valued the call on an expected utility basis?  Or is it the expected utility valuation which needs to move closer towards the possibility-effect inspired market price?

By the way this point is totally separate from the fact that the Black-Scholes model itself introduces biases in calculating deep out of the money options, especially under conditions of high volatility.  That is an issue or weakness in a model when you compare the model's prediction of the fair value of the volatile OTM option compared to where the market is on it at that point in time.   One is a weakness of Black-Scholes, the other is possibly a weakness of the more fundamental expected utility approach.  The Black-Scholes weakness is related to the assumptions of lognormality assumed in the stock process, whereas the expected utility weakness, if it is indeed a weakness, is that it doesn't model a fairly stable human behavioural bias, namely the possibility effect and the certainty effect.

Thursday, 3 January 2013

Behavioural Macroeconomics

While reading the excellent book, "Thinking Fast and Slow" I had the following thought, which I hadn't read anywhere.  What if there's a form of behavioural bias present not only in individual human heads, as he describes, but that there's a parallel set of behavioural biases at the aggregate level, that is to say, at the macroeconomic level?

And further that these behavioural macroeconomic biases could form the basis of a new model for macroeconomics.  Wasn't this, in a sense, what Keynes was doing in the general  theory?  He conjured up a picture of aggregate representations of the key actors and situations in a semi-mathematical model.  The scenarios would be behavioural biases (aggregate behaviours which were not as you'd expect from standard utility maximisation of rational economic agents).

Tuesday, 1 January 2013

Schopenhauer, pessimism, ethics

Schopenhauer's so-called advance on Kant/Plato in claiming that beyond the phenomenal world, the world as we construct it, lies the thing in itself, which is that there is a single reality - namely Will.  There is a unitary willing and striving.  This willing and striving thing, of which we are all part, implies that harming any other part of it is like harming yourself.  Clearly this is a Buddhist-resonant idea, which he takes to a similar place as Buddhists - namely in considering this state of affairs to be something which ought to be resisted.  

But who is doing the resisting?  Certainly not the individual 'us' of the ideal world.  And is the singular willing and striving itself motivated to end this willing and striving?  Isn't that a kind of metaphysical suicide?

Next, when you typically hear talk of morals or ethics, you normally think in terms of a world of two or more beings, often with some form of free will.  Rarely in the history of philosophy do you hear of a moral system or an ethics where the reality itself contains a singular thing.  (Spinoza comes to mind also).  So where is Schopenhauer on the moral or ethical implications of his worlds of idea and will?  If a moral/ethical system is an object of the phenomenal world, then clearly it has much less philosophical interest in his philosophy, as it represents, pace Plato and Kant, a kind of operation on a local deception, namely the world of idea.  So his argument that harming other beings, including other animals, is in a sense a form of self-harm is at once a merely phenomenal/ideational/shadows on cave-wall.  Can a Shcopenhaurian ethics and moral system merely be a function of shadows on the cave wall?  If on the other hand it has a basis in the thing-in-itself, through which mechanism does it express itself?  Puzzling is why there's a seeming bias towards those fractions of the singular will which manifest as humans and animals.  Aren't stones of equal weight to the singular striving?  If not, why not?

But can this singularity, this seemingly eternal striving, really have a moral system?  On what basis does he believe that this singular striving essence ought not to harm itself?  Isn't his claim that through the life of the acetic will-destroying sub-Buddhist the willing reaches a kind of freedom from striving a form of suicide?  Isn't this being set up not as an admonition, but as a goal?  In other words, isn't suicide the primary direction of the striving?

Part of this hinges on the question of whether there's a cyclic or a directed element of the evolution of the life story of the willing.  If there's no direction possible, no change achievable, then the suicide of the willing is clearly a non-starter.  But I don't think Schopenhauer believes this.  I think he sees a direction or progression in the willing, rather as Hegel sees History as having a similar, albeit temporal dimension.  Clearly Schopenhauer's willing cannot have such a temporal element since perception of time is an attribute of the world as idea - i.e. we make that view up in our heads.

But if there can be a kind of metaphysical evolving or unfolding of the willing, then it seems to be towards the goal of its own self-extinction.  But does it succeed?  If it does, where does that leave the so-called pessimism of Schopenhauer?  And if it cannot succeed, then all his talk of debasing our own individual lives through asceticism is surely just one more  kind of unsatisfied striving which we're supposed to be quite familiar with already.  Why privilege that particular form of evanescent striving over any other?

I'm leaving aside all the usual arguments about how could we come to know anything about this willing, that's a separate issue.

For Schopenhauer the fact that striving is blind, undirected, condemns humans to suffering.  But I don't see why he makes this leap.  Just as acceptable is an optimistic perspective on this undirected striving.  I imagine dancing with your eyes closed, perhaps under the influence of some drug, as a kind of striving which is blind but doesn't involve suffering in the sense which is normally used.  Clearly Schopenhauer has something else in mind when he thinks of 'suffering' other than the suffering at the ideal realm.  If suffering at the level of willing means just the recognition that a permanent achievement is forever out of reach, that still doesn't show me why the willing might be suffering.  Can't the willing be inspired  enlivened,   motivated by the raw fact of striving?  Isn't there a more Buddhist 'attitude' which the willing could have used to address their existential situation?  It seems an awfully big failing of this proto-Buddhist philosophy to leave in the willing's suffering.  Any anyway, why does he make such a negative fist of the infinite nature of this striving too?  If he's right to claim that the willing is an endless series of strivings and temporary satisfactions, followed by the onset of boredom, isn't that another way of saying that there's actually an infinite amount of heterogeneous satisfactions that willing will experience?  Again, that doesn't sound too bad to a non-Buddhist's ear.  And if the selection of the transitory object of the next striving is driven by an essentially blind or random process, that in itself guarantees a certain kind of novelty in the selection (though I think hunger and sex accounts for probably a good fraction of the cases).  The point remains, how you characterise the life of willing, as experienced by it, does not obviously have to be characterised as essentially suffering.

It seems to me further that Schopenhauer's other great way of getting to touch the willing, through contemplation of art, is so riddled with inconsistencies as to not be worth looking much at.  These two rather Heath Robinson ways of witnessing the willing stare each other in the face and present numerous difficulties to each other.  What about passion-rousing art?  Schopenhauer has to invent various kinds of category of art, again privileging some over others, to make his system seem consistent to the casual observer.  In short, Schopenhauer can't draw any conclusion about art from his philosophy, which is a bit of a shame, since this is where a lot of his immediate influence lay (Wagner, Nietzsche).  Why can only artistic geniuses produce this?  Are they the only ones who additionally can perceive this?

There's a weird kind of hygiene problem in Schopenhauer - with Plato, painting takes you even further away from the ideal world than the objects being painted.  Schopenhauer sees it as getting closer.  Likewise our experience of our own willings get us a kind of experience of the thing in itself which is inappropriately close, or unjustifiably close.  Finally, with music he gets even closer to the thing in itself by claiming that our experience of it is somehow pre-representational.  This is a breakdown too far and makes a mockery of the phenomenal-noumenal distinction.  

Schopenhauer claims that simultaneously humans are determined but the willing is entuirely free.  How can it be?  It is, according to him, driven to an endless and endlessly frustrating striving, a blind striving.  This doesn't sound like it is entirely free.  Even if you allow for the possibility of self-extinction, that itself doesn't allow him to claim that the willing is entirely free.

Not only does Schopenhauer believe that salvation is possible by the willing's self-extinction, but that the first move towards this is his rather feeble claim that realising that we are all one somehow will make us less likely to harm others, since at bottom harming others is self-harm.  Let me get this straight: the admonition to not harm others as it only is harming part of yourself at a deeper level is the beginning of the realisation of the goal which sees willing self-extinguish.  

You can also sense in Schopenhauer a re-description of the essentially progressivist Hegelian activity of internal dialectical struggle, constantly moving on and constantly making things better.  For Hegel this is an envisioned struggling but for Schopenhauer, it is a blind struggle.  This metaphysical distinction perhaps has its echo in their different views on the possibility of social improvement and cultural direction, Hegel being more of an optimist than Schopenhauer.

Also unclear is how it could be that you take the will to create life, the will to life as the essence of humans and pair it with an ought-based moral system which encourages the very opposite.  Why work to extinguish the will to life?  This not only is never clear to me, but additionally is somewhat perverse as the basis of a moral system.

Of course, Nietzsche was best at critiquing Schopenhauer's unjustified and perhaps unhealthy negativity around this idea that the thing in itself was blind, endless willing.