$BBY.L – Balfour Beatty – trading update disappoints

Shares in heavy construction firm BBY (Balfour Beatty) fell 15.3% to 190.50p today after releasing a disappointing trading update. The Independent reports (http://is.gd/cXp4KD): “it warned of a new £75 million black hole in its UK profits and called on accountant KPMG to carry out a forensic review of its troubled UK construction arm.”

Its z-score is in distressed territory, and is the lowest that I have seen it this decade. Its gearing has risen over the decade, too. Stockopedia has flagged it as a short-selling candidate on its Earnings Downgrade Momentum Screen. So it’s all a bit of a mess.

I became interested in BBY a couple of years ago (http://is.gd/6tNBFp), when I noticed that it was one of only two heavy construction companies that that passed the Ben Graham Defensive Investor test. They had doubled their earnings over 10 years, and had at most two downturns in PEs of 5% or more. I thought it looked quite promising at the time, given its reasonable valuation.

Unfortunately, it was not meant to be. Since 07-Sep-2012, the shares are down 32%, compared with a rise of 16% of the Footsie. The shares crashed later that month, but you would still would have lagged the Footsie if you had bought in at September’s cheapest price.

Although BBY had a good track record of dividend growth, I was not tempted to buy in. I believed the company to be “too boring”. It looks as though Mr Market was correct in spotting the poor subsequent performance of the company. BBY is another addition to the growing list of large-cap companies that have been punished severly by the market this year. TSCO (Tesco) is down 44% YTD. Who would have believed that at the start of the year? BBY is down 34%. Money-printing company DLAR (De La Rue) is down 45%. The other supermarkets are, likewise, huge disappointers.

There’s a salutary warning here. Although it is tempting to buy ostensibly solid companies at reasonable valuations, it is by no means obvious that share price knock-downs following poor results represent bargain opportunities. The shares can take years to recover. I think that investors need to ask themselves if they think the company still has good growth prospects. Alternatively, if you are thinking of investing in a turnaround situation, are you convinced that the recovery prospects are actually quite good? If not, then buying because you think the shares are cheap is likely to be a disappointing decision.

Fans of dividend investing need to be very careful. TSCO is a case in point. Backtrace a couple of years, and it would have appeared to have been a no-brainer solid yielder dividend stock. However, the interim dividend has been slashed this year, and given the accounting problems that have emerged recently, it’s completely unclear what the final dividend will look like. Analysts projections suggest that the current projected dividend yield will be 2.6%. This is likely to be a huge disappointment to both current and prospective dividend investors.

My cynicism on dividend investing styles grows.

Posted in Uncategorized | Leave a comment

TATE, TSCO, ASC

The stock market has been very interesting this year, and even large-cap shares have been vulnerable. There’s no such thing as a safe share.

TATE (Tate and Lyle) issued a
profit warning, with supply chain issues, weather affecting corn plant production, an an industrial incident at its Singapore facility. Shares are down 17% to 607.5p in early trade.

TSCO (Tesco) shares are down another 2.4% as at writing, with a share price of 198p. I wrote about Tesco at the end of August
(http://is.gd/fiA5WN), and came up with a fair value for Tesco of 200p, based on a dividend growth model. So TSCO do not look compelling value to buy, at the moment. I now think my estimate of value is likely to be overstated, though. The recent news of accounting mis-statements must surely mean that my assumption about future dividends was too optimistic. Its bonds slid. In June, Moody’s downgraded Tesco’s rating to Baa2, “an obligor has ADEQUATE capacity to meet its financial commitments. However, adverse economic conditions or changing circumstances are more likely to lead to a weakened capacity of the obligor to meet its financial commitments.” It is still considered investment grade. At the time, Moody said that Tesco’s outlook was stable, so another downgrade was not anticipated. In light of recent developments, it will be interesting to see if there is a shift in its ratings.

TSCO is an example of a value investors worst nightmare. They look cheap all the way down. Things go from bad to worse, and what once looked like good value now looks like overvalued. We must constantly remind ourselves that value investing is no panacea, and that cheap PEs could merely be a reflection of low (or even negative) growth, or riskiness.

TSCO still has the ability to rock the markets, suggesting that the share price has not fully absorbed all information. From where we stand today, there looks like there could be a lot more bad news down the pike. I’m glad I am on the sidelines merely looking on.

I think one thing that can save investors a lot of money is to never to double-down on a losing trade; except, perhaps, under the most exceptional of circumstances. I’m not keen on pyramiding, either. My view now are to plonk your money down, without makeovers. It’s all about risk control. Investors must always face the possibility that they could be wrong. Don’t compound your mistake. If the fundamentals turn against you, and there’s a change that contradicts your original views on the company, then I think it is best to get out. Close your position. Gone. There’s nothing to stop you setting up a new one some time down along the line. But you want to make sure that the fundamentals are in your favour. Tesco is really going downhill, and there’s no telling how far down it will go. Price will follow fundamentals, and they are crumbling at the moment. There’s no telling how bad it will get. It’s better to stay uncommitted. Don’t be trigger-happy. At some point Tesco may be a great turnaround stock. Then will be the time to invest.

ASC (ASOS) has been a remarkable rollercoaster ride for shareholders. I advised against buying on takeover speculation, when the price was 2686p. Redrut on Seeking Alpha argued for a valuation on £30-34. In April, I noted that ASOS had made a “death cross” at 4236p, which is often regarded as a bearish indicator. I never advocate making buys/sells based purely on technicals. Fundamentals, and valuations matter, with technicals, perhaps, giving an indication of market psychology. In this instance, the death cross was a signal that worked. To my mind, its signal was fairly clear: ASOS is a fantastic growth stock but on sky-high valuation levels. It had great momentum behind it, and the lesson here is that a death cross should have been taken as a loss of momentum. Those that had not spotted that the momentum game was over, and did not view the shares in terms of fundamental pricing or valuations are likely to have suffered large and confusing losses. So beware. I am not trying to dismiss momentum investing, as there is considerable evidence to support the view that it works. But you have to know “where you are” in valuation and market psychology terms. Momentum investors need to know “what kind of share they own”. I think they also need an exit strategy. No investment strategy is infallible. Not one of them. Investors need to work out for themselves when they should book profits, or cut losses.

Back in March, I produced a valuation for ASOS at £20. The shares were at 5528p at the time, so the valuation must have looked like complete madness. The share price is not 1951p. To be honest, I never actually expected it to reach that level. At around May time, it looked like the downward momentum would reverse, and that my valuation of £20 would be wide of the mark. So, I am as surprised as everyone else that the shares actually made it to £20. Note, however, that at £20, the shares could have only been considered fairly valued at the time. The fundamentals are not as favourable as they were then, so if I were to take another stab at valuation, it would be lower. I note that Stockopedia has flagged ASC with two 0 long screens and 2 short screens: M-score and earnings downgrades. Despite being at its 52w low, and having hit a high of 7195p, I think it is a risky trade to go long on. Maybe there will be a trend reversal in the near future and prove the bulls right. I don’t know. I think it’s a bad way to bet, though.

ASC 1955p. TATE 607.5p. TSCO 198p.

Posted in Uncategorized | Leave a comment

Lame joke: A physicist, mathematician and engineer …

It might be unknown by many of you that I have a PhD in mathematics and work in the Oil & Gas industry. After all these years the latter field, I am actually trying to gain some knowledge of Oil & Gas. It is hard for me, as I rate myself as being extremely poor at acquiring knowledge. My brain is quite old now, so often it is a case of information going in one synapse and out the other. O&G has a lot of engineering discipline surrounding it, and, what with my recent mathematical musings, it brings to mind an old joke about a physicist, mathematician and engineer. It goes something like this …

So, a physicist, mathematician and engineer were asked to find the volume of a big red rubber ball. The physicist drops the ball into water, and measures the volume of water displaced. The mathematician gets some calipers, measures the diameter of the ball, and calculates the volume mathematically. The engineer, on the other hand, picks up the ball, writes down its serial number, and looks up the volume in the big red rubber ball specification table.

Well, I didn’t necessarily say that it was a funny joke.

Posted in Uncategorized | 1 Comment

Simplification of defuzzification in Fuzzy Logic

I have just noticed that my article on Datalog has had far more hits than my articles normally do. The unit conversion program arose because I was interested in another problem: preparing sets of accounts and investment track records. I have written a C program that already does that, but I am thinking of investing in the US market, and that introduces the problem of currency exhange. It raises the question: “how much is a share worth?”. The answer to that question is dependent on time, the value of a share, and the exchange rate. There is nothing necessarily especially difficult about programming a deterministic solution oneself, but it is the kind of problem that lends itself well to Datalog. It is a topic that I may well return to in a later post.

In the meantime, the whole point of my post is to throw out some ideas I had about Fuzzy Logic. Being an investor, I am interested in decision-making processes, and how mathematics and statistics might give me an edge. I am very very new to Fuzzy Logic, and still trying to absorb some basic terminology, and even underlying ideas.

So, it may seem a little presumptuous to say that I have some ideas that may contribute to the field of Fuzzy Logic. To that end, I have written a little article entitled “Simplification of defuzzification in Fuzzy Logic”. Its abstract is:

In the traditional Fuzzy Logic approach, each consequent is expressed as a fuzzy set. Typically, these sets are combined to form a complex shape whose COG (Centre of Gravity) is computed. This article argues that fuzzy consequents can be replaced by crisp consequents. By partitioning the solution space, a lot of elaborate modelling and computation is removed. An example is shown in which the simplified approach gives an answer which is very similar to a more elaborate process.

The article has lots of mathy-type terms, so I can’t really produce the content here. You can download or view a PDF version straight from my site, though: ftp://markcarter.me.uk/defuzz.pdf . Some knowledge of Fuzzy Logic is assumed, so don’t expect to be able to pick it up without knowing something about the field. I intend to write an introductory article for the complete beginner at some point. So, my apologies in advance if it is not quite the material you were hoping for. Be warned: I am terrible at reviewing my own work. There may well be inaccuracies in it. To me, the fun is more in coming up with the ideas than in the spell-checking.

I feel as if I am only just dipping below the surface of some of these concepts, and believe there may be some unification between Fuzzy Logic, Bayesian reasoning, and naive heuristic algorithms waiting to be uncovered.

I would really like to extend a huge “thank you” to the readers of my blog.

 

Posted in Uncategorized | Leave a comment

Logic programming example: unit conversion using Datalog

Logic programming can reduce your code size, and make deductions based on facts. I’ll illustrate this using pyDatalog, a Datalog implementation in Python 3, to create a unit conversion program. I provide it wil some basic facts about how many meters, miles and feet there are in an inch, together with two conversion rules. Using those rules, I can use Datalog to “automagically” convert between any two units, even though I haven’t explicitly told it how to perform the conversion.

Let’s start with the completed code first:

from pyDatalog import pyDatalog
from pyDatalog.pyDatalog import create_terms as terms
from pyDatalog.pyDatalog import ask

pyDatalog.create_terms('scale') # the long way of doing it
terms('A, B, C, V')

scale['meter', 'inch'] = 39.3700787
scale['mile', 'inch'] = 63360.0
scale['feet', 'inch'] = 12.0

scale[A, B] =  1/scale[B, A]
scale[A,B] = scale[A,C] * scale[C, B]

print(scale['inch', 'meter'] == V)
print(scale['mile', 'meter'] == V)

terms('conv')
conv[V, A, B] = V * scale[A, B]
print(conv[3, 'mile', 'meter'] == V)
print(conv[1, 'meter', 'feet'] == V)

There is a division bug in pyDatalog v 0.14.6, so if you want to run the example, you will need to check out changeset b1a5df9 until a new version is released.

Now let me walk through the code. First, I import the pyDatalog module, and define some convenience functions:

from pyDatalog import pyDatalog
from pyDatalog.pyDatalog import create_terms as terms
from pyDatalog.pyDatalog import ask

Next, let’s create some terms: scale, which is a function (actually a term) where we specify how one unit relates to another, and A,B,C, V, which we think of as matching “variables”:

pyDatalog.create_terms('scale') # the long way of doing it
terms('A, B, C, V')

Then, let use give some facts about how to scale between various units:

scale['meter', 'inch'] = 39.3700787
scale['mile', 'inch'] = 63360.0
scale['feet', 'inch'] = 12.0

So, these facts state that 1 meter has 39.3700787 inches, and so on. They look like functions, but they are in fact terms:

In [3]: type(scale)
Out[3]: pyDatalog.pyParser.Term

The same applies for A, B, C, and V. So far, so good. But what if we want to convert, say, inches into meters instead of meters into inches? Then we need an inverse rule:

scale[A, B] =  1/scale[B, A]

Let’s test it:

In [5]: print(scale['inch', 'meter'] == V)
V
-----------------
0.025400000025908

Datalog has used the inverse rule to “go the other way”. There is some minor magic going on here. Note that we didn’t specify which fact to use for inversion, Datalog figured it out for itself.

Now let’s cast some real magic. Specify a transition rule:

scale[A,B] = scale[A,C] * scale[C, B]

which states that you can get from unit A to B if there exists another unit C that serves as an intermediate conversion. Now test it:

In [6]: print(scale['mile', 'meter'] == V)
V
------------------
1609.3440016415307

Good. It’s cleverness doesn’t stop there:

In [7]: scale['league', 'mile'] = 3.45233834

In [8]: print(scale['league', 'meter'] == V)
V
-----------------
5555.999999116079

Notice how there is no simple way to convert from leagues to meters. Datalog must deduce a chain of transitions in order to obtain the result.

To round things off, let’s define a convenience function, “conv”, which converts V units in A into units of B:

conv[V, A, B] = V * scale[A, B]

Perhaps we could have used a simple python function for that, but let’s keep with the paradigm. We can then ask questions like: what is 3 miles in meters:

In [9]: print(conv[3, 'mile', 'meter'] == V)
V
-----------------
4828.032004924591

Bon apetitite.

Posted in Computers | Tagged , , | Leave a comment

#encfs – easy userspace file encryption on Linux

BLUF: encfs provides unfussy user-level mount/unmount of an encrypted directory that can be migrated across machines.

Ah, encfs, where have you been all my life? I have been storing passwords in Keepassx. It is an excellent cross-platform password manager, but it is GUI-only. It is also not a file storage mechanism. I like to access passwords from the command line, and I have yet to find any good tools that I like. Most of them just plain don’t work due to their age. for example, “cpm” is a console password manager available in Debian. When I try to run it, it bails out complaining “Can’t attach to parent!”. A search on Google reveals that it has problems with the more modern kernels. That’s hardly ideal.

To install encfs on Debian is straightforward:
sudo apt-get install encfs

Create two directories, e.g. ~/encrypted and ~/decrypted. Mount them: encfs ~/encrypted ~/decrypted
Enter a password that you want to use.
cd ~/decrypted
Created files, subdirectories, and edit away.
You can unmount the directory by typing
fusermount -u ~/decrypted
It’s that simple!

Mileage will depend on use-case, and it is by no means the hammer for every security nail. It does, however, work for me. Points to note: + simple and easy to set up and use
+ The directory has a separate password, distinct from user login. Skim-reading suggests that it can be PAM-enabled and mounted transparently, though.
+ Directory structure is preserved, so it is possible that crackers will be able to deduce the approximate size, quantity and
directory layout of the decrypted directory. File and directory names are themselves encrypted, though. Some might not like that idea, but it works for me
+ mounting is preserved across login sessions. That is great for convenience, although might be considered a security risk. Unmounted it when you exit the system if it’s a concern to you.

So, based on an initial valuation, encfs is an excellent tool. I sometimes use Truecrypt, which an excellent tool, but it seems more difficult to use on a command-line only environment. The GUI is “OK”, but it will be fiddly to use in my Linux environment. I also find the Truecrypt a bit tedious to set up, especially if I have migrated machines. It’s not “too” bad, but getting it to remember key files and preferred mount points is a bit of a chore. In encfs, I wrote a script called “enc” which does the mounting and unmounting for me. Job done.

Posted in Uncategorized | Leave a comment

PDF on 2-stage growth DCF calculation explanation

If you have been following my posts on 2-stage DCFs, you may be interested in a PDF that I have written that explains where all the formulae come from. I intend to write more in the article, but it stands alone as-is, and shows how Damodaran arrives at his 2007 valuation for 3M. You can obtain the article here:
ftp://markcarter.me.uk/aswath.pdf

I was thinking of creating a javascript page that does a two-stage calculation for you, so that people don’t have to fiddle around with Excel or Fortran. All in good time, though.

Have fun.

Posted in Uncategorized | Leave a comment