Archives

All posts for the month November, 2015

A great example of how analysing and alerting traders to changes in the microstructure liquidity skew can give edge on determining direction and intra-day price performance.

  • Telecom Italia underperformed its basket of peers from the open, down by 80bps at its lows.
  • 15 minute moving average liquidity skew was pretty evenly matched from the open but saw a large build in passive bid side liquidity at the lows just after 10am – ALERT
  • With transacted volume well below normal, it is clear the buyers were struggling for liquidity yet unwittingly laid a visible footprint in the market.
  • Having shown their intent to the market, the shares then begin to rally hard, c250bps, and begin to outperform the peer basket. Note that volume also picks up considerably.
  • Towards the highs the liquidity skew changes completely and offer side liquidity is dominant (note the buyers have completely fallen away) – ALERT
  • The days highs are seen shortly afterwards and sellers can be seen posting further outsized sell orders which drive the shares back towards the basket. – ALERT
    TI

Here at OTAS, we run a private, internal instance of Hackage to easily share our Haskell packages and documentation amongst our developers. It’s really a core part of our Haskell development workflow and, once fully set-up, integrates seamlessly with Stack. Unfortunately, I’ve found deploying the server to be tricky and poorly-documented, so I’ve written this guide to help make the process easier.

We use Stack for building all our Haskell projects, so we do not explicitly install either GHC or cabal-install on our machines. I’ll assume you have a working installation of Stack on your machine before you begin. Cabal-install users should be able to follow easily enough.

Building the Hackage Server

I’ve found it very frustrating to build the hackage-server packages listed on Hackage. At the time of writing, two version, 0.4 and 0.5.0, are listed, both of which have an extended list of dependencies which Cabal’s solver isn’t able to resolve for me. As such, I went directly to the Github source and decided to build the most recent commit at the time of writing, e0bd7fc2a8701a807a5551afc1ab1e9df4179e81.


git clone git@github.com:haskell/hackage-server.git 
cd hackage-server
git checkout e0bd7fc2a8701a807a5551afc1ab1e9df4179e81

Stack successfully generated this stack.yaml file (using stack init --solver) which you can copy into your working directory to reproduce the build. Simply run stack build to generate the executables.

Running Hackage

Before we’re ready to initialise the server we need to generate private keys using hackage-repo-tool. First build and copy this program to your path with Stack then generate and install the keys.


hackage-repo-tool create-keys --keys keys
cp keys/timestamp/.private datafiles/TUF/timestamp.private
cp keys/snapshot/.private datafiles/TUF/snapshot.private
hackage-repo-tool create-root --keys keys -o datafiles/TUF/root.json
hackage-repo-tool create-mirrors --keys keys -o datafiles/TUF/mirrors.json

Now we’re ready to initialise the server! In the following command, substitute the administrator username and password with your chosen credentials.

./hackage-server init --admin=user:password --static-dir=datafiles/

Finally, run the server on your chosen port.

./hackage-server run --port=4050 --static-dir=datafiles/

Now that your server’s up and running (and assuming your firewall’s correctly configured) you’ll be able to access the local Hackage instance through your browser. There you’ll find documentation for administrative functions such as user management. This wiki page may be helpful.

Automatically Building Documentation

We use hackage-build to automatically generate documentation for uploaded packages. This program requires cabal-install, its dependencies and GHC to be accessible on your PATH. Fortunately, we can use Stack to install cabal-install for us!

stack install alex happy cabal-install

Here’s where things get a little tricky. You’ll need to use a different instance of hackage-build for each version of GHC that your packages require to build. In my case, I have packages depending on base versions 4.7.0.2 and 4.8.0.1, so I require GHC versions 7.8.4 and 7.10.2. I’ve installed both of these locally, off-path, at $HOME/.local/bin/ghc-7.8.4 and $HOME/.local/bin/ghc-7.10.2 respectively.

Of course, Hackage will document your packages by building them with cabal-install, which may well fail to find a successful build plan. Before switching over to Stack, I used Stackage snapshots to constrain the range of packages cabal-install considered. Therefore, all my older packages build with lts-1.0, and all my newer packages with lts-3.12. In the future, I’ll release packages with using a more recent snapshot, but I’ll always control when this happens.

For me, then, the best course is to run a hackage-build instance for each snapshot I’ve used. Documentation will therefore certainly be built by this instance for a package known to build with the corresponding snapshot. For each snapshot, I initialise hackage-build in a separate directory using the username and password of the account with which I wish to upload the documentation with. Note that account needs to be enabled as a trustee.

./hackage-build init http://localhost:4050 --init-username=user --init-password=password --cache-dir=build-cache-lts-1.0 # For lts-1.0

In the newly created build-cache-lts-1.0 directory I edit the cabal-config file to include both Hackage and the local Hackage as remote-repos, and I add the constraints specified by the corresponding snapshot. The first few lines of the file look like this.


remote-repo: localhost:http://localhost:4050
remote-repo: hackage.haskell.org:http://hackage.haskell.org/packages/archive
remote-repo-cache: build-cache-lts-1.0/cached-tarballs
constraint: AC-Vector ==2.3.2
constraint: BlastHTTP ==1.0.1
constraint: BlogLiterately ==0.7.1.7

Remember, I perform the above sequence for each of my two snapshots. Finally, I can run each build client with its corresponding GHC version. For the lts-1.0 process, I use the following command.

PATH=$HOME/.local/bin/ghc-7.8.4/bin:$PATH ./hackage-build build --cache-dir=build-cache-lts-1.0

From here, it’s simple to script the builder to run continuously. Also check out the output of ./hackage-build --help for more options.

Enabling access through Stack

To alert Stack to your new internal Hackage, include its details in the package-indices section of your global config file (~/.stack/config.yaml). Instructions are provided here.

See Also

hackage-server wiki

Edsko’s commit on settings up TUF for the server

The dollar hedge is used throughout finance, and it is a bad idea.

To see why dollar hedges are used so widely, look into the reasons that people use them in the first place.

An uninformed investor might decide to invest in a stock because they want to invest in the stock, and partly because they have an understanding that the equity market as a whole should increase in value, and so they are quite happy to have exposure to both stock and market.

The dollar hedge is where you make sure that the total net dollar value of your portfolio is zero, by shorting or buying a hedging instrument such as a market future in order to balance your other positions.

The dollar hedge is where you make sure that the total net dollar value of your portfolio is zero, by shorting or buying a hedging instrument such as a market future in order to balance your other positions.

As the investor’s portfolio widens to more stocks, the market exposure adds up steadily, whereas the exposure to individual stocks tends to be diluted by diversification: If you have 1000 bets on 1000 stocks, the chances of losing money because they all happen to be under-performing stocks is small, but the chance of losing money because you’re long on all of them and the market crashes is very high. So if the aim is not to get market exposure, the investor can limit their risk by taking an opposing position in something like an index future or ETF. This is particularly important if there is a net long or short bias in their stock-positions.

It seems intuitive that if the investor has $1 M long in equities, then they should have roughly $1 M short in the index future. After all, the market future is meant to represent the market as a whole. But there is a problem: This almost always over hedges. This can be explained in terms of the average beta of your portfolio.

The beta of a stock to an index is how much you expect it to respond to movements in that index. A beta of 100% means that if the index goes up 5%, then the stock will also go up by 5% on average. A beta of 50% to an index going up 5% would mean only 2.5% expected rise in that stock. On average the beta should be 100% – but *only* if the stock is one of the index constituents. In fact, the most traded indices (or futures / ETFs on those indices) have quite a small list of constituents (for instance the FTSE 100 or Eurostoxx 50), and if you’re trading outside that small list (which you typically will), the average beta does *not* have to be equal to 100%, and in fact is normally lower.

OTAS Technologies makes extensive use of in-house risk models. We noticed this effect when we found that the average beta for a range of sensible portfolios was significantly less than 100% to the Eurostoxx 50. We spent some time fixing things, putting checks in place, and analysing our smoothing and data cleaning processes. Useful though that was, ultimately the effect was real.

We suspect that the effect is partly due to simple maths: different things drive different stocks, and a random stock outside the FTSE 100 will not necessarily be pushed around by the same thing as the FTSE 100. Then there’s a capitalization bias: These indices focus on large cap names, whereas the average portfolio might not. Then there’s also the possibility that the market indices drive themselves: Because they’re considered to be a proxy for the market, they get traded by people who take large macro views, and perhaps that causes their constituents to behave subtly differently to the average stock.

The effect on the average portfolio manager of getting this wrong can be stark. The beta hedge is guaranteed (if the beta is calculated correctly) to reduce the risk of the portfolio, but the dollar-neutral hedge is not. We have seen extremely plausible portfolios where in fact the dollar-neutral hedge *increases* risk by even more than the beta-neutral hedge decreases it. The most important effect, though, is for portfolio managers who tend to have long ideas and so end up with a short hedge. If they pick a dollar-neutral hedge, they will have an overall short exposure to the market. This will increase their risk, and get them negative drift (assuming that the market has a slight long-term upward drift). This is frequently the cause of the complaint that “We had good positions today, but the market went up and we lost money overall on the hedge”. It’s certainly the case that a well-hedged book can lose money if the market goes up. But on average, if the portfolio is well balanced, using beta- not dollar-neutral hedging, the portfolio will not normally have down days simply because the market went up.

To summarise, there’s good news and there’s bad news. The good news is that you don’t need to hedge as much as dollar-neutral. The bad news is that you might currently be short.

betagraph

A plot of all the stocks denominated in euros in the OTAS universe, sorted by market cap. The y-axis is their beta to the Eurostoxx-50 index futures. You can see that some stocks have a beta well above 100%, but the majority are significantly below 100%, as shown by the red and blue averaging lines. The red and blue are to the future and to the ETF respectively. (The calculation used almost 6 years of returns from 2010, 5-day returns, and some winsorizing.)

In part 2, coming soon, we’ll hopefully look at some specific examples of when the dollar hedge has messed up a portfolio’s risk profile and performance.

 

 

Underlying data courtesy of Stoxx. The Stoxx indices are the intellectual property (including registered trademarks) of STOXX Limited, Zurich, Switzerland and/or its licensors (“Licensors”), which is used under license. None of the products based on those Indices are sponsored, endorsed, sold or promoted by STOXX and its Licensors and neither of the Licensors shall have any liability with respect thereto.

You might be looking at China’s domestic dairy giant today. Yashili International Holdings issued profit warning of net profit -55% overnight, and China Mengniu Dairy owns 51% stake of Yashili. The share price of Mengniu was slightly down -1% today, the impact was minimal due to the fact that Yashili contributes only 2% to Mengniu’s net profit. With that being said, the stock price of Mengniu might look interesting at these levels. There are a couple of positive signals for Mengniu we could gather from OTAS.

In Short interest, 1.9% free float shares are on loan, down by more than 10% over the past week. With the share price trading at one year low, it is hard to see any fresh shorts build at these levels. The outstanding shorts will need 3.8 days to cover.

1 2

The forward dividend trend expected to show continued strength. The 12 months forward yield of 1.7% is extremely high relative to the Food Beverage & Tobacco sector over the past two years.

3

Stock valuation is looking attractive, the 12 months forward P/E valuation of 15.0x is extremely inexpensive relative to valuations over the past two years.

4

Walmart (WMT US) reported earnings on Tuesday beating analysts expectations as well as raising forward guidance. With the company in the papers recently with their plan to raise minimum wage as well as the search to reduce costs by employing more technology while improving customer service, can we expect to see WMT’s recent earnings driven rally continue?

The stock price has under performed the industry and market for the past few months, as well as the stock price spread vs. the Retailing industry is at 2 standard deviations low, though starting to recover post Tuesday’s rally:

WMT PerfWMT Perf table

WMT Spread

Implied Vol is also showing positive directional indications for the stock price. Though we see implied vol vs. the industry coming down post earnings, we see in the Top Ten Traded Volume that investors are still bullish on the stock as they are transacting in near date out of the money calls:

WMT Implied Vol tableWMT Implied ChartWMT Vol

Additionally, with the stock going ex-div in a couple of weeks, the dividend is flagging as higher than normal vs. the industry as well as on its own absolute level:

WMT Div

WMT Div Graph

 

 

Yesterday Bank of Japan leaves policy unchanged as expected, market action nothing spectacular. Japan is now trading at 3 months high, currency stable with ¥/$ at 123. Japan sees limited upside today after rallying ~2% this week and ahead of long weekend. But interestingly, OTAS has flagged a Japanese stock which indicated multiple negative signals: Toshiba – the stock was down 6% on huge volume last Friday, and currently trading at lowest level since 2012. The company’s Westinghouse unit wrote down totalling ¥150bn in FY2012 and 2013 which raised questions whether the losses should affect how Toshiba accounts for the overall value of Westinghouse. And worse, the company may be fined over ¥7bn in accounting probe. The poor sentiment for Toshiba is driven by concerns surrounding management shake ups, accounting scandals and disappointing earnings. OTAS CDS, Short Interest, EPS Momentum, Valuations all indicated negative red flags.

Read more on OTAS News App:1(Source: http://www.reuters.com/article/2015/11/13/toshiba-westinghouse-idUSL3N1381N220151113?feedType=RSS&feedName=hotStocksNews#6st7eHg1KZbO07cP.97)

 

Recent share price performance vs market and peers, lowest since 2012.

2

 

Five-year CDS on Toshiba widened out 45% over the past week to price at the widest levels since 2012. The cost of credit protection on Toshiba has also risen significantly in the last six months and is now pricing firmly in non-investment grade territory.

Read more on OTAS News App:3(Source: http://www.reuters.com/article/2015/11/16/idUSFit94014120151116?feedType=RSS&feedName=technologySector#bdqLEwktlLYlSmq2.99)

 

4

 

Short interest has been climbing to all time high.

5

 

EPS Momentum had fallen sharply.

6

 

And lastly, it is highly expensive compared to its sector. The 12 months forward EV/EBITDA valuation of 6.1x is very high relative to valuations over the past two years.

7

OTAS Lingo allows you to create automated reports for any Market, Index, Sector or Portfolio.

Using natural language generation. Lingo provides you with key analysis of all the pertinent activity in the stocks that you care about, such as upcoming calendar events, price performance moves, implied volatility, short interest, cost of credit protection, valuation, dividend yield, technical signals and insider dealings.

These reports are to the point, unbiased, available on a number of frequencies and can be delivered directly to your inbox, mobile device or tablet!

To access OTAS Lingo or subscribe to receiving automated reports, simply go to the OTAS Launcher and click on ‘Lingo’.

Launcher Lingo

 

Use the search box to find your watchlist, a given index, market or sector.  You can also choose from the list displayed on the right hand side (‘Top Lists’ will display the most frequently accessed ones).

Lingo

 

To subscribe to receiving the report on a periodic basis, simply click on the ‘Subscribe’ button and choose the time period for the report as well as the frequency.   You even have the option to select a given time of the day or a specific day (in the case of weekly, month to date and monthly) that you would like to receive it.

Lingo Settings

 

Lingo reports can be set up for multiple universes and are available directly through the Lingo App, via email or through the Express App.

If you require assistance in accessing or subscribing to Lingo reports, or navigating any other aspect of OTAS, please contact support@otastech.com or your Account Director.

 

Coming Soon…..

  • The ability to  customise Lingo reports to only those observables that you care about.   Users will have a default template with all Lingo contents but be able to create new templates and customise contents. One can choose the default template for Lingo component as well as select template for each subscription.

New Picture (2)

 

  • Intraday Lingo Reports/ More flexible timeframes for delivery

The OTAS Help pages are a comprehensive guide to navigating each and every aspect of the product.

Whether you are looking to create a watchlist, or simply understand what a particular stamp is showing, there are individual pages detailing all relevant steps, definitions and methodologies.

Help Pages

To access the relevant Help section, simply click on the question mark icon in the top right hand corner of your OTAS App, window or frame.

 Help icon

If you require assistance with locating or understanding the relevant Help pages, or navigating any other aspect of OTAS, please contact support@otastech.com or your Account Director.

 

The News App within OTAS provides access to worldwide news stories on a specific Stock, Index, Region or a custom Portfolio/Watchlist.

This comprehensive service receives over 150+ direct RSS feeds every 2-3 minutes. These are then processed by our in house news classification engine using topic tags such as:

  • Results Announcement
  • Forecasts
  • Estimate Changes
  • Regulatory, Interviews
  • IPO’s
  • Upgrades/Downgrade
  • M&A
  • Analyst Commentary.

Further to that, stocks that are highlighted in the story or that may be impacted by the headline will be tagged to the individual news item.

To access the News App, simply go to the OTAS Launcher and click on ‘News’ under the ‘Apps’ dropdown.

Launcher-News

Then type the name or ticker into the Search box

News Search

News App

In addition to the App, the news feature can be accessed via the single stock page on the Core Dashboard or available through a tab on the Express App (compatible with mobile or tablet for when you are on the move).

If you require assistance the News service or navigating any other aspect of OTAS, please contact support@otastech.com or your Account Director.

Coming Soon…..

A News Stamp for single stocks within the Core Summary App, highlighting increased coverage based on a historical moving average.

With a higher chance of US rate hike in December, the OECD cutting global growth rates, land sale withdrawal, Hong Kong government to provide more subsidized housing and broker calling for a decline of 33% in physical property, the stock price of the real estate sector in Hong Kong has been weak.

From an OTAS perspective, Hong Kong property looks interesting given the sector’s valuation is near 2 years low with dividend pay-out at 2 years high. OTAS pick: CKP (1113 HK), Kerry (683 HK) and SHK(16 HK) are among the low valuation names. Kerry (683 HK), SHK (16 HK), New World  (17 HK) and Hang Lung (101 HK) are displaying the most attractive sector-relative dividend yields.

1

2

3

4

SHK (16 HK) is trading at an attractive level in terms of the P/B, MSCI benchmark/sector. SHK is a quality developer and its market share in residential market is always steady. The stock price has been down 28% from high in June. Also note that final dividend will be paid out next Monday November 16.

shk

CKP (1113 HK) price change has been down -10.47%, but EPS changed -0.6% only. The stock has been underperformed despite its steady dividend pay.  Also the company just sold 7 houses on Barker Road, total proceeds of HK$4.24 billion.

ckc1

ckc2

The retail rental outlook is also a concern, as Hong Kong retail sales fell for the ninth month in September mainly due to decline in mainland tourist spending. After Wharf (4 HK) had announced that its mall sales were down by 11%, we see that Wharf is trading at a nearly record high short sell level.

5