In my last post I gave an example of a situation where individual investors might want to borrow money for investment purposes. This post will give an overview of the methods that individuals can use to achieve that leverage efficiently. I will also cover tax considerations, some of which may be relevant even to unleveraged positions. Much of what I cover here will be UK specific, particularly when it comes to taxes.

The standard advice for personal investing that I see all around the web is to put your money into one or more low cost equity index tracking funds. Commentators also sometimes recommend an allocation to bonds (e.g. a 60/40 split between stocks and bonds), though the popularity of this advice seems to become less common with every passing month of the bull market.

Sorted maps are useful alternatives to standard unordered hashmaps. Not only do they tend to make your programs more deterministic, they also make some kinds of queries very efficient. For example, one thing we frequently want to do at work is find the most recent observation of a sparse timeseries as of a particular time. If the series is represented as an ordered mapping from time to value, then this this question is easily answered in log time by a bisection on the mapping.