Thursday, January 08, 2015

Trading with Estimize and I/B/E/S earnings estimates data

By Yang Gao

Estimize is an online-community utilizing 'wisdom of crowds' to offer intelligence about market. It contains a wide range of crowd-sourced estimates from over 4,500 buy-side, sell-side and individual analysts. Studies (from Deustche Bank and Rice University among others) show estimates from Estimize are more accurate than estimates from traditional sell-side analysts.

The first strategy we tested is a mean reversion strategy developed by the quantitative research team from Deltix using Estimize’s data. This strategy is based on the idea that post-earning-announcement prices typically revert from the short-term trend driven by the more recent Estimize estimates just before the announcement. We backtested this strategy with S&P100 over the period between 2012/01/01 and 2013/12/31. (Even though Estimize has 2014 data, we do not have the corresponding survivorship-bias-free price data from the Center for Research in Securities Prices that includes the closing bid and ask prices.) With 5bp one-way transaction cost, we found that the backtest shows a Sharpe ratio of 0.8 and an average annual return of 6%.  The following figure is the cumulative P&L of the strategy based on $1 per stock position.

Cumulative P&L of Deltix Mean Reversion Strategy with Estimize 
It surprised us that a mean-reverting instead of a momentum strategy was used in conjunction with Estimize data, since earnings estimates and announcements typically generate price momentum. In order to show that this return is really driven by the information in Estimize and not simply due to price reversal, we provide a benchmark mean-reverting strategy that uses prices alone to generate signal:

1. Find long period T and short period T_s, where T is average period of the reporting of all the quarterly estimates and T_s is average period of the reporting of the latest 20% of all estimates.
2. Calculate stock return R over T and Rs over T_s, and let delta = R - Rs
3. Buy stocks with delta > 0 at close before an earnings announcement and exit the positions next morning at the open after the announcement.
4. Sell stocks with delta < 0 at close before an earnings announcement and exit the positions next morning at the open after the announcement.
5. Hedge net exposure with SPY during the entire holding period.

This benchmark shows no significant positive return and so it does seem that there is useful information in the Estimize data captured by Deltix’s mean-reversion strategy.

Next, we compare the traditional earnings estimates from I/B/E/S gathered from sell-side Wall Street analysts to the crowd-sourced Estimize estimates. Backtest showed the same Deltix mean reversion strategy described above but using I/B/E/S estimates gave negative return over the same S&P100 universe and over the same 2012-2013 period, again supporting the thesis that Estimize estimates may be superior.

Since Deltix's mean reversion strategy gives negative returns on I/B/E/S data, it is natural to see if a momentum strategy would work instead: if the short-term average estimate is higher than the long-term average estimate (i.e. analogous to delta < 0 above), we expect the price to move up and vice verse.

The backtest result of this momentum strategy over the same universe and time period is quite promising: with 5bp transaction cost, the Sharpe ratio = 1.5 and average annual return = 11%. The following figure is the daily P&L of the strategy based on $1 per stock position

 Cumulative P&L of momentum Strategy with I/B/E/S


We tried the same momentum strategy using Estimize data over 2012-2013, and it generated negative returns this time. This is not surprising since we found earlier that the mean reversion strategy using Estimize data generated positive returns.

We proceeded to backtest this momentum strategy over the S&P100 using out-of-sample I/B/E/S data between 2010 and 2012, and unfortunately the strategy failed there too. The following figure is the daily P&L of the strategy from 2010-2014.

Cumulative P&L of momentum Strategy with I/B/E/S 

So how would Deltix’s mean-reversion strategy with Estimize data work over this out-of-sample period? Unfortunately, we won’t know because Estimize didn't start collecting data until the end of 2011. The following table is a summary on the annual returns comparing different strategies using different data sets and periods.

Strategies
Mean-Reversion
Momentum
Estimize
(2012.01-2013.12)
         6%
         -9%
I/B/E/S
(2012.01-2013.12)
       -17%
         11%
I/B/E/S
(2010.01-2011.12)
        1.8%
        -6.4%


As a result, we cannot conclude that Estimize data is consistently better than I/B/E/S data in terms of generating alpha: it depends on the strategy deployed. We also cannot decide which strategy – mean-reversion or momentum – is consistently better: it depends on the time period and the data used. The only conclusion we can reach is that the short duration of the Estimize data coupled with our lack of proper price data in 2014 means that we cannot have a statistically significant backtest. This state of inconclusiveness will of course be cured in time.

_________
Yang Gao, Ph.D., is a research intern at QTS Capital Management, LLC.

===
Industry Update
(No endorsement of companies or products is implied by our mention.)
  • There is a good discussion comparing Quantconnect to Quantopian here.
  • For FX traders, Rizm offers a comparable service as Quantconnect and Quantopian as it is directly connected to FXCM.
  • Quantopian now offers free fundamental data from MorningStar. Also, check out their Quantopian Managers Program where you can compete to manage real money.
===
Workshop Update

Our next online workshop will be Millisecond Frequency Trading on March 25-26. It is for traders who are interested in intraday trading (even if not at millisecond frequency) and who want to defend against certain HFT tactics.

===
Managed Account Program Update

Our FX Managed Account program had a strong finish in 2014, with annual net return of 69.86%.

===
Follow me on Twitter: @chanep

81 comments:

Anonymous said...

Hi Ernie,

Did you trade futures options?

How do you match underlying futures and option delta when doing delta hedging?

Ernie Chan said...

We have backtested but not trades options on futures.

Can you explain what difficulties you encounter in finding the matching option for your future? Is the problem finding the appropriate expiration or strike?

Ernie

Anonymous said...

Hi Ernie,

Thank you for response.

What I mean is that we can delta hedge stocks options precisely because we can buy stocks share by share, and 1 option matching 100 underlying stocks.

However, 1 futures option matching 1 futures contract, if delta is 0.5, we cannot buy/sell half futures contact.

So we need to sell 2 futures options and buy 1 futures when delta is 0.5.

But when delta is 0.3 or 0.7 etc..
We may need to sell more futures options to match the exact no. of futures.


I guess for institutional traders, it is ok for them because they have big capital and buy/sell many futures options positions.


Ernie Chan said...

You are right that you need to have enough margin cash to buy large number of contracts if you trade options on futures!

Ernie

Anonymous said...

Hi Ernie,

How did the SNB announcement impact your FX trading? Also, how was IB, any trouble getting filled or systems issues?

Ernie Chan said...

SNB has little impact on our trading. IB lost $120M, less than 2.5% of its net worth. http://www.businessinsider.com/interactive-brokers-swiss-franc-loss-2015-1

Nobody, it seems, were able to get filled at a reasonable price.

Ernie

Anonymous said...

Hi Ernie,

To follow up on the prior comment.

I have a theory that non-option based FX strategies may well have a long term fatality rate of 100%. My rationale is as follows.

The number of liquid currencies is small hence diversification and portfolio optimization provides limited risk protection. Risk concentration in a given currency will be relatively high regardless.

The return distribution is far more skewed compared to other asset classes leading to higher leverage than may be prudent for longevity.

The nature of the market (OTC with no DMMs) means that liquidity can and will dry up in an instance, again rendering many risk management tools (e.g. stops) useless.

The very rules of the game can be changed at a whim (e.g. exchange controls, QE, caps, floors, pegs). Coupled with the small number of currencies creates huge, and frequent, event risk.

The number of FX market participants (hedge funds, HFT shops, retail brokers, who are essentially MMs) with long term track records is minute.

I think the combination of risk concentration, leverage, event risk, and the market structure makes long term survival questionable.

I was wondering what your views are on this?



Ernie Chan said...

What you said apply to any market if one does not diversify but employs high leverage. Even if you were to trade the most liquid stocks, liquidity can dry up in a flash crash (as in 2010). That is why we trade a diversified basket of strategies in our commodity pool that spans FX, futures, and stocks, each strategy with quite low leverage.

Few (and I hope none!) of our managed account investors invest all their net worth into one managed account. Indeed these investors take on the task of diversification on their own, by investing in multiple CTAs and funds.

So apart from the fact the FX returns do have higher kurtosis than stock index returns, and hence more frequent tail events, I do not see why one should avoid trading FX completely.

Ernie

Anonymous said...

Hi Ernie,

Congratulations on a nice performance of your FX strategy. Some questions:

1. Why was 2013 so much less profitable? Market environment or changes in the strategy?

2. Could this be set up on managed account at IB?

Thanks

Ernie Chan said...

In 2013, the FX volatility and liquidity were very low across the whole market. Low volatility means no arbitrage opportunities and low strategy returns.

Yes, we recommend that the managed accounts be set up at IB.

Best,
Ernie

Anonymous said...

Ok thanks.

What is the average holding period?

Does it trade spot or futures?

Thanks

Ernie Chan said...

Average holding period is 1 hour. We trade spot FX.

Ernie

Anonymous said...

Sorry, a few more questions.

What is the typical leverage?

If trading via an IB managed account, what sort of min investment would be required?

Also, the big drawdown in August 2011, was that due to any single event?

Thanks

Ernie Chan said...

The typical leverage is 10, as shown on epchan.com/accounts. However, we may lower the leverage in times of financial markets disruptions (though we will never raise it beyond 10). Also, client can request a leverage lower than 10.

The suggested investment is US$100K, though there is some flexibility.

The drawdown in 2011 was due to the US treasury debt downgrade, and a number of other factors that we can discuss in private. Please email me for further info.

Ernie

Anonymous said...

Hi Ernie,

Yet another question about your fund.

What exactly does "collocated at data center with low latency connections to execution venues" mean?

I understand you are using IB who (along with everybody else) are going to be collated in NY2/4.

Are your servers in NY2/4 also?

Thanks

Ernie Chan said...

It is not the case that one has to colocate at NY2/4 to achieve low latency connection to IB. In fact, we have found an alternative that has as low a latency as you can get pretty much anywhere else but with lower cost.

Ernie

Anonymous said...

What would be the typical dollar exposure to any given currency, if I had a 100K investment?

Would that be sufficient capital to provide exposure to all "signals" or would I be missing out on signals/diversification?

Also, do you know what is IB's policy on "negative balances", i.e. do they cover the loss or will they expect the account owner to reimburse?

Thanks for the patience with all these questions.

Ernie Chan said...

Based on a leverage of 10, the maximum exposure to any one currency is $1M if your account NAV is $100K.

You won't miss any signals or trading opportunities with a $100K account.

IB will ask account owner to pay back negative balance. However, if you invest through a S-corporation or LLC or any limited liability entity, that entity can always declare bankruptcy.

Ernie

Anonymous said...

One final clarification.

Max exposure of $1MM, you do mean currency (e.g. GBP) rather than currency pair (e.g. EURGBP)?

Thanks again!

Ernie Chan said...

$1M USD exposure is with respect to any one cross-rate such as EURGBP.

Ernie

Anonymous said...

In that case, one further question :)

What would be the max (or typical if there is no limit) exposure to any given currency, e.g. GBP

Just trying to get a feel for what my risk would be.

Thanks

Anonymous said...

Which universe of currencies does the strategy trade?

Anonymous said...

I believe you mentioned you primarily use spot fx. But you also say you have a basket of strategies including futures, stocks. Does this mean that the futures/stocks based ones are not active or significant part of the basket?

Ernie Chan said...

The max exposure to any one currency is $1M if you have $100K.

The universe of currencies is G10+USDMXN (which is 2x more liquid than EURCHF).

We trade spot FX, futures, and stocks in our commodity pool. But for the managed account, we typically trade only spot FX, although clients can request we add other strategies if they are interested.

Ernie

Anonymous said...

Is the commodity pool an investable fund, and is the IR significantly better than for the FX only?

Presumably I would need an investment larger than 100K to add the complete suite of strategies to a managed account. What sort of minimum is realistic?

Ernie Chan said...

Sure, the commodity pool is open for investment - please email me for the pitchbook.

Sharpe ratio of the pool is similar to the managed account, return is lower, but the tail risk of the pool is much, much lower than the managed account due to the diversified portfolio of strategies, each one taking up a small leverage.

If you want to replicate the portfolio of strategies in the pool, a $200K account would be sufficient.

Ernie

Anonymous said...

Hi Ernie,

Running some of those risk number in my head, I came up with the following worst case scenario for a 100K account.

Exposure to currency X = $1MM
Currency X drops 10-15% like CHF

Loss with no stops = 100-150K

Loss with stops = 20-50K (assumes spread widens to 1-2%, slippage of 1-3%, again like CHF)

Does this sound like a fair, worst case, estimate?

Also, do you use stops and/or any other risk control?

Thanks!

Ernie Chan said...

Yes, we impose stops of 15% of NAV based on 10x leverage. Of course, it depends on how much slippage there is after the stop is triggered, so a 25% loss may indeed happen.

We can always lower the leverage and stoploss for any account though.

One of our secret sauces is that we can predict with decent accuracy when the market will trend, so we have avoided those catastrophes since 2012, including the Swiss Franc event and today's Bank of Canada event.

Ernie

Anonymous said...

With an IB managed account, would I be able to place constraints on the trading activity which may occur, e.g. FX only, max position suez, max leverage etc.? Just as an independent set of controls in case an error on your side creates an erroneous trade which could blow the account.

How far back did you backtest the strategy, and is performance/risk comparable? I noticed the big drawdown came very early on so you must have had very high confidence in the model to continue.

Ernie Chan said...

Yes, you can specify what instruments can be traded in an IB managed account.

Max position is the same as max leverage when we have only one position, and max leverage is set by IB. If you want to use a leverage lower than IB's maximum, all you need to do is to invest less money in that account and keep the rest in a bank.

We have traded many billions of dollars since 2011 and haven't yet blown an account due to a software error.

We backtested the strategy since 2008, but the data was very noisy for those days so the backtest was unreliable. The returns were always positive every year, but with varying magnitude. Otherwise we wouldn't start trading it in 2010.

Ernie

Anonymous said...

Hi Ernie

Where could one buy daily data on futures dating back as far as the 1970s? I am looking for the broadest cross- section possible.

Thanks

Ernie Chan said...

Try csidata.com

Ernie

Anonymous said...

Thanks. Do you know if Quandl's premium futures data is reliable?

Anonymous said...

Do you know a good vendor for US equities, I'm looking for best bid offer every 1 and 5 min?

A lot of vendors seem to provide trade prices only.

Ernie Chan said...

I have not tried Quandl's premium data, since I use csidata.com.

The best bid and ask for US stocks can be bought from tickdata.com or nanex.com, or rented from QuantGo.com.

Ernie

HK said...

Hi Ernie,

For statical arbitrage between two stock/etf/derivative, can you recommend some practical strategies for me to learn other than Bollinger Bands Kind of strategy? Thanks a lot.

-HK

Ernie Chan said...

Hi HK,
In my second book, I discussed 2 other mean reverting strategies: linear, and Kalman filter. Linear means that you just increase your market value in proportion to the deviation from the mean.
Ernie

Anonymous said...

Hi Ernie,

Without giving away the secret sauce, are you able to elaborate on how you able to predict whether the market will trend?

Events such as the SNB/BOC announcements are scheduled so it's pretty straightforward to predict how the market will react post-event.

The harder skill is being able to predict how the market will react due to "unseen" events, e.g. sustained one way order flow from a larger buyer/seller.

This is especially hard in the FX space since there are no transparent order books (ECNs most likely won't see any of this flow).


Ernie Chan said...

Though you cannot see order flow in spot FX, you can always infer that from FX futures.

Ernie

Anonymous said...

I'm surprised you are able to infer much information from the FX futures book. FX futures have never really been an outlet for MMs offloading risk, the liquidity is too limited.

Unfortunately, the order flow with the highest information content tends to be internalized a lot more these days.

I think using order flow inferences to predict FX trends is very difficult beyond a few minutes (if that). The transparency just isn't there anymore.

Interested to hear your views.



Ernie Chan said...

Interesting point you made about order flow internalization: that is true for many asset classes.

However, I don't propose we use order flow to generate trading signals - only risk management. And if it is somewhat predictive for just 1 second ahead, it already serves its purpose.

Ernie

Anonymous said...

Hi Ernie,

Could we compute order flow on IB, but they provide snapshot data?

Ernie Chan said...

If you use VPIN (volume-synchronized probability of informed trading) to computer order flow, you would only need bar data from IB.

Ernie

Anonymous said...

Hi Ernie,

Do we really need volume bars to compute VPIN instead of time bars?

Where could we get volume bars?

Thanks.

Ernie Chan said...

You need volume to compute VPIN, and volume bars are the most convenient unit for computation. Please see the reference in my most recent Tweet.

Ernie

Anonymous said...

Hi Ernie,

Do you believe that we can build momentum strategies based on VPIN?

Ernie Chan said...

Yes, I do believe that.
Ernie

Anonymous said...

http://media.yucasee.jp/posts/index/14555?oa=ymr6003

please see the MDD of Hedge Fund vs SP500

Hedge Fund MDD is -20%

good work

MY MDD is big than Hedge Fund .

by DC

Anonymous said...

Hi Ernie,

If we build a intraday momentum trading strategies based on VPIN, what is the possible holding period? (10 seconds, 1 min, 5 mins, 10 mins etc..)

Does it need to be a high-frequency trading strategy, or we can trade it like a intraday one?

Thanks.

Ernie Chan said...

The holding period for VPIN depends on your strategy, and on the specific market. You will need to perform in-sample optimization to find out.

No, VPIN does not necessitate a HFT strategy. Some people I know even used it for daily strategies.

Ernie

Anonymous said...

Hi Ernie,

In papers, they compute VPIN for futures market. Could we compute VPIN for stocks market too? Is it effective in stocks market too?

Ernie Chan said...

Yes, VPIN should be effective for stocks too.

Ernie

JM said...

hi ernie!
you said:
"We backtested the strategy since 2008, but the data was very noisy for those days so the backtest was unreliable. The returns were always positive every year, but with varying magnitude. Otherwise we wouldn't start trading it in 2010."

So how long is your in sample/out of sample window in your walkforward tests?
its constant for all markets?

you said that your average holding period is one hour so whats your standard timeframe to generate signals 1min/ 5min 15min?
do you use non constant timeframes?

do you use often statistical arb or outright strategies?

thanks for reply!

Ernie Chan said...

Hi JM,
I am not sure whether your question refers to the FX strategy that we are running in the fund and managed accounts, or in general.

For the FX strategy, we have been running it live since 2010, so that is better than a walk forward test. Prior to 2010, we backtested it since 2008, and probably walk forward tested it for a couple of months before trading live.

We don't generate signals using bar data. We use tick data. Of course, on IB tick data really just means 250ms bars.

This can be considered an arbitrage strategy, since it pairs different currencies.

Ernie

Anonymous said...

Hi Ernie,

I usually backtest my low to medium frequency strategies using end of day closing prices.

Do you see any advantage of instead backtesting using VWAP? Being small enough not to impact VWAP, backtesting using VWAP would be more realistic than using closing prices which are impossible to actually trade on.

What are your thoughts on this?

Thanks.

Ernie Chan said...

There is no benefit to backtest using VWAP if your order size is not large.

You can certainly get filled at exactly the official closing price if you submit MOC order.

Ernie

Anonymous said...

Hi Ernie, I meant to ask you about your planned talk on low frequency data at quantcon. I am considering whether to travel to NY for this but not sure. If you can share, can you give a high level description beyond whats mentioned there - is this in regard to a problem with per-minute data, and other time frames, or is it something else?

Thanks,
-RB

Ernie Chan said...

Hi RB,
Outline: "It is commonly believed that low frequency strategies require only low frequency data for backtesting. We will show that using low frequency data can lead to dangerously inflated backtest results even for low frequency strategies. Examples will be drawn from a closed end fund strategy, a long-short stock strategy, and a futures strategy."

This is about sometimes we have to use 1-min bar data or even tick data to backtest a strategy that trades just once or twice a day.

Don't come to NY just to listen to me! Come because there are other speakers you like (see their talk outlines at the bottom of quantcon.com)

Ernie

Anonymous said...

Hi Ernie, thanks for this information. I do plan to come and will hopefully meet you folks.

-RB

JM said...

thanks Ernie!

you said "For the FX strategy, we have been running it live since 2010, so that is better than a walk forward test. Prior to 2010, we backtested it since 2008, and probably walk forward tested it for a couple of months before trading live. "

So you have the same strategy parameters since 2010? or you change parameters for example month to month?


you said:
"We don't generate signals using bar data. We use tick data. Of course, on IB tick data really just means 250ms bars."

do you use
1.bid/ask size data
2.direction of tick change data
3. deep level of bid/ask size data (5 best bid ask levels)?

Ernie Chan said...

Hi JM,
We have made continuous improvement to the strategy since 2010, but it has been stable since 2012.
We cannot disclose exactly what data we used, for obvious reasons.
Ernie

Anonymous said...

Hi Erine

Have you ever traded FX at Lmax? Any Comment?

Thanks

leo

Ernie Chan said...

No, Leo, I haven't.
Ernie

Anonymous said...

Hi Ernie,

Did you compute VPIN?

Do you use t distribution or Z (normal)
distribution to compute CDF?

Is there any difference?

Thanks.

Ernie Chan said...

Yes I have. If you use volume bars, the distribution is close to normal.
Ernie

Anonymous said...

Hi Ernie,

In IB API, they provide 5 seconds bars for market data, did you use that before?

Does its traded volume cover all Exchanges in IB?

Thanks.

Ernie Chan said...

I have used that before, but we generally use ticks these days.

Stocks volume should be consolidated across all exchanges.

Ernie

Anonymous said...

Hi Ernie,

I want to build an indicator using traded volume.

Do you believe that it is better to use
5 seconds bars instead of ticks data in IB (snapshot data) because there may be some traded volume missing in snapshot data, but 5s bars have all traded volume?

Many thanks.

Ernie Chan said...

I don't see why snapshots data have missing volume. IB's snapshots are basically 250ms bars.

Ernie

Anonymous said...

Hi Ernie,

However, in IB, it seems that accumulated volume in 250ms bars will NOT be consistent with that in 5s bars.

And 5s bars will not be consistent with historical 1 mins bars since Primary Exchange update their volume officially every 30 seconds.

Is that right?

Ernie Chan said...

The exchanges data feed is tick-based: it reports every trade and quote updates, so I am not sure how it can update volume every 30s. If you have the reference to your statement, please post it here.

Ernie

Anonymous said...

Hi Ernie,

Thank you for response.

I just chatted with IB API support.

I asked about the difference between
their snapshot data and 5s bars.

In the beginning, I thought if we accumulate trading volume in 250ms bars, then we can get volume in 5s bars, but he told me this is not the case in IB data.

That is what he told me.

IB does not provide tick data,
and Primary Exchange update trading volume every 30 seconds, so their trading volume in snapshot data will not be consistent with that in 5s bars. And 5s bars will not be consistent with historical 1 mins bars because there is bust and cancellation.

Basically, I am quite confused with what "snapshot" means in IB data. (250ms update)

For many stocks, there may be no trades even in 1 min bars.
How often do they update trading volume for their snapshot data? every 30 seconds ??

Thanks.

Ernie Chan said...

Rather than trying to disentangle what exactly IB's volume is, just subscribe to IQFeed, which provides ticks. You can add up the trade sizes to create a bar volume yourself.

That would not be identical to historical volume bars due to various corrections, but that's all you can get in live trading.

Ernie

Anonymous said...

Hi Ernie,

Thank you for response.

I used IQfeed data before, but I did not use their API.

Have you have tried IQFeed API before? Is it easy to use Java to call their API because I use IB Java API?

It seems they charged extra $324/year upfront for their API.

Ernie Chan said...

I have not used IQfeed personally, so I can't tell you how easy their API is. I just learned from someone that this is the feed to use if you want true tick data.

Ernie

Anonymous said...

Hi Ernie,

US stocks markets are quiet today.
Do you know why?

Ernie Chan said...

My question is: why shouldn't it be quiet?

Seriously, we need only explain volatility, not the absence of volatility.

Ernie

Anonymous said...

Hi Ernie,

Impressive return for the program, congratulations!

I´ve Always wondered if such figure was meant to be with or without taking leverage into account? I.e. is that applicable to a client who opted to use 1:1 leverage for the year ?

Thanks, B

Ernie Chan said...

Hi B,
All returns reported are based on net P&L divided by account NAV. In other words, they are levered returns.

As the fine print says "This account has a leverage of approximately 10, and the client’s managed account will need similar leverage to achieve comparable results as the pool’s account."

The client can dictate whatever leverage they prefer. But in general, instead of investing $1M and ask us to trade at x1 leverage, we recommend just invest $100K, so we can trade at x10 leverage.

Ernie

Anonymous said...

Thanks Ernie, that clarifies.
Regards, B

Anonymous said...

I've been using a new quant platform that both connects to IB and to the DTN/IQFeed service. It's called AlgoTerminal, and can be found at www.algoterminal.com
You can develop and backtest trading strategies using historical data from IQFeed.