Sunday, 24 February 2013

Retirement Planning

I'm fortunate to work in an industry and for a company which is focussed on providing better financial outcomes for ordinary people. Such work is especially relevant in this age of austerity, in which saving for the future is a low priority for the majority of people. This is ticking time bomb which will no doubt result in significant future social problems.

Some years ago, we were researching innovative ways to create tools which could help people figure out a long savings plan in order to provide a sustainable income in retirement. My company has a wealth of software and research assets which we were planning to deploy but I figured it'd be a good idea to think about the number crunching from first principles; so I set about creating a rough model in Excel. After an evening's work at home, I'd created this. It's by no means sophisticated and, unlike many of the solutions which we've subsequently created at work, is purely deterministic rather than employing a robust stochastic method. If you find it useful, feel free to use it for non-commercial purposes (under an Open Source licence).

Please note just a couple of things:

  • It's not finished! It served my purpose of getting my head around the problem in terms of the mathematical background and I left it at that.
  • You'll notice it's geared around the UK tax regime.

You can download it here - you do so and use it at your own risk!

Saturday, 25 June 2011

Clouds glowing and flickering as if illuminated by flame. Noctalucence or other phenomenon?

On a recent holiday in the Yorkshire Moors, I observed clouds flickering red and yellow in a way in which I have never seen before. I captured the phenomenon on video, a link to which you’ll see below. The effect was as if the clouds were illuminated by a flame; the intensity and colour of the reflected light shifting rapidly as if caused by a flickering candle.

The observation occurred at 54°23'26.88"N 1°14'13.24"W on 23 June 2011. Observation began at 2210 UTC and the effect continued to beyond 2315 UTC (at which time I retired to bed, leaving my video camera trained on the sky in order to record any interesting developments). The phenomenon was observed at an arc of perhaps 30 degrees north-northeast. My compass suggested a range of between 020 to 040 degrees.

Initially, I wondered whether I was watching noctilucent clouds (which I do not believe I have seen previously) but a search on the Internet suggests that these are generally at extremely high altitude. I would guess that these clouds were no more than 5,000 ft (as a private pilot, I consider myself to be reasonably competent at estimating cloud height). They certainly weren’t at the tens of thousands of feet at which noctilucence typically occurs. And do noctilucent clouds shimmer as dramatically as these and in these colours?

My best guess is that it was simply sunset at altitude. The shimmering caused by the same process as causes light to bend in a mirage – photons complying with quantum electrodynamics – the “path of least time”; a gradation of air temperature (and hence density) causes rays of light to wiggle and seek the fastest path, opportunistically speeding through pockets of lower atmospheric density. Given that the light from the sun was travelling through tens of thousands of kilometres of turbulent atmosphere of constantly shifting density, perhaps this explains the flickering effect. Sun rays chaotically flaying around much as does a water hose when cast adrift. As the rays washed across the clouds, they flashed with illumination. But if this were the case, would you not expect it to occur commonly?

Or, perhaps my speculations are completely false and the explanation is quite different. Maybe it was simply a powerful light source over the hill, out of sight. A music festival? If you know better, please let me know. I’d be fascinated to know if you have specialised knowledge or experience which provides a more satisfying explanation. But please, rational explanations only – as entertaining as UFO etc. theories may be! Needless to say, it’s easy to imagine how our ancestors, lacking a basis of scientific knowledge and a rational mind, might easily resort to a supernatural explanation.

For completeness, here is how the landscape looks by daylight:

From Drop Box
And here's the video:

Monday, 2 May 2011

Solo flight by microlight to Australia

Inspirational and brave adventure by Dave Sykes to fly his P&M Aviation Quik microlight aircraft (ultralight, to many) from England to Australia. All the more amazing, as Dave is in a wheelchair following a motorbike accident nearly 20 years ago. He's raising money for the Yorkshire Air Ambulance as he goes.

Wired up with a GPS broadcasting his progress, you can follow on his website - At time of writing, he's approaching the South of France.

Saturday, 2 April 2011

Modelling your mortgage

Back in the nineties, I was considering a buy-to-let investment property. Given the way property prices rocketed over the next decade, maybe I should have done so. But anyway, I created a simple model to see how the investment might stack up, in terms of the cost of the mortgage, expenses and tax vs. expected rental income and capital growth.

I've used it a number of times since when re-mortgaging and figuring out how much mortgage debt I wanted to take on. I figured others might find it useful, so here it is to download. It's raw, contains numerous assumptions which may or may not fit your requirements and note that you'll need to be reasonably spreadsheet savvy. If you're looking for a flashy, easy-to-use tool then this probably isn't for you. But if it is for you, you might find it useful to assist in:
  • Figuring out the monthly payment for a given principle sum and term
  • ... or figuring out the term, for a given monthly repayment and principle
  • ... or some other combination you may see fit to calculate
  • Model a buy-to-let investment
It also contains a macro to calculate the monthly payment if tax relief is granted on interest. In the UK there used to be a scheme called "Mortgage Interest Relief At Source" (MIRAS) which gave partial tax relief on interest - but that's long gone now. However other jurisdictions, notably the US, still offer relief so the macro's there if you want to reactivate and adapt it. Excel's PMT can't handle this of course so it's necessary to write a simple iterative macro to run the calculation.

You can download it here. Use at your own risk!

Saturday, 7 August 2010

Algorithmic "crop circles" uncovered in high frequency trading

Strange patterns detected in the behaviours of high frequency trader bots. Given the costs associated with high frequency trading it seems unlikely to be merely accidental noise.

See here for close ups.

Friday, 18 June 2010

Reith 2010

Martin Rees discusses the role of science in society in this year's BBC Reith lectures.

Saturday, 15 May 2010

The Mathematics of Democracy

Why democracy is always unfair and the relative advantages (and quirks) of the various polling methods in terms of effectiveness of representation. Expect to hear and learn more about the "alternative vote" method as the Liberal Democratic/Conservative coalition gets under way.