Saturday, 27 February 2016

Miami twice as bearish

15:26 Posted by The Thalesians (@thalesians) 1 comment

So why did the title of this article include the words "Miami twice"? I suppose it does sound like the TV show Miami Vice (well, actually that was the main reason). I can't remember much about the show aside from the white suits, sunglasses and the 80s music, perhaps because, I was always much more a fan of the A-Team during that decade of shoulder pads and forgettable music. 

Before I visited Miami over the past week, I already had this vague image in my head of what to expect: the smell of oranges, the sight of the sea and the sound of Spanish, all somehow coalesced into a single snapshot, with the backdrop of whitewashed Art Deco buildings straddling the image. What I had not quite anticipated, was the serenity of the sunrise casting its shifting gaze over the beach. If you ever do go to Miami, I strongly recommend waking up earlier than you might ordinarily do to witness this.

Much of my time, however, was spent inside at the TradeTech USA FX conference, rather than watching the waves roll on beneath the sun. Whilst the sun was shining outside, the mood inside the conference was perhaps less than shining. A bearish mood pervaded most of the conversations during the conference. This was perhaps not unique to conference. In general, within the market, there seems to be a general perception that we've reached a stage where central banks are out of rope, epitomised by the move negative rates, the latest stage of easing. The recent market reaction following the BoJ's move to negative rates seems to tally with this. One interesting point raised by Steven Englander from Citi, during his conference presentation, was that potentially the markets have underestimated the creativity of central banks in coming up with solutions. 

To some extent, I have to agree with Steven's point, particularly when we consider how central banks have reacted following the financial crisis. They have been somewhat more creative than they were during previous crises, notably following the Great Depression. At present, it has become quite fashionable to be outright bearish. The market can often be "right" and it's a reason why trend following is a profitable strategy and why long only strategies have historically been profitable, albeit with some volatility. However, once the cacophony of market bearishness becomes overwhelming, the risks have evolved from being a black swan style event to merely a grey swan type of event and potentially the market will have overpriced the event. If everyone is expecting a disaster, then arguably market positioning will be skewed that way and if anything any "good" news can result in a nasty squeeze the other way. Insurance is most valuable when the market does not really agree about an event, whether it is in the nature of that event or the timing.

One example of this can be seen in Brexit. We of course do not know with certainty the outcome of the event. What we do know, is the timing of the referendum. Hence, knowing the timing means, we can hedge this risk. The likely risk premium which will seep into the market is likely to increase over time, as investors seek to protect themselves from an adverse outcome. Given it is risk that we can hedge, the temptation is for the market to end up overpaying for protection or having an extended exposure in the cash markets. Hence, even if there is a bad result, the risk premium will be so high that it is unlikely to be the case that a hedge would work. It's like buying a Ferrari and having such expensive insurance, that it ends up being the case that the cost of insurance makes up a large proportion of the cost of the car.

Planning for the expected, is perhaps not as important as planning for the unexpected when it comes to hedges. As Hannibal from the A-Team might say "I love it when a plan comes together".

Like my writing? Have a look at my book Trading Thalesians - What the ancient world can teach us about trading today is on Palgrave Macmillan. You can order the book on Amazon. Drop me a message if you're interested in me writing something for you or creating a systematic trading strategy for you! Please also come to our regular finance talks in London, New York, Budapest, Prague, Frankfurt, Zurich & San Francisco - join our Meetup.com group for more details here (Thalesians calendar below)

29 Feb - London - Jessica James - FX option trading
14 Mar - San Francisco - Quant Fintech Mixer Event
15 Mar - New York - Thalesians/IAQF - Alex Lipton - Modern Monetary Circuit Theory
21 Mar - London - Robin Hanson - Robin Hanson, Economics when robots rule the Earth
20 Apr - London - Oskar Mencer - FRTB, RWA, XVA, Scenarios, MiFiD II, fast?
13 May - Budapest - Saeed Amen/Paul Bilokon - Thalesians workshop on algo trading at Global Derivatives

Saturday, 13 February 2016

Fashion, trends and CTA strategies

17:12 Posted by The Thalesians (@thalesians) 3 comments

I'll confess, understanding fashion has never been my strong point. My uniform for much of my career working in investment banks was simply an ill fitting suit. I eventually worked out that a suit, which was the right size, might actually be a good idea. In recent years, since quitting banking, working as a full time quant strategist at the Thalesians, my uniform has been the humble t-shirt and jeans. I shall leave that up to you to decide whether I possess a modicum of dress sense....

Despite that, the little that I do know about fashion is that trends play a big part in it. If some such celebrity, who I probably don't know the identify of, suddenly wears an item of unusual clothing, it becomes "trendy" to wear it. If an item appears on the catwalk, high street brands will scramble to produce similar items, and then suddenly everyone is wearing it. Fashion trends seem infectious. Then after a while people tire of a fashion and the trend is extinguished. Fashions move in cycles, punctuated by the seasons, items of clothing seem to come in and out of fashion decade after decade.

Trends are obviously not purely restricted to fashion. Markets exhibit trends. There's that hot IPO, which has attracted lots of media interest, that market participants are desperate to get hold of. There's that new startup, which no one cared about, until a few big venture capital funds decided to invest. There's that currency that was languishing near the lows, till a smart hedge fund manager decided to buy, precipitating interest in that currency, from the rest of the market. We see an asset trend upwards on a chart, and suddenly, human behaviour gets involved and we want to buy, we don't want to miss that move! I could give countless examples of this type of herd behaviour in markets, which mirrors that we see in fashion. We all claim to be immune from it, yet, the fact that there are trends in the market seems to say otherwise.

Even if we ignore the behavioural argument for trends, the presence of an economic cycle gives rise to market trends. At the beginning of an economic cycle, we might expect materials stocks to outperform, as companies begin to invest in infrastructure. Countries which export commodities also tend to benefit. As the economic cycle wanes, commodities become less bid, and investors shift towards preservation of capital as the recession approaches, shifting from equities towards bonds.

Whilst the old maxim says "buy low, sell high", to be a trend follower in markets, you do precisely the opposite. You buy high, on an expectation of price action going higher. Conversely, you sell low, expecting the price to continue drifting lower. CTA, or commodity trading advisors have been around for around for decades. Typically they use systematic trading models, which are trend following, to make trading decisions. But how precisely do they go about it? At Global Derivatives in May, which will be in Budapest for the very first time, I'll be presenting my paper "How to build a CTA?" to help answer this!

I'll be examining the various technical indicators which can be used to generate trend following signals. I'll also be showing, how trading multiple asset classes from a trend following perspective can improve risk adjusted returns, compared to focusing on a single asset class. I'll be looking at historical results which show how trend following can help diversify the returns of long only equity and bond investors. To round off the discussion, there will be an interactive demo of how to implement a simple FX CTA type strategy in Python using my open source PyThalesians library (download the code from GitHub here).

If you want to know more about what a CTA does, hopefully see you at my talk at Global Derivatives in May! I promise I won't be attempting to tell you about my fashion sense at the same time....

Like my writing? Have a look at my book Trading Thalesians - What the ancient world can teach us about trading today is on Palgrave Macmillan. You can order the book on Amazon. Drop me a message if you're interested in me writing something for you or creating a systematic trading strategy for you! Please also come to our regular finance talks in London, New York, Budapest, Prague, Frankfurt, Zurich & San Francisco - join our Meetup.com group for more details here (Thalesians calendar below)

16 Feb - New York - Thalesians/IAQF - Harry Mamaysky - Does Unusual News Forecast Market Stress?
29 Feb - London - Jessica James - FX option trading
14 Mar - San Francisco - Quant Fintech Mixer Event
15 Mar - New York - Thalesians/IAQF - Alex Lipton - Modern Monetary Circuit Theory
21 Mar - London - Robin Hanson - Robin Hanson, Economics when robots rule the Earth
20 Apr - London - Oskar Mencer - FRTB, RWA, XVA, Scenarios, MiFiD II, fast?
13 May - Budapest - Saeed Amen/Paul Bilokon - Thalesians workshop on algo trading at Global Derivatives

Sunday, 31 January 2016

Breaking the trading routine

19:11 Posted by The Thalesians (@thalesians) No comments

Routine. The drudgery. The predictability. The sheer monotony. In all my years, I can't recall reading the words, "I dream of routine". No one enjoys the sense that everything they do is routine. However, a modicum of routine helps to give life at least some structure.

Those occasions when we break from our routine, are in a sense what makes it all manageable. A stroll through a new environment, the sight of a painting you've never seen, the sound of song being played on the radio for the first time: the freshness of novelty is intensified when it is a comparatively rare experience. If we are repeatedly surprised by the novel, far from enriching our viewpoint, it suddenly becomes commonplace and routine, a dull and underwhelming experience. Bertrand Russell describes this idea very well, in his book the Conquest of Happiness.

Markets are both routine and novel. At times price action seems boring, range bound and directionless. News seems to do little to move prices. Of course, these periods are never permanent, and are often preludes to a shift in sentiment. I remember, when I quit my job in 2013, FX markets seemed to be on inescapable path to lowering volatility, accompanied by declining lack of interest. The dollar rally started in earnest as Autumn came in 2014. Volatility spiked and currencies actually started to move.

Is a routine or a novel market better? It depends on our strategy! If we are a carry investor, lashings of volatility accompanied by risk sentiment that swings around like a yo-yo are unlikely to be a joy to behold. By constant a trend follower much prefers markets where volatility is picking up, which are often accompanied by the development of trends.

We can complain all we want that the market environment is unsuitable for our specific trading strategy. We unfortunately don't get to choose the market which faces us. It is like complaining that you feel cold whilst strolling through the park during a particularly brutal winter day, when you haven't bothered to wear a coat. Rather than saying the market is unsuitable for our strategy, maybe we should instead think about it the other way round: whatever trading style we are adopting isn't suitable for the current market.

If our time horizon is very long, and we are not massively leveraged, we may well be able to stick it out in an "unsuitable" market. If we have developed a systematic trading strategy we might find that historically that periods of under performance occurs at times, but as a whole, the strategy is still profitable over reasonable time periods. However, with high levels of leverage and very concentrated risk, we don't have this luxury, and need to to think about what we can do to alleviate the situation.

So which is better, the novel or the routine? Sometimes we can't choose between the two, and simply have to deal with it.

Like my writing? Have a look at my book Trading Thalesians - What the ancient world can teach us about trading today is on Palgrave Macmillan. You can order the book on Amazon. Drop me a message if you're interested in me writing something for you or creating a systematic trading strategy for you! Please also come to our regular finance talks in London, New York, Budapest, Prague, Frankfurt, Zurich & San Francisco - join our Meetup.com group for more details here (Thalesians calendar below)

08 Feb - London - Saeed Amen/Delaney Granizo-Mackenzie - CTA/Pairs trading (joint Thalesians/Quantopian event)
16 Feb - New York - Thalesians/IAQF - Harry Mamaysky - Does Unusual News Forecast Market Stress?
29 Feb - London - Jessica James - FX option trading
21 Mar - London - Robin Hanson - Robin Hanson, Economics when robots rule the Earth
13 May - Budapest - Saeed Amen/Paul Bilokon - Thalesians workshop on algo trading at Global Derivatives

Saturday, 16 January 2016

Mitigating Risk, Managing Uncertainty

16:21 Posted by The Thalesians (@thalesians) No comments

Happy new year! If you're in markets, the new year has been anything but happy. The markets have greeted the new year with more than a modicum of scepticism. Crude oil has continued to trade very poorly. Equities have sold off significantly since the start of the year, mirroring the behaviour of August's sell off. Elsewhere, in FX, risk aversion has gripped the market. The high beta currencies in G10 FX have got trashed. EM has also been hit hard. The market has also been thinking about "one off" events such as Brexit and also to a lesser extent the breaking of the Saudi peg.

In a sense, this whole period has brought to the fore, the fact that a trader's job is literally to manage risk, trying to minimise downside risks and at the same time being able to capture the upside. The difficulty is that whilst in ordinary times "risk" might seem benign, this job can be much easier, during risk aversion, traders are faced with an explosion in volatility. This can make it difficult for traders to stick to their goals, even if they happen to be on the right side of the trade. Short term volatility can force traders out of positions which are fundamentally sound, but still come under stress, when the markets switch from seeking yield to wealth preservation in periods of risk aversion. When it comes to "one off" events, such as Brexit, we cannot simply use probability tools to understand the risks, we also need to use our judgement and an element of qualitative analysis.

So what should we do? Luckily, on Wednesday at the Thalesians in London, Nick Firoozye, a Managing Director at Nomura International and heads of a global team in cross-product derivatives research, will be doing a presentation on exactly this subject of uncertainty and risk. I must admit it's more a product of coincidence that the talk will be happening at this time of market turbulence, rather than some element of foresight on my part! Nick will be talking about his new book "Managing Uncertainty, Mitigating Risk - Tackling the Unknown in Financial Risk Assessment and Decision Making" and also signing copies. In his book, he stresses that we cannot simply use conventional probability to understand uncertainty in finance, and instead we need to seek understand the mathematics of uncertainty. He introduces concepts such as uncertain value-at-risk (UVaR) in the book, which helps to incorporate expert's insights into a risk framework.

I am looking forward to Nick's talk and hopefully see you there on Wednesday, if you can make it!

Like my writing? Have a look at my book Trading Thalesians - What the ancient world can teach us about trading today is on Palgrave Macmillan. You can order the book on Amazon. Drop me a message if you're interested in me writing something for you or creating a systematic trading strategy for you! Please also come to our regular finance talks in London, New York, Budapest, Prague, Frankfurt, Zurich & San Francisco - join our Meetup.com group for more details here (Thalesians calendar below)

20 Jan - London - Nick Firoozye - Managing Uncertainty, Mitigating Risk
29 Jan - Budapest - Robin Hanson - Robin Hanson, Economics when robots rule the Earth
08 Feb - London - Saeed Amen/Delaney Granizo-Mackenzie - CTA/Pairs trading (joint Thalesians/Quantopian event)
29 Feb - London - Jessica James - FX option performance (TBC)
21 Mar - London - Robin Hanson - Robin Hanson, Economics when robots rule the Earth

Saturday, 9 January 2016

I haven't got the foggiest data

16:46 Posted by The Thalesians (@thalesians) 5 comments

The first full week of the year has passed. Christmas decorations have come down. Lazy morning starts are fading from memory. In their place, has come the hectic tempo of early morning commutes to work, the flip of 2015 to 2016 in the calendar, that feeling of starting all over again.

In markets, the volatility which had been absent over the holiday period, has returned. The first week has seen stocks sell off, in particular in China. Whether the Shanghai composite is of key importance for world markets is another question (after all, international markets mostly ignored their bubbly rise last year and Chinese stock market is dominated mostly by local retail investors). Geopolitical tension has increased in the MidEast, which only failed to stop crude oil's continuing decline for a couple of an hours.

Does the first week of the year in markets have any significance on the rest of the year? I recently ran a simple test, plotting the returns from S&P500 during the first week against the rest of the year. Whilst in the past decade there was at least a passable relationship, in the decades before that, it's very difficult to spot any relationship. The difficulty is that we have a comparatively small number of points to test this idea upon, given a trading rule would involve only one trade a year.

We can come up with other examples of this limited data problem in markets. For example, if we are trying to create a model to estimate when (or if) a managed currency might experience a sudden regime change. Rather than attempting to precisely time such a difficult binary event (which is near impossible!), we can instead try to build a probability distribution for that event. In our managed currency instance, we could look at central bank reserves data and other critical economic variables. We can then compare the market pricing for such an eventuality and compare to our model. Indeed, this approach looking at market pricing and also modelling other market variables is the approach I took in recent research on the peg of USD/SAR (see my interview here on the subject).

Should we never do analysis when we have very small amounts of data, given the problems? I would argue not. Once we have a probability assessment of our model, we can then overlay our own judgement on top of that and compare to market expectations. Analysing very small datasets might help us see a bit further into the fog of the future: after all it is likely better than doing nothing! At the same time we need to cast a critical eye on the output of our analysis.

Like my writing? Have a look at my book Trading Thalesians - What the ancient world can teach us about trading today is on Palgrave Macmillan. You can order the book on Amazon. Drop me a message if you're interested in me writing something for you or creating a systematic trading strategy for you! Please also come to our regular finance talks in London, New York, Budapest, Prague, Frankfurt, Zurich & San Francisco - join our Meetup.com group for more details here (Thalesians calendar below)

20 Jan - London - Nick Firoozye - Managing Uncertainty, Mitigating Risk
29 Jan - Budapest - Robin Hanson - The Age of Em: Robots
08 Feb - London - Saeed Amen/Delaney Granizo-Mackenzie - CTA/Pairs trading (joint Thalesians/Quantopian event)
29 Feb - London - Jessica James - FX option performance (TBC)
21 Mar - London - Robin Hanson - The Age of Em: Robots

Saturday, 26 December 2015

If it wasn't for me, I'd do brilliantly

15:33 Posted by The Thalesians (@thalesians) 1 comment

Christmas has come. Christmas has gone. The tree remains. The wrapping has gone. The decorations still sparkle. Christmas markets are still around (as above), but quieter. The days between Christmas and New Year are here, that odd period of limbo, where the last year, 2015, lingers, hanging on to time as an outstretched hand seeks that embrace of the familiar, whilst, the new year, 2016, awaits the chimes of Big Ben, an unknown artist ready to grab its 15 minutes of fame. It's a time to recollect what we have done, and indeed, what we have failed to do, which we had planned for in the past year. One of my favourite quotations about explaining success and failure, is from Chamfort, the eighteen century French writer (which is incidentally the opening quotation in my book, Trading Thalesians and the title of this post):

'If it wasn't for me, I'd do brilliantly.'

When it comes to plans, we know the saying that the best laid plans of mice and men, often go awry! What is a plan, but an ill suited straitjacket for the future? It is somewhat disconcerting to accept that randomness plays such a deep role in our lives, given that the more randomness an event seems to exhibit, the less power we have to influence it. It feels so much more satisfying to believe that we have a casting vote over our lives. My earlier comment on planning might have been somewhat facetious, given a modicum of planning does have its place. Having no plan whatsoever, surrenders all your control to randomness. At the same time, a plan which assumes little or no space for randomness is doomed from the start.

So much of modern life is random. Who we meet for example is so often a product of randomness. In particular if we think of the modern day, both cheap travel and the advent of social networks have suddenly increased the number of connections we can make exponentially. If we seek to eliminate all randomness from our life, yes, we might eliminate the potential downsides, yet, we simultaneously remove any opportunities for upside from randomness.

A good trader recognises that randomness is an intrinsic part of what he/she does, trading is the monetisation of managing risk. Yet, a good trader also understands, that it is sufficient to skew the odds in their favour to be successful, rather than to be right all the time. This want to coax value from randomness, need not be confined to trading. The same approach can transcend so many other parts of our life too: making the most of randomness, rather than attempting to master it (which is impossible).

So maybe this time of limbo in the calendar, isn't so much a time for planning, maybe it's simply a time to accept, that randomness will happen. Rather than being fooled by randomness, embrace it. Best of luck for 2016!

Like my writing? Have a look at my book Trading Thalesians - What the ancient world can teach us about trading today is on Palgrave Macmillan. You can order the book on Amazon. Drop me a message if you're interested in me writing something for you or creating a systematic trading strategy for you! Please also come to our regular finance talks in London, New York, Budapest, Prague, Frankfurt, Zurich & San Francisco - join our Meetup.com group for more details here (Thalesians calendar below)

20 Jan - London - Nick Firoozye - Managing Uncertainty, Mitigating Risk
29 Jan - Budapest - Robin Hanson - The Age of Em: Robots
08 Feb - London - Saeed Amen/Delaney Granizo-Mackenzie - CTA/Pairs trading (joint Thalesians/Quantopian event)
29 Feb - London - Jessica James - FX option performance (TBC)
21 Mar - London - Robin Hanson - The Age of Em: Robots

Monday, 21 December 2015

Margin is too small

11:07 Posted by The Thalesians (@thalesians) No comments

Saturday mornings are perhaps not the times at which we associate that the brain is most awake. It is more time for slumber, than the gathering of thoughts. Unable to come up with anything remotely useful to say on an early Saturday morning, I tweeted the following:

trying to think of something truly inspirational to say on a Saturday morning, I think I have it, but it's too long to fit in 140 chars

It is perhaps somewhat facetious to compare myself to the great French mathematician (in retrospect, that sentence sounds more accurate without the word "somewhat"). However, the tweet alluded to something Fermat wrote in the 17th century and well done, to @ewankirk for recognising the Fermat reference in my tweet too. To quote that fountain of all knowledge, Wikipedia, with some help from Google, Fermat claimed that he discovered a proof to the following, Fermat's Last Theorem, which states that:
no three positive integers ab, and c satisfy the equation an + bn = cn for any integer value of n greater than two. The cases n = 1 and n = 2 were known to have infinitely many solutions.

However, Fermat wrote that the proof was too small to fit in the margin of the notebook he was working on. Alas, he never thought to buy another notepad to write it down... either that, or he didn't really have a proof. The theorem remained unsolved till the mid-1990s, when Andrew Wiles solved it. He was subsequently knighted recognising this great achievement. His proof amounted to around 150 pages. So Fermat was right in some respects, the proof was indeed far too big to fit into his notepad's margin.

Mathematics is often about the proof, not so much purely the statement of fact. There are many ideas which are very easy to understand in mathematics (and might seem intuitively true), but their proof is so much more difficult to articulate. Indeed, if we consider Fermat's Last Theorem, it isn't that difficult to understand what it says.

Unlike in mathematics, in markets, there is very little that we can actually "prove". We can have theories about how markets behave, we can use historical data to illustrate them. I can use statistics to show a trading strategy would have made money. We can use our intuition to judge that the conditions necessary for the strategy to make money, are likely to be there in the future (or indeed that they won't be there). But can I "prove" that you will definitely make money in the future. No.

In a sense, trading and in particular, quantitative trading (or least successful variants of it) requires a modicum of skills from many different areas. The first one is common sense. Sorry, no amount of mathematics can erase the necessity for common sense when it comes to trading.

Instead mathematics and statistics, needs common sense to guide its correct usage when trading. You may have found the best ever strategy in the world (ever, ever, really!), but a bit of common sense, might tell you that it's impossible to execute in practice or that transaction costs you've assumed are totally unreasonable. As well as common sense and a good knowledge of statistics, an ability to code is important for systmatic trading, after all, the more data you have to play with, the less likely it is that Excel will be sufficient to crunch it. Oh, and a bit of luck can help too! We might live by our median result (which we hope is above zero), but a good start is always a bit of a luck.

I can't prove any of this obviously. But if we could prove everything easily, wouldn't everything suddenly become very boring? With that, I wish you a very merry Christmas!


Like my writing? Have a look at my book Trading Thalesians - What the ancient world can teach us about trading today is on Palgrave Macmillan. You can order the book on Amazon. Drop me a message if you're interested in me writing something for you or creating a systematic trading strategy for you! Please also come to our regular finance talks in London, New York, Budapest, Prague, Frankfurt, Zurich & San Francisco - join our Meetup.com group for more details here (Thalesians calendar below)

20 Jan - London - Nick Firoozye - Managing Uncertainty, Mitigating Risk
29 Jan - Budapest - Robin Hanson - The Age of Em
08 Feb - London - Saeed Amen/Delaney Granizo-Mackenzie - CTA/Pairs trading (joint Thalesians/Quantopian event)