Saturday, May 18, 2013

HFT invited to a land of new opportunities

The markets are broken.

I've thought, nothing will beat an epic fall of Accenture in May 2010. From $40 to $0.01.

But we've received Andarko yestarday... $90 to $0.01 in mere 45 milliseconds!

Source: Nanex

The fall in Andarko price probably affected the value of the S&P500 index by 1 point.

I wonder whether anyone either sold some ES futures just before manipulating the Andarko price, or bought them just after the mini flash crash?

A single point is not much, but may be tempting enough.

This reminds me: the Warsaw Stock Exchange (WSE) has recently changed its equity futures settlement price rules. While the settlement price of the index futures is based on the average of the index over some time, the final settlement price of equity futures depends on the last price of the underlying stock.

Since WSE has been running on the NYSE's UTP for a month now, new HFT players shouldn't have any problems with adapting and making the prices right ;)

Recent (mostly) HFT-related posts: http://www.reakkt.com/search/label/high-frequency%20trading

HFT-related news: https://pinboard.in/u:mjaniec/t:high_frequency_trading/

Friday, May 17, 2013

Mission accomplished: S&P500 = 1666.66

Source: Google Finance

It was 666 in March 2009:

Source: Stooq

That makes 1000 points, or 150% in 4 years.


But for opening short position, I need much more than faint signals.

I'm sure, it will come - in one way, or another...

Thursday, May 16, 2013

I will come back to that later

Some time ago I wrote about generating safe investment strategy by combining many low correlated investment models.

Recently I've been working on a family of models based on one common concept - short term return prediction.

Seems, it may actually work :)

I have run a number of test and so far results are encouraging:


The above chart presents strategy returns over 250 sessions between 2011-11-23 and 2013-04-12.
(some sessions are missing for lack of common data for some days)

Lines of different colors represent sub-models used. The thick purple line represents the combined model.

The correlation between some sub-models is pretty high - that may be used for reduction of the number of sub-models used.

> cor(test.arr[,,"return"])
             M1        M2        M3        M4        M5      mean
M1    1.0000000 0.3565054 0.2471695 0.3712636 0.1614239 0.4081393
M2    0.3565054 1.0000000 0.1567697 0.1935882 0.1805843 0.2852754
M3    0.2471695 0.1567697 1.0000000 0.5065645 0.4060609 0.5138838
M4    0.3712636 0.1935882 0.5065645 1.0000000 0.3663719 0.6328662
M5    0.1614239 0.1805843 0.4060609 0.3663719 1.0000000 0.5846763
mean  0.4081393 0.2852754 0.5138838 0.6328662 0.5846763 1.0000000

The returns of all sub-models were positive over the test period:

> stats
          M1      M2      M3      M4      M5      mean             
total     0.7488  0.5927  1.1036  0.5844  1.0368  1.0415
mean      0.0029  0.0023  0.0044  0.0023  0.0041  0.0041
drawdown -0.1331 -0.1181 -0.1674 -0.1461 -0.1563 -0.1804



The combined model was positive for all test periods and assets used for tests so far.

The individual returns are low, but it seems it is possible to safely leverage the strategy 2-3x. I haven't completed yet the analysis of the frequency of portfolio re-balancing yet, too.

As I've mentioned in the title of this post, I'm going to return to this strategy and probably its sibling a little bit later...




Friday, May 10, 2013

Illiquidity trap

Another difficult year for some investment funds

Some Polish absolute return investment funds are facing a though year - again.

Investor FIZ is down -12.96% and Opera FIZ felt -12.43% YTD.

This may not sound too bad for the recent investors in some of the John Paulson's funds.

However, if you take a longer perspective, the numbers start to look much more ugly.

Investor FIZ is down -68.71% from its peak in October 2007, while Opera FIZ decreased by -80.45% from June 2007.

I understand that substantial drawdowns may occasionally happen to even the best managers.

They are often connected either with elevated market volatility or slow market convergence process.

To demonstrate the later case let's take a look on a potential a pair trading involving BRENT and WTI crudes:


Source: Stooq

The fundamental price difference between them is mostly connected with transportation costs. Hence, the spread should be pretty stable and one should be able to quite easily arbitrage the temporary premium or discount in the price of one of these commodities.

However, as you can see above, some other factors can "temporarily" push the spread to the extremes.

If one used historical price data to model the possible spread distribution and opened opposite positions (long WTI, short BRENT) based on such a model in mid 2011, the widening spread could have either caused significant drawdown or forced the over-leveraged investor to close the trade.

But it was always possible to close such a trade! And it narrowed eventually, enough to produce a profit for the patient investor.

Unfortunately, there is very little hope for Opera FIZ and Investor FIZ investors...


The value of Opera FIZ certificates has been flat for a couple of years. And we should expect the same from Investors FIZ... :(

The reason is quite simple.

A significant part of these funds' assets is trapped in illiquid investments.

In the Investor FIZ portfolio one may find such "gems" as Tamex:


Source: Stooq

Tamex is listed on the NewConnect alternative market, and sometimes its shares are not traded at all for dozens of days.

Another "interesting" case is Indian Spice Mobile:


According to the latest Investor FIZ financial statement, the fund has Spice Mobile shares worth over PLN 6.3 million. Meanwhile the company's 30 day average volume is... PLN 6,205. The maximum daily turnover over the recent year was PLN 456k.

It is hardly possible to liquidate the position Investor FIZ has!

Similarly, Opera FIZ is stuck with illiquid and unprofitable/indebted private equity holdings like Termisil and SkyCash. It is hard to predict, whether these companies will become successful or be sold at a profit. What's clear however, they lock significant part of or even siphon off the fund's capital and make its return to growth extremely challenging.

Unfortunately there seems to be more skeletons in the closets at both these funds.

Marking to - totally illiquid - markets

Valuation of funds' assets is usually based on their market price. For example if a fund owns 1,000 shares of some listed company and the recent price of one share is 100, the accounting value of this holding is 1,000 times 100 or 100,000.

The problem here is, this valuation depends on the marginal price of the asset.

It is OK, as long as your position is small relative to the market turnover of this particular company.

However, such approach is very misleading when liquidity is low.

In such a situation, one should estimate the value of the asset based on the current, short term historical or eventually short term predicted liquidity.

In the case of the above mentioned Investor FIZ holdings - Tamex and Spice Mobile - the realistic value is close to zero. 

If Investor FIZ had decided to dump its shares on the market, they either would have tanked or it would not been possible at all.

Meanwhile, Tamex and Spice Mobility constitute some 11% of Investor FIZ assets.

Marking to magic

The situation is more complex with unlisted private equity holdings, such as Termsil and SkyCash.

Most often such assets are valued using discounted cash flow method (DCF), comparison method or adjusted purchasing price.

Each of these models is very sensitive to its assumptions and parameters. One can practically set any desired value in quite a broad range.

According to the most recent Opera FIZ financial statement, Termisil and SkyCash accounted for more than 20% of the funds' assets.

The real power of diversification

I have a problem with so called Modern Portfolio Theory.

To make it work, one "just need" to know returns of the particular shares to be put into the portfolio.

Having returns, you can easily calculate variances and covariances needed to optimize the structure of the portfolio - i.e. select the weights of the assets.

However, you need to know (estimate) the future returns!

And as Niels Bohr said, prediction is very difficult, especially about the future.

So, is there any other potential value of the portfolio diversification?

Actually, yes - it can reduce the liquidity risk.

A good example here may be the Renaissance Institutional Equity Fund (RIEF).

It is a younger (but bigger) sibling of the Renaissance Medallion Fund mentioned in my previous post.

At the end of 2012, RIEF manged USD 34.36 billion.

These assets were dispersed over 2,815 holdings. Hence the average single position represented just 0.0355%, and the largest 1.25% of the fund's portfolio.

The important benefit of such a wide diversification is that any single asset cannot significantly affect the whole portfolio.

The market and correlation risk are still present though. However, when you combine asset diversification with strategy diversification, it may be possible to significantly reduce the overall risk and generate positive returns.


Wednesday, May 8, 2013

Computation complexity makes beating Renaissance's Medallion not easy

Presumably the best hedge fund in the history - Renaissance Technologies' Medallion Fund - has averaged 35% annual return after fees over 11 year.

Since RenTec shares approximately 40% of the profits generated by the fund on top of the 5% annual management fee, gross returns should be closer to 50% per year.

I have been wondering how hard it is to generate such high returns independent on market conditions. As I mentioned some time ago, with the perfect future knowledge you can achieve virtually any return you want ;)

Unfortunately, even if one is able to score big once, repeating the success may be challenging - take John Paulson's story as a cautionary example.

Hence, Medallion's persistence is even more interesting.

As an experiment I attempted to generate purely random investment strategy that satisfies tree criteria:
  1. annual strategy return is positive
  2. annual strategy return is higher than market return over the same period
  3. annual strategy return is 50% per year or slightly higher
These three conditions must be met at any time.

The strategy tested operated on S&P500 index.

Fig. Random Test - price, daily returns, volatility, returns 1Y, difficulty

Even that 50% annual return is minuscule in comparison with the maximum theoretical return, generating successful strategy may be quite computationally challenging at times. Over the last 4 years, the complexity varied by some 17 000 (seventeen thousand times)!


Fig. Maximum Theoretical vs Desired Returns 1Y

Fig. Random Test - difficulty of generating desired strategy

In addition, even that complexity is inversely correlated with volatility, the correlation is not perfect:

> cor(returns[,"intensity"],tail(v.year,l),method="kendall")
[1] -0.8658321

Definitely market volatility makes generating high returns easier, but seems not to be the only factor at play.

Note: the strategy was generated on the daily data, while Medallion most probably operates in the HFT regime. Higher frequency increases the maximum theoretical return and - at least theoretically - makes generating higher returns easier.

Fig. Random Test - Volatility

It is also worth mentioning that the market conditions over the recent 9 months seem to paradoxically be pretty challenging for generating high returns. What's more, complexity has been increased for quite some time now. 

Is Fed/ECB/BoJ's quantitative easing responsible for that? Is it possible that this situation leads to the herding behavior among investors? What will happen when they start unwinding positions in a situation when assessment of liquidity may be misleading for high activity of high frequency traders?


Fig. S&P500 over 30 years - note falling volume