Rethinking Financial Planning

Foreword

For most people, retirement/financial planning (1) is often thought of as simply how you deal with excess money (disposable income) after paying for living expenses, taxes, etc.

In my opinion, that is a very limited and limiting way of thinking about some of the most consequential decisions you would have to make in your lifetime.

As usual, a reminder that I am not a financial professional by training — I am a software engineer by training, and by trade. The following is based on my personal understanding, which is gained through self-study and working in finance for a few years.

If you find anything that you feel is incorrect, please feel free to leave a comment, and discuss your thoughts.

Human net worth

As I’ve discussed in “Net Worth“, net worth and cash flow are related topics, and in general, outside of less common cases like illiquid non-cash flowing assets, they can be thought of as the same thing.

Now, if you subscribe to that view, then it may seem odd that when people talk about net worth, they very rarely talk about their incomes from their jobs. In a hand-wavy, abstract sense, you can think of your knowledge, health and age as assets, and your knowledge + health + age enable you to generate cash flow via using your labor to create value for others, i.e. performing a job and getting paid for it.

So, in that sense, your knowledge + health + age should have some implied “worth”. In a more crude sense, you can imagine (a) someone who’s 26, but terminally ill and bed-bound, (b) someone who’s 80 but healthy for their age and (c) someone who’s 26 and healthy for their age. Clearly, in most cases, (c) will be able to generate much more income from their labor than (a) or (b).

Now, and again, being crude, if we were to put a number on it, how much would we value our knowledge + health + age?

Job incomes tend to be fairly stable and dependable in the short/medium terms(2), but health and age deteriorates with time, while knowledge improves with time, though deteriorate beyond some point due to old age. Unlike most financial assets like bonds, stocks, etc., the value of knowledge + health + age is extremely hard to compute, as there are other factors that muck things up — e.g. you may be a natural genius in the medical field, but were never afforded the chance to attend medical school and thus your genius is entirely trapped as “potential”.

Without going too much into theoretical modeling, I’m just going to use something simple — take your expected retirement age, subtract your current age. This is your number of working years left. Multiple that number by your current pretax salary, and we’ll call it your “human net worth”. This simplistic model assumes your salary increases at the rate of inflation, and doesn’t change other than that. It also assumes that the rate of discount is just the rate of inflation, so we can use current nominal values in place of imputed future discounted values. Feel free to nerd out and use more complex models.

If you’ve done the exercise above, you’ll quickly notice that your “human net worth” is probably pretty significant. If you are below the age of 35, I’m guessing your “human net worth” is probably quite a bit higher than your “financial net worth” (3).

Think like a business person

The one thing that most successful business people know, is how to maximize the value of their assets by focusing on what’s important. For example, it simply doesn’t make sense spending a lot of time trying to save a few thousand dollars by being draconian on office supplies if you are a multi-billion (or even trillion!) dollar software company. The same amount of effort, if directed towards more productive endeavors like improving employee productivity, would yield far greater results.

In a similar vein, if you are a software engineer with a portfolio of, say, $300k, and an annual salary of $184k, it simply doesn’t make sense spending a lot of time trying to optimize your portfolio. Even if you manage to outperform the market by 10% (assuming market returns is 10%, this would be a 20% return) (4), you will only make about $30k more. If you spend your effort concentrating on your career, getting promoted just once can easily yield more than double the benefits:

Facebook software engineer compensation, source: https://www.levels.fyi/companies/facebook/salaries/software-engineer (5)

Clearly, the exact numbers depend a lot on your personal situation, but the point is that in many cases, especially for those who are below the age of ~40, where you simply haven’t had enough time to accumulate a significant portfolio, your best financial/retirement planning move is very likely to just be throw your money into something simple to manage and not too risky, and then concentrate your efforts on developing your career.

Always do the math

Many people dive headlong into finance and investing, others take up side hustles, thinking that they can supplement their main sources of incomes. In many cases, they completely ignore the one thing that is most likely to benefit their financial situations the most profoundly — simply doing better at their day job (and getting recognized for it via higher commissions or promotions), or finding another line of work with more advancement opportunities.

Before diving headlong into any new endeavor, it probably makes sense to just spend a week or two figuring out if the effort is even worth it, or if you could get more out of your efforts if you just redirect your focus elsewhere.

Personal experience

Some random notes based on personal experience and talking to people:

  • Many people think real estate investments are passive (6). They are not.
    • If you are owning the property outright, then you have to deal with managing the property (or paying someone to manage it, and then managing the property manager). If you only have 1 or 2 properties, this is probably not a big deal, but does take quite a bit of time. If you have more than 5 or 6 properties, this easily becomes a full time job.
    • If you are investing via a fund or syndication, then you’ll have to spend a lot of time sourcing deals and vetting sponsors, reading their periodic reports to make sure everything is on track and deciding how to deploy your future dollars. In some ways, this is very similar to the pros/cons of investing in stocks.
    • In both cases, you’ll have to understand the economics/finance of real estate investing, and how macroeconomics affect it and thus you. Keeping up with these generally involve a lot of reading, attending conferences/webinars/seminars, etc., which again take up a lot of time.
  • Many people think trading stocks can be passive — once you’ve figured out a winning strategy, just make a bot and watch the money roll in. It doesn’t work this way.
    • As someone who has written and ran multiple trading bots before for personal trading, and who has worked in a quant hedge fund, I can assure you that it is not so simple.
    • All strategies eventually lose their edge. It may be 1 week after you find the strategy, or it may be 1 year. But it eventually happens. And the tricky part is trying to figure out if your current losses are due to a change in the regime (i.e. your strategy losing its edge) or just an expected drawdown. Deciding wrongly will be punishingly expensive.
    • The trading space is unbelievably crowded. Outside of large funds, millions of personal traders trade either as a full time job or with bots. Thus, you’ll need to be nimble, and be able to change and adapt depending on financial/economic forces, so that you can stay one step ahead of the competition.
    • Again, all the above means that a long term successful trading operation is almost always a full time job.
  • If you are a software engineer (7), then unless you have $10m+ in your portfolio, your best path to financial security is almost definitely to improve yourself so that you can perform your day job better, and get to your “terminal level” (8) as quickly as possible. As shown by surveyed salaries of Facebook software engineers (5), each promotion comes with a pretty hefty and permanent (9) salary increase, each of which would easily equal a double digits return on most common portfolio sizes for people of those income levels.
    • Of course, if you are personally interested in finance, and are doing it as a hobby, then by all means go ahead. All work and no play makes Jordan a dull kid. But be sure to understand the limitations of this, and do not fool yourself into thinking it is something beyond what it really is.

Footnotes

  1. Many people treat retirement planning and financial planning as different things. They aren’t really — it’s probably more accurate to think of retirement planning as a facet of financial planning, the goal of which is to, naturally, retire by some age.
  2. This isn’t true for everyone, but generally true for most people under most economic circumstances.
  3. “Financial net worth” is a made up term, here meaning the traditional “net worth” definition — the net value of your assets.
  4. It’s pretty damn hard to consistently beat the market by 10%. Many hedge funds get paid millions/billions of dollars just to beat the market by 2-3% every now and then.
  5. I am not endorsing the numbers on levels.fyi for Facebook. I do not know if these numbers are accurate at all, though I assume they are close enough to be a reasonable comparison in this case.
  6. Here, “real estate investments” mean private real estate investments, not buying publicly traded REITs, etc. Buying publicly traded REITs have all the usual pros and cons of trading stocks, which are touched on later.
  7. I’m specifically calling out software engineers here, because I am one, and understand the economics here better. Other professionals may have similar dynamics, I simply do not know.
  8. Due to luck, experience, knowledge, life commitments and other factors, most people have a “terminal level” beyond which they find it hard to impossible to get promoted beyond. At Facebook/Google/Uber and most tech companies with a similar level structure, this is generally around levels 5 – 7.
  9. OK, fine, it’s technically not permanent. But it’s pretty rare (outside of sign on bonuses and dramatic market events) to see annual total compensation drop at one of the big tech companies.

Affordable housing

Foreword

Housing is a touchy subject. On the one hand, nobody likes to hear about homeless children, or elderly retirees forced out of their homes. On the other hand, nobody seems particularly obliged to go out of their way to help those in need obtain and retain housing. So what then?

For full disclosure, I have a fairly large portfolio of real estate investments, of which a majority are residential. Obviously, I am not an impartial observer. At the same time, having been both a tenant and an (indirect) landlord for multiple years and in many different locales, while also keeping constant tabs on the managers who oversee my investments, I feel I can provide a perspective that is often lacking in the media.

As usual, a reminder that I am not a financial professional by training — I am a software engineer by training, and by trade. The following is based on my personal understanding, which is gained through self-study and working in finance for a few years.

If you find anything that you feel is incorrect, please feel free to leave a comment, and discuss your thoughts.

Costs of building a home

According to RocketMortgage, the average cost to build a home is about $282,299 in 2022. Granted that a portion of those homes are larger, luxury homes, so the actual cost of building a “starter home” for someone of more modest means is probably lower. On the same article, the average cost to build a 1 bedroom is about $80,000 on the low end — much better!

But let’s dig a little more — according to BusinessInsider, the median American family has a net worth of around $121,700. Suddenly, that $80,000 looks a lot tighter. Also, recall that the $80,000 figure is at the low end of the scale — in most parts of the country, it may not even be a feasible number. At the same time, the $80,000 cost doesn’t even include the cost of the land which, depending on location and size, can easily cost $100,000 or more.

Next, building a home takes time, from a few months to a year or more, depending on the location and scope of the project. During this time, the new owners will need a place to live, likely rented which means monthly rent payments.

Finally, home insurers and mortgage lenders typically do not service new builds. A new build is much more risky for the insurer, as there is active work being done and thus more chances for accidents. At the same time, if the borrower defaults on their mortgage, the lender has no real collateral (i.e. the house) to foreclose on to recoup their money. As a result, both insurance premiums and mortgage rates for a new build tend to be much, much higher than for a regular home.

Why is building so expensive?

A large part of the reason why building new housing is so expensive is because of existing rules and laws. Modern day housing units must fulfil a myriad of rules and laws built over decades of experience. Unfortunately, these necessarily add to the costs of building.

For example, in practically everywhere in the USA, all homes must have proper heating and cooling depending on the local climate, bedrooms must have an exterior wall and have exterior facing windows for safety reasons, wall paint must be lead free for health reasons, bathrooms must have proper plumbing, etc.

For the most part, I personally believe these to be sensible and reasonable — no one should be poisoned by lead paint just because of their financial situation.

Separately, the craftspeople who build our homes deserve to be compensated fairly — theirs is a job involving manual labor and, often, very real risks to their bodies and health. They should also be protected by adequate insurance policies so that them and their families are taken care of if the worst were to happen.

Finally, to ensure that all the proper building rules were adhered to, and that nobody made a mistake that might lead to potential disaster, most counties in the USA have enforced inspections by local engineers and experts, to ensure that buildings are “up to code”. While overall a good thing, these inspections do add to the overhead both in terms of costs (inspections typically are not free) and time (and they take a while to schedule, while any issues found need to be remedied).

And remember, we’ve just discussed the cost of building the home. Maintaining a home incurs another set of expenses such as property taxes, utility bills, etc.

Grim reality

When you put together all the requirements a modern home needs, and the costs of building that home, you arrive at a very grim conclusion — for a very large portion of the country, buying a home is simply an expense they cannot afford.

Renting

Given that so many people cannot afford to buy a home, yet still require a roof over their heads, it’s no wonder that many people choose the next option, which is to rent a home from a landlord.

Unfortunately, the facts that renters tend to be less affluent, housing costs are high, and investors (landlords) need to make profits result in some very contentious relationships. In particular, landlords tend to be portrayed in the media as unscrupulous capitalists, out to suck up every last cent from their hapless tenants.

While clearly not every landlord is a saint, it seems unduly combative to assume every landlord is the devil. While there are certain valid criticisms, there’s also a lot of just simple misunderstandings and well poisoning.

Houses are for living, not for investing

On the surface, this seems like a valid complaint, but is it really?

For better or for worse, in the USA, the government has decided that it is incapable of providing housing for the people. As such, this critical role has been outsourced to the private sector, with incentives such as tax advantages for real estate investments, etc. to encourage development.

The private sector, being capitalistic in nature, is incentivized by profits — private individuals and entities simply do not, in general, offer up their resources for free.

Given that the country has a general lack of housing, in order to correct that imbalance, housing prices need to rise, essentially increasing profit margins and incentivizing investment, so that enough housing will be built for everyone who needs it.

Until the government’s stance on the matter is changed (see below), the only real way to ensure enough housing units being built annually to accommodate new household formation is, unfortunately, higher home prices.

Investors push up the price of homes, forcing others to rent

There is some truth to this — real estate investors are driven by the profit motive, and as long as the numbers work, they will willingly bid up the price of homes, sometimes beyond the means of Regular Joe’s.

But that’s just one side of the equation. The investors clearly needed to buy the homes from someone else (in order to push up the prices) — someone who benefitted from the increase in home prices. Someone who, too, maybe a Regular Joe. What then? Are real estate investors now Santa Clauses handing out bags of money?

The fact is that this is a more nuanced issue — investors benefit existing homeowners, while hurting new ones. In more concrete terms, baby boomers and Gen X’ers tend to benefit from real estate investors, while millennials and Gen Z’ers tend to suffer.

Whether this is desirable, then, likely depends a lot on whether you already own your home.

Landlords raising rent is predatory

Tenants tend to complain that landlords seem to raise rents every year, and at rates that tenants generally feel are unfair. So let’s break it down.

As we’ve discussed before, housing is expensive, and maintaining them is also expensive. At the same time, landlords (investors) are capitalists and out to make a profit. Which means that whatever costs the landlord bear, must eventually be passed on to the renter, along with a markup for profits.

Yes, that means renters tend to pay more in rent than the landlord pays in costs. And as we’ve discussed earlier in order for the supply of housing to meet the demands of new households, this must necessarily remain true.

Given that the landlord’s costs increase every year due to inflation, so too must the rent. At the same time, in order to stimulate more housing to be built, areas with a severe lack of housing must necessarily see rents rise faster than inflation — the temporary supernormal profits incentivizes new housing to be built, which then will increase competition amongst landlords, which in turn reduce future rents.

But if renters are paying for the cost of the homes to begin with, what are landlords for? As it turns out, a lot.

Recall that renters tend to be less affluent. As a result, they tend to have trouble getting the necessary financing for building or buying homes. Landlords step in here, as an intermediary between the banks and the renters — the landlord puts up their reputation and assets as collateral to the bank to obtain the financing needed, and they then charge the renter for the “lease” of their balance sheet.

If you’ve worked in finance, you’ll know that while financing rates for the first ~75% of a project is relatively cheap, rates jump dramatically as the loan to value increases — the lender naturally assumes more risk as the equity cushion is reduced.

Similarly, the cost of borrowing 100% of the cost of a home needs to be much higher than borrowing 80% of the cost of the same home — the higher rates compensate for the higher risk assumed by the lender + landlord.

Secondly, landlords tend to manage more than 1 home. This often translates into savings in terms of maintenance costs via economies of scale — it is fairly common for landlords to build relationships with local craftspeople in a win-win relationship — the landlord provides the craftsperson a steady stream of jobs and income, while the craftsperson gives the landlord a discount for their services. This discount can then be passed on to the tenant.

Next, the landlord, by virtue of having to deal with constant maintenance issues across their tenants, will naturally build up a rolodex of known and trustworthy craftspeople, saving the tenant time and potential costs of engaging a less skilled or even outright fraudulent contractor.

Finally, the landlord also provides a service — essentially a 24 hours contact for maintenance issues, as well as aggregation of various expenses into a single, tidy monthly rent payment.

Solutions

Personally, I believe strongly that everyone benefits if everyone has proper housing — homelessness tends to bring with it many social problems.

However, and I say this as a beneficiary of the current system (being a real estate investor), the private sector is simply not equipped nor incentivized to achieve that goal. The most profits can be extracted when relative demand is high, since as supply increases marginal profits fall. So given a free market, supply will likely never ever rise enough for everyone to be suitably accommodated.

Given that the benefits of 100% housing is a benefit shared by all, basic economics then suggest that affordable housing, as opposed to luxury housing for those more affluent, should really be provided or subsidized by the government in some way. Forcing the private sector to subsidize housing for the less affluent such as the use of rent control, rent stabilization or other coercive means will just lead to less investment and thus even worse problems in the future.

Section 8 housing

As a start, section 8 housing, I feel, is a pretty good program. Its main issues are 2 fold. First of all, the program is severely underfunded, and really needs to be a much bigger priority of the government’s budget, so that everyone those in need can reliably qualify and get the assistance they need.

Secondly, the stigma associated with it must be eliminated. That can likely be achieved with a bigger budget, so that more graduated assistance can be provided to more people — those who are living in poverty may get, say, 99% of their rents covered, while those much above the poverty line but are still struggling can get, say, 10% of their rents covered.

With an expanded program aimed at everyone from those in dire need up to those in, say, the lower 85 percentile in terms of income, the program can conceivably be seen as just as social benefit, and not “aid for the poor”, and hopefully that will remove the stigma, allowing more people to benefit.

Along with the above, enforcement of the rules to prevent abuse should also be strengthened. Those receiving aid should be required to show actual need, while landlords should be on the hook for providing quality housing at a reasonable price, and not just taking advantage of desperate people who don’t have much of a choice.

Government built housing

Section 8 housing works by engaging with the private sector via subsidies. It is, however, not the only way, and to be honest, the fact that the private sector is involved necessarily means that the overall costs are higher to account for private profits.

As an alternative to section 8 housing, the government can also opt to just do-it-itself so as to save on costs. As we know from examples around the world, large scale public housing programs can work, though like section 8 housing, it needs to be properly funded and managed, while also at a scale large enough to overcome the stigma of receiving government aid.

Not that long ago, the US government used to build and sell subsidized housing to those in need. Technically, remnants of this program and its offshoots still exist around the country, though the scale is at a level that’s much too small to really address actual needs. A dramatic expansion of that program, with adequate funding, proper oversight and management may revitalize the program enough to help address the housing issues faced by those most financially vulnerable.

Altruism?

Ultimately, I think it is important to acknowledge a few basic facts:

  • A lot of people, with their own means, simply cannot afford to own a home. Some may not even be able to afford to rent.
  • Homelessness is a social problem which affects everyone, even those who are not homeless. As such, everyone benefits if homelessness is reduced or eliminated.
  • To a lesser extent, giving everyone a stake in society, via home ownership, has benefits too. People who feel that they have a stake tend to behave better, leading to less social issues.
  • To bootstrap these programs will likely involve large public programs and associated large public spending. Yes, that means those who are financially better off necessarily must take on some temporary discomfort. But if we can get it right, the future benefits should outweigh the current costs.

Arbitrage

Foreword

Arbitrage is the bedrock of almost all modern financial transactions. Arbitrage is what keeps ETFs and their underlying trading somewhat in sync, it is what prevents futures from drifting from their underlying, and it is what options pricing (Black Scholes model and its modern derivatives) is ultimately based on.

As usual, a reminder that I am not a financial professional by training — I am a software engineer by training, and by trade. The following is based on my personal understanding, which is gained through self-study and working in finance for a few years.

If you find anything that you feel is incorrect, please feel free to leave a comment, and discuss your thoughts.

Volatile volatility

For those who are not aware, VXX is a ETN which is benchmarked against the VIX. There is a formula which ties the price of the VXX to the underlying VIX futures. The fund is backed by a well funded provider, so in theory, VXX should trade fairly closely to the VIX during regular trading hours.

If you look at the graph below, charting VIX (the candlesticks) vs VXX (the blue line), from March 9, 2022 to March 16, 2022, you’ll see that VXX and VIX move more or less in sync… until March 14. On March 15, VXX just went berserk.

VIX vs VXX, March 9, 2022 to March 16, 2022. Source: Trader WorkStation, Interactive Brokers.

What happened?!

ETNs, like ETFs, are kept in sync with their benchmarks mostly by market makers (more accurately, a subset of market makers called authorized participants). The details of how this works doesn’t matter, except that it relies on arbitrage:

If the ETN is trading higher than its benchmark, the authorized participants (APs) can short the ETN on the open market, and then buy newly created shares from the ETN provider at the price indicated by the benchmark to cover their short. Because the APs are selling (shorting) at a higher price than what they are paying the provider to create new shares to cover their short, the APs make an arbitrage profit — a “riskless” profit (1). Since it’s “riskless” profit and thus “free” (1) money, the APs will happily do this all day as long as the ETN is trading above the benchmark. The act of the APs constantly shorting the ETN will eventually cause the price of the ETNs to drop, so that it matches the benchmark.

If the ETN is trading below its benchmark, then the opposite happens. The APs will buy the ETN on the open market, and sell them to the provider at the higher price indicated by the benchmark. Again, the APs are making a “riskless” profit by buying low and selling high, so they’ll happily do this until their buying pressure forces the price of the ETN to match the benchmark.

So why didn’t the APs do anything on March 14 onwards?

On March 14, Barclays, the owner of the iPath funds (i.e. the provider) issued this press release: https://ipathetn.barclays/cms/static/files/ipath/press/Press%20Release_03_14.pdf

Essentially, Barclays is suspending the creation/redemption process mentioned above, where APs can buy/sell shares from it at the benchmark price. Effectively immediately, APs can still buy/sell on the open market, but they can no longer close their position via the 2nd leg of the trade, by selling/buying from the provider. This breaks the arbitrage chain, and there is no longer an arbitrage. No arbitrage, no “riskless” profit, and thus the APs stop their activities and the price of VXX goes haywire.

Arbitrage

The official definition of an arbitrage is a trade with 2 or more leg which:

  • Results in the final positions being exactly the same as before all the trades.
  • Results in a profit, despite the positions being exactly the same.

When all legs of the trade can be done simultaneously, then the arbitrage is said to be riskless. In the case of the VIX/VXX trade above, the legs cannot be done simultaneously since they are with different participants, so there is a small, but very real, time lag between each leg. Therefore, while it’s generally very safe, it’s not entirely riskless.

Notice the first crucial criteria — after all legs are completed, your positions must be exactly the same as before the first leg was made. This implies convertibility — at some stage, you must be able to convert whatever you have to something else to close a prior short or long. In the case of the VIX/VXX trade, the APs were able to convert cash from shorting VXX into new VXX shares by buying from the provider, or they could convert VXX shares into cash by selling to the provider.

But once convertibility is removed, there is no longer an arbitrage to be made.

As shown by the VIX/VXX trade, and GOOG/GOOGL in Q2 2021, whenever there is no arbitrage, there are zero guarantees that theoretical models of how things should trade would actually be realized.

There is no arbitrage without convertibility. (2)

Futures

Futures are essentially contracts signed between the buyer and seller (3) where they agree to trade some asset at some specified future time at some currently determined price. Details here.

Let’s say we enter into a futures contract, where I’ll sell you 1 barrel of crude oil 1 month from now. If the price of a barrel of crude oil on the spot market is currently $100, and the cost to store that barrel for 1 month is $2, then I’ll happily sell you that barrel in 1 month for any price $102 or more. I have an arbitrage — the futures contract provides the convertibility that closes the gap between “having a barrel of crude oil now” + “storing a barrel of crude oil for 1 month” and “selling a barrel of crude oil in 1 month”.

Similarly, for you, if you have a barrel of crude oil now, you can sell it for $100, and buy it back in 1 month for $102, while saving $2 of storage costs. Effectively, you have an arbitrage too, and so you’ll happily do this trade for anything $102 or less.

So the price to trade at is >= $102 (for me) and <= $102 (for you), and the intersection of those 2 inequalities is… $102. Because of the arbitrages on both sides, the futures contract will state that we will trade at $102 in 1 month.

In practice, of course, the math is a lot more complicated. The example above ignores the cost of money (i.e. interest rates), transport fees, etc. These fees (including storage costs) tend to be asymmetric so the trading price will be a range instead of a single point.

At the same time, if there is heavy speculation on one side or the other (maybe some really rich entity decides they really like a million barrels of oil in 1 month, regardless of the price), or other technical issues (all storage depots are completely full), then the futures price can temporarily be dislodged from the arbitraged range.

Very often (4), though, the futures markets are not predictive. In many cases (4), futures are arbitraged by producers and consumers of the underlying asset, so the stated trade price on the contract does not reflect any predictions on future spot prices.

Footnotes

  1. “Riskless” and “free” are in quotes because it’s technically not completely riskless — there are risks with regards to implementation (may be the authorized participant made a math mistake!), risks with regards to random events (maybe the market shuts down just after they short, but before they cover), etc. But with regards to the financial models of the assets, there are theoretically no risks.
  2. Implicit here, and shown by GOOG/GOOGL in Q2 2021, is that arbitrage is a critical component of the Efficient Market Hypothesis. Therefore, if there is no convertibility, EMH tends to break down too.
  3. Technically, for stability reasons, both buyer and seller simultaneously sign contracts with the futures exchange. This way, the futures exchange is “hedged” (also a form of arbitrage!), but if either buyer or seller is unable to fulfil their requirements, the futures exchange will step in and prevent the contract from defaulting.
  4. I have been reliably informed that crude oil tends to be backwardation rather often, roughly half the time. During these times, futures prices are somewhat predictive of future spot prices. For more nuance, see the St Louis Fed’s take.

Marathon

Foreword

Unless you are extremely lucky, building wealth will likely be a long term process, something you work towards over long periods of time, possibly your whole career.

Once you’ve built your wealth, retaining it will require just as much, if not more effort. Without the discipline to control your budget, invest wisely and manage your risks, whatever wealth you may have built, can easily be squandered away.

As usual, a reminder that I am not a financial professional by training — I am a software engineer by training, and by trade. The following is based on my personal understanding, which is gained through self-study and working in finance for a few years.

If you find anything that you feel is incorrect, please feel free to leave a comment, and discuss your thoughts.

Expected returns

Let’s say there is a game, where you have to bet your entire liquid net worth every turn, but the expected return to whatever you bet is 10% (i.e. the expected value of a $1 bet is $1.10). Would you play this game? And if you would, how many rounds would you play?

Given the positive expected returns, I’m guessing a large number of people will play at least one game, and a good number of people will play until they are rich enough to retire.

What if I say that every turn, you have a 99% chance of winning 11.11% of your bet, and a 1% chance of losing everything (expected return is still 10% per turn)?

I’m guessing that most of those who would play at least once, will still play at least once, but most people will only play a relatively small number of games, somewhere in the 1-50 games range, certainly not enough to let most people retire.

What if every turn, you have a 1% chance of winning 110x of your bet and 99% chance of losing everything (expected return is still 10% per turn)?

I’m guessing close to nobody would play the game now.

The key to remember here is that positive expected return is not nearly enough information to determine if something is a good bet. Volatility of returns is important too!

The longest race

From the day you start accumulating wealth, to the day you pass from the world, the need for financial discipline is constant — it is the race that never ends, until you literally do.

If you become fabulously wealthy, then yes, you can probably be more reckless and still get away with it. But not too reckless! History is replete with famous rich people who manage to gamble away unimaginably large fortunes.

But no matter if you have $500k saved for retirement or $5b, the fact remains that you need to maintain some financial discipline. Simply betting your entire liquid net worth on a lark is probably not a winning strategy!

If you are making a one time risky bet, you may certainly get lucky — even better if the odds are in your favor. But no matter how small the chance of ruin, if you keep making that same bet, and if every single bet is an independent event and thus has the same odds, then that small chance of ruin will eventually catch up with you — the law of large numbers practically guarantees it.

It is with this in mind, that I view with horror at how some people are betting large portions of their net worth on options. Yes, in the short run, you can quickly grow your money by a few multiples, maybe even a few orders of magnitude — as long as you remain lucky. But once your luck runs out, one bad bet can easily ruin you. To make matters worse, buying options generally has negative expected returns — options are generally priced such that options sellers have positive expected returns, while buyers have negative expected returns.

Viable strategies

That’s not to say that risky bets are totally off the table. The crux of the matter is that the event of ruin, no matter how unlikely, will eventually occur if we tempt fate enough times. So, naturally, the strategies to counter involve trying to reduce or completely remove the chance of ruin.

For example:

  • Diversification
    • By spreading out your bets, the probability of all of them going sour at the same time is reduced, hence reducing your chance of ruin.
  • Taking profits
    • For speculative bets, including investments that have gone beyond rational exuberance, taking some profits off the table gives you cash to redeploy as and when the markets regain some sanity.
  • Buying insurance
    • Insurance in the financial markets tend to be expensive, but if you have a position that has a large chance of ruin, it may make sense to buy some insurance against that event. For example, if your portfolio is heavily concentrated in technology stocks, it may make sense to hedge that exposure by buying puts against QQQ.
  • Rebalancing, position sizing
    • A combination of taking profits and diversification, regularly rebalancing your portfolio and making sure the value in each position is a limited part of your entire portfolio will ensure that no single blow up will wipe you out.

Marathon

At the end of the day, it is important to recognize that getting “there” and staying “there” are two sides of the same coin. It is a journey from the first dollar you make, to when you are laid to rest. It is a marathon, and you need to treat it as such — making rational, long term decisions, instead of trying to bet the farm on random whims.

Capital Stack

Foreword

How do business ventures get funded? Who’s paying for the overhead when the company is first starting out and has no revenue? And what do they get out of this?

As usual, a reminder that I am not a financial professional by training — I am a software engineer by training, and by trade. The following is based on my personal understanding, which is gained through self-study and working in finance for a few years.

If you find anything that you feel is incorrect, please feel free to leave a comment, and discuss your thoughts.

Decent proposal

Let’s say you have a fantastic new business idea, but to get the business started will require $50,000 right now, which you do not have. How could you fund your new venture?

Traditionally, there are 2 main avenues:

  1. Take a loan from a bank
  2. Take on some partners who have deeper pockets (i.e.: sell a portion of your new company)

The former is also known as debt financing, and the latter is equity financing.

When you take on debt, you agree to pay the lender some amounts of money on some fixed timeline. For example, 1% of the loan amount every month (interest payment), and then 100% of the loan amount at the end of 10 years (principal payment).

When you take on partners, they share in the profits (or losses!) of the entire enterprise. So, if after paying off all your bills (which may include debt payments), you are left with $1,000 to distribute between the partners, then you and your partner can(1) get up to $1,000 in total. Who gets how much depends on your partnership agreement, as well as how much of the company each of you own.

First come, maybe not first served

Who gets how much money, and when, is one of the 2 central differences between debt vs equity financing.

Debts must always be paid back, on the timeline agreed upon when the loan is taken out. If you fail to make even a single payment on the debt, it is technically in default, and may officially be in default after some grace period. At that point, the lender generally has some set of rights they can exercise, up to and including forcing you to give up ownership of your company to them.

Equity partners, on the other hand, generally have no fixed payments due. A company can very well never return a single cent to the equity partners! The main considerations are the partnership agreement(2), which will detail how any payments, if made, will be distributed amongst the partners, and fairness — in general, in the absence of any details about how profits are shared, then all dividends will be made pro rata, i.e.: if each of the partners own 50% of the company, then every dollar distributed will see 50c go to each partner.

One way of thinking about this, is that debt investors have the first dibs on revenue generated by the business. Once all debt payments are made, and all other costs are paid, whatever is left over (which may be nothing, or even negative — a loss) can be distributed to the equity partners. In exchange for this “seniority” in terms of payment, debt investors typically settle for a smaller and shorter-term profit — interest rates are generally much lower than what the business can be expected to return over the long term.

Control your enthusiasm

The other central difference between debt and equity financing is that of control, or rather rights — who has rights to do what with the company?

Debt investors generally have no rights on the company other than their regular payments (sometimes known as coupons). If, however, a payment was missed for long enough that the company is in default of the loan agreement, then debt investors generally have additional rights to recover their investment, such as forcing the equity partners to give up ownership of the company, or forcing a sale of the business to 3rd parties to repay the loan.

Equity investors are generally split into 2 groups — the general partners(3) who oversee the actual running of the company, and may even be personally responsible if the company goes bankrupt, and the limited partners, who generally provide the funding for the business, but otherwise have no say in the day to day running of the company.

Mix ‘n match

When you think carefully about it, debt investors and equity investors are very similar at a very high level. Each of them:

  • Provide capital for a company …
  • … and, in return, receives some promise of cash flow at a future time, …
  • … along with some rights with regards to the company.

And at this abstract level, it shouldn’t be surprising, then, to learn that the tradition little boxes that debt and equity investors fit in, are not nearly that clean cut in practice.

In practice, an investor in a company is labeled debt or equity based mostly on their rights to call an event of default on the company. If an investor can call an event of default on the company when their promised distribution is not received, then they are typically labeled debt investors. Otherwise, they are an equity investor.

Some examples, in order of decreasing priority when profits are being distributed (i.e.: an investor at a lower row is not paid, until all investors in higher rows are paid according to the agreement):

Senior debtTypically the highest priority of debt investor. All coupons of senior debt must generally be paid, before anyone else sees a single cent.

Due to this priority, senior debt is typically much safer than all other tiers of investors, and in many cases, senior debt investors may even have collateral — assets owned by the company which the investor can seize if the loan is in default.

In exchange for these protections, senior debt tends to have the lowest interest rates (i.e.: the lowest returns).
Mezzanine debtNot often seen, except in very large projects with huge capital requirements.

Mezzanine debt are paid after senior debt, but before all else. In most cases, mezzanine debt either are exactly the same as senior or junior debt, except that they are paid in between the two.

The additional carveout is almost always entirely just to provide the payment priority protection, and thus a higher interest rate than senior debt, but a lowest interest rate than junior debt.
Junior debtWhen there are 2 (or more) classes of debt investors, the lowest tier is called junior debt.

Junior debt typically are more risky, as they are paid only after senior/mezzanine debts are paid. Also, junior debt typically don’t have collateral.

In exchange for the increased risk, junior debt tends to command the highest interest rates of all debt tiers.
Preferred equityPreferred equity can really be anything at all — anything that you can describe in a legal contract (the partnership agreement) is probably fair game.

In some cases, preferred equity share the same uncertain returns as equity, but are paid first in cases of bankruptcies (i.e.: their entire investment is returned to them, and whatever is left is distributed to the equity tier).

Most commonly, however, preferred equity are very similar to debt — they get a fixed coupon that is generally at a higher rate than junior debt, and they may get a little bit extra if the business does exceptionally well.

In exchange for this higher rate of interest, preferred equity gives up the right to call an event of default on the company if their coupons are not made on time.
EquityThe equity tier is typically the lowest priority in terms of distribution of profits. This means that if there isn’t enough money to satisfy the claims of all higher priority tiers, the equity tier may not get any profits at all. However, if the business does exceptionally well, then the equity tier may get a return much higher than all other tiers combined.

The equity tier is also commonly known as “share holders” (or “stock holders”). When you buy and sell a stock, say GOOG, on the public markets, you are essentially trading ownership interests of the equity tier of that company.

A table where a company lists all its debt and equity investors, according to their priority in terms of payment and their contributions to the venture, is called a “capitalization table” (or “cap table” for short). A table or description detailing how the profits are actually distributed (assuming there are any profits to distribute) is called the “waterfall”.

In general, as you go down a cap table, risk increases, but potential return also increases.

To each their own

Which tier you want to invest in, is entirely up to you and your personal situation.

If you are a retiree, and you need stability of income, you may opt to give up some upside, but get more protection by going up the capital stack (i.e.: going up the rows in the cap table).

But if you are investing for the long term, and you are diversified such that your investment in a single company is a relatively small part of your entire portfolio, then it may make sense to take on the additional risks involved in the lower tiers, for a chance at a higher return — even if this particular company goes bankrupt and you lose all your money in it, hopefully, enough other companies that you’ve also invested in will succeed, such that you still make a greater return than investing at a higher tier.

In the end, where each investor ends up on the capital stack depends on their expectations of how the company will perform, as well as their personal financial situation (generally, their ability to withstand uncertain cash flow and/or losses).

Footnotes

  1. “Can”, not “will”, because in most cases, distributions (or dividends) are not paid on new companies. New companies tend to be very cash hungry, as they need cash to spin up their factories, advertising, research, etc., and more cash is almost always better. As such, equity partners generally don’t tend to see a single cent of profits until years 2-3 or beyond. The exact timeline depends on the nature of the business — some cash intensive businesses may not see a dividend for decades!
  2. Technically, a “partnership agreement” is only used in a partnership (this is a legal term). LLC’s (limited liability company) and corporations use “operating agreements” instead. However, for purely financing purposes, the basic principles remain the same — a group of people got together to fund the equity tier of a company, and there’s a document that describes what they can expect to get out of that venture. I’ll use partnerships for simplicity going forward. Understand that the issues discussed affects LLC’s and corporations as well, though perhaps with minor differences.
  3. As with “partnership agreement”, “general partner” and “limited partner” are terms used in partnerships (the legal entity). LLC’s and corporations have different names for these roles (board of directors, executive team vs shareholders, etc.). Despite the naming differences, the roles are mostly the same and for simplicity, I’ll stick with the nomenclature for partnerships.

Diversification

Foreword

Real estate vs stocks, the perennial debate. Which one should you invest in?

As usual, a reminder that I am not a financial professional by training — I am a software engineer by training, and by trade. The following is based on my personal understanding, which is gained through self-study and working in finance for a few years.

If you find anything that you feel is incorrect, please feel free to leave a comment, and discuss your thoughts.

Caveats

Before we go deeper into the discussion, I’d like to address some criticisms of “Monte Carlo“. To be absolutely clear, in “Monte Carlo” and in this post, I use simplified models to represent returns from various assets. In particular, stock returns have been modeled as normal distributions, which isn’t quite correct:

Left: Historical total returns of S&P500 from 1926 to 2020, inclusive.
Right: Normal distribution with 12.2% mean returns and 19.7% standard deviation.

As you can see from the histograms, actual stock markets total returns (left) is quite different from the stylized normal distribution with similar mean and standard deviation.

Separately, assumptions that stocks and bonds (and in this post, real estate) returns are completely uncorrelated are clearly too permissive. In reality, stocks, bonds and real estate are somewhat (negatively) correlated over short periods of time, as all of them are generally affected by politics, inflation and interest rates, amongst other things.

That said, the point of “Monte Carlo” and this post isn’t to build a perfect model for anyone’s financial planning purposes. Instead, these 2 posts are meant to explore various aspects of portfolio construction — how you should think about expected returns, CAGR, SWR, and how volatility affects these metrics. With this rather more modest goal, I believe the simplified models used are more than adequate.

My my, what low returns you have!

In “My Personal Portfolio“, I mentioned that I invest heavily in real estate, generally via private real estate syndications.

In some private discussions about real estate syndications, others have noted that the pro forma returns presented by some real estate syndications that I invest with (generally in the 10-15% range) are lower than what the stock markets have returned in the past 20 years or so.

If you pick up a calculator, you’ll find that from 2009 – 2020 stocks have returned about 15.5% on average every year, with a CAGR of about 15%. Compared to the 10-15% pro forma returns, it seems silly to even consider real estate.

Therefore, we should just invest 100% in stocks… right?

Expected returns

The first problem with the 100% stocks assertion, is that expected returns are misleading — expected returns are merely “expected” as opposed to “realized”. The future is always uncertain, and it is entirely possible that the next N years see returns dramatically below expected returns based on the past N years.

That is why in “Monte Carlo“, each test is done 10,000 times and the metrics reported are the averages of the 10,000 simulations. However, since the average person cannot live 10,000 lives and pick the best/median/average lives (1), these numbers should be taken with a pinch of salt — they are expected values, not realized nor even predicted values. In the context of a single lifetime, the law of large numbers simply does not hold.

Looking further

The next problem with the 100% stocks assertion is that only looking at the expected returns of the past ~11 years is misleading. Typically, expected returns are the arithmetic means of historical returns. In effect, they tell you “given a random year, what is the expected returns of that year”. Stock markets, however, do not always go up uninterrupted — periods of growth are punctuated with periods of declines.

In the context of historical stock markets performance, the past ~11 years have been unusually kind to stock investors, and it is currently not clear if future years will be as kind.

Since returns are multiplicative, a few years of subpar returns in the future will reduce lifetime CAGR significantly. In “Monte Carlo“, I presented historical total returns of the S&P 500, which suggests that long term CAGR is closer to 10%, with mean annual total returns of around 12.2%. Suddenly real estate is looking much better(2)!

Volatility

As we’ve discussed above and in “Monte Carlo“, volatility in the portfolio, as represented by standard deviation of annual total returns, can dramatically curtail the safe withdrawal rate from that portfolio. To illustrate this point, let’s look at some example scenarios.

In each of these, stocks are represented by both their sampled historical returns as well as their normally distributed returns (mean 12.1%, standard deviation 19.7%). The 2 alternate universes is a hypothetical scenario, where we invest 50% of our portfolio each in 2 completely independent stock markets (i.e.: each stock market in its own alternate universe). 5 alternate universes is where we invest 20% of our portfolio each in 5 completely independent stock markets. Real estate is represented by a normally distributed model with mean of 9% and standard deviation of 10% (3).

In each case, the portfolio is rebalanced annually so that the portfolio is distributed across the assets according to the description.

The histogram on the left is when we use sampled historical stock returns for the simulation, and the histogram on the right is when we use normalized stock returns.

PortfolioAverage returnsStandard deviation of returnsHistogram of returns
100% stocksSampled – 12.1%
Normalized – 12.1%
Sampled – 19.7%
Normalized – 19.7%
80% stocks 20% cashSampled – 9.7%
Normalized – 9.7%
Sampled – 15.6%
Normalized – 15.7%
2 alternate universesSampled – 12.2%
Normalized – 12.2%
Sampled – 13.8%
Normalized – 13.9%
5 alternate universesSampled – 12.1%
Normalized – 12.2%
Sampled – 8.75%
Normalized – 8.79%
50% stocks 50% real estateSampled – 10.6%
Normalized – 10.6%
Sampled – 11.00%
Normalized – 11.00%

And for the same 5 portfolios, we compute the CAGR and SWR over 30 years (see “Monte Carlo” for a full description of the methodology details).

PortfolioAverage returnMedian returnCAGRSWR 90%SWR 95%SWR 99%
100% stocksSampled – 12.1%
Normalized – 12.1%
Sampled – 13.9%
Normalized – 12.1%
Sampled – 10.3%
Normalized – 10.4%
Sampled – 3.78%
Normalized – 3.95%
Sampled – 3.00%
Normalized – 3.25%
Sampled – 1.87%
Normalized – 2.08%
80% stocks 20% cashSampled – 9.7%
Normalized – 9.7%
Sampled – 11.1%
Normalized – 9.8%
Sampled – 8.5%
Normalized – 8.6%
Sampled – 3.65%
Normalized – 3.78%
Sampled – 3.05%
Normalized – 3.22%
Sampled – 2.11%
Normalized – 2.32%
2 alternate universesSampled – 12.2%
Normalized – 12.2%
Sampled – 12.9%
Normalized – 12.2%
Sampled – 11.3%
Normalized – 11.3%
Sampled – 5.42%
Normalized – 5.46%
Sampled – 4.76%
Normalized – 4.82%
Sampled – 3.60%
Normalized – 3.74%
5 alternate universesSampled – 12.1%
Normalized – 12.2%
Sampled – 12.4%
Normalized – 12.1%
Sampled – 11.8%
Normalized – 11.8%
Sampled – 6.74%
Normalized – 6.78%
Sampled – 6.26%
Normalized – 6.34%
Sampled – 5.39%
Normalized – 5.46%
50% stocks 50% real estateSampled – 10.6%
Normalized – 10.6%
Sampled – 11.2%
Normalized – 10.6%
Sampled – 10.1%
Normalized – 10.0%
Sampled – 5.27%
Normalized – 5.29%
Sampled – 4.70%
Normalized – 4.81%
Sampled – 3.80%
Normalized – 3.93%

Some interesting results:

  • If we invest in 2 or more independent assets, then the sampled returns approximate the normally distributed model.
    • This is why the differences between using sampled stock returns and normally distributed model is generally small, especially when we consider a diversified portfolio.
  • If you just put 20% of your assets in cash, and 80% in stocks, your expected returns will suffer. However, somewhere in the 95-99%-ile range, your SWR will actually go up.
  • If you can invest in stock markets in 2 alternate universes, then your expected annual returns will remain roughly the same. But your CAGR and SWR will increase dramatically.
  • This is even more pronounced if you can invest in 5 alternate universes.
  • Since I am a mere mortal, the best I can do is invest 50% in stocks and 50% in real estate, which definitely helps SWR, and maybe helps with CAGR as well(3).

Diversification

The basic idea behind the magical increase in CAGR and SWR beyond 100% stocks, is simply “diversification”. When you diversify, and you rebalance your portfolio periodically (4), what you are doing is essentially selling high (the asset which outperformed) and buying low (the asset which underperformed). Buying low and selling high is, historically, the winning strategy for investing (and speculating), and will likely remaining a winning strategy in the future (5).

So, the last problem with the 100% stocks strategy, is that even if real estate has a lower expected annual returns and lower expected CAGR than stocks (3), the very fact that they are not very correlated to stocks means that an allocation to real estate can help increase your portfolio’s CAGR and SWR.

This is the same principle in use when financial advisors recommend investing in index funds (as opposed to single name stocks) — diversification helps to reduce overall volatility and regular rebalancing forces you to buy low and sell high.

Side note: taking profits

A corollary that is not immediately obvious from the above, is the act of “taking profits”. Historically, when people have asked me for advice on what to do after some speculative asset they’ve bought appreciated by a huge amount (more than 100% increase in price), my general advice is something along the lines of “sell enough so that you take a decent profit, and won’t be sad if everything else drops back to your cost basis.”

The psychological effect of doing so is that you’ve now already realized a decent profit, and everything left in that asset is essentially “house money”. While a mathematical fallacy, I have found that this has made holding on to a speculative asset that much easier.

The financial/mathematical effect of doing so, is essentially the same as diversification. Assuming the money you take out is put into another (not very correlated) asset, then you have essentially achieved the “2 alternate universes” scenario.

Code

What kind of a nerd would I be, if I didn’t also present the code for the simulations mentioned above? Note that this builds upon the code in “Monte Carlo” — you’ll need to copy the code there and save it in a file titled “montecarlo.py” for the code below to work.

#!/usr/bin/python3.8

import matplotlib.pyplot as plt
import montecarlo
import numpy


HISTORICAL_RETURNS = montecarlo.HISTORICAL_RETURNS

NormalDistribution = montecarlo.NormalDistribution
UniformSampling = montecarlo.UniformSampling
Cash = montecarlo.Cash
Composite = montecarlo.Composite

GenerateReturns = montecarlo.GenerateReturns
MonteCarlo = montecarlo.MonteCarlo


def PlotHistogram(data):
  _, axs = plt.subplots(1, len(data))
  if len(data) == 1:
    axs.hist(data, bins=30)
  else:
    for i in range(len(data)):
      axs[i].hist(data[i], bins=30)
  plt.show()


def PrintStats(label, data):
  print("{}  Mean:{:.3g}%  StdDev:{:.3g}%".format(
    label,
    numpy.mean(data) * 100,
    numpy.std(data, ddof=1) * 100))


class NormalizedDistribution(NormalDistribution):
  def __init__(self, label, data):
    NormalDistribution.__init__(self, label, numpy.mean(data), numpy.std(data, ddof=1))


def Main():
  cash = Cash("Cash")

  sampled_stocks = UniformSampling("SampledStocks", HISTORICAL_RETURNS)
  normal_stocks = NormalizedDistribution("NormalizedStocks", HISTORICAL_RETURNS)
  normal_re = NormalDistribution("NormalizedRE", 0.09, 0.1)

  data = GenerateReturns(normal_stocks).flatten()
  PrintStats("Historical S&P 500", HISTORICAL_RETURNS)
  PrintStats("Normalized S&P 500", data)
  MonteCarlo(sampled_stocks)
  MonteCarlo(normal_stocks)
  PlotHistogram([HISTORICAL_RETURNS, data])

  sampled_stocks_80 = Composite("80% sampled", (sampled_stocks, 0.8), (cash, 0.2))
  normal_stocks_80 = Composite("80% normalized", (normal_stocks, 0.8), (cash, 0.2))
  s_data = GenerateReturns(sampled_stocks_80).flatten()
  n_data = GenerateReturns(normal_stocks_80).flatten()
  PrintStats("80% sampled stocks, 20% cash", s_data)
  PrintStats("80% normalized stocks, 20% cash", n_data)
  MonteCarlo(sampled_stocks_80)
  MonteCarlo(normal_stocks_80)
  PlotHistogram([s_data, n_data])

  sampled_stocks_alt2 = Composite("Alt2 sampled", (sampled_stocks, 0.5), (sampled_stocks, 0.5))
  normal_stocks_alt2 = Composite("Alt2 normalized", (normal_stocks, 0.5), (normal_stocks, 0.5))
  s_data = GenerateReturns(sampled_stocks_alt2).flatten()
  n_data = GenerateReturns(normal_stocks_alt2).flatten()
  PrintStats("2 alternate universes, sampled stocks", s_data)
  PrintStats("2 alternate universes, normalized stocks", n_data)
  MonteCarlo(sampled_stocks_alt2)
  MonteCarlo(normal_stocks_alt2)
  PlotHistogram([s_data, n_data])

  sampled_stocks_alt5 = Composite("Alt5 sampled",
                                  (sampled_stocks, 0.2), (sampled_stocks, 0.2), (sampled_stocks, 0.2),
                                  (sampled_stocks, 0.2), (sampled_stocks, 0.2))
  normal_stocks_alt5 = Composite("Alt5 normalized",
                                 (normal_stocks, 0.2), (normal_stocks, 0.2), (normal_stocks, 0.2),
                                 (normal_stocks, 0.2), (normal_stocks, 0.2))
  s_data = GenerateReturns(sampled_stocks_alt5).flatten()
  n_data = GenerateReturns(normal_stocks_alt5).flatten()
  PrintStats("5 alternate universes, sampled stocks", s_data)
  PrintStats("5 alternate universes, normalized stocks", n_data)
  MonteCarlo(sampled_stocks_alt5)
  MonteCarlo(normal_stocks_alt5)
  PlotHistogram([s_data, n_data])

  sampled_stocks_re = Composite("Stocks+RE sampled", (sampled_stocks, 0.5), (normal_re, 0.5))
  normal_stocks_re = Composite("Stocks+RE normalized", (normal_stocks, 0.5), (normal_re, 0.5))
  s_data = GenerateReturns(sampled_stocks_re).flatten()
  n_data = GenerateReturns(normal_stocks_re).flatten()
  PrintStats("Sampled stocks + normalized real estate", s_data)
  PrintStats("Normalized stocks + normalized real estate", n_data)
  MonteCarlo(sampled_stocks_re)
  MonteCarlo(normal_stocks_re)
  PlotHistogram([s_data, n_data])


if __name__ == "__main__":
  Main()

Footnotes

  1. Not religious advice!
  2. This is an imperfect comparison. The pro forma returns from syndications are estimates and may be wrong (though in my, very limited, experience good sponsors tend to underestimate returns). Also, the pro forma returns of syndications today have very little bearings on historical total returns of real estate over long periods of time. Certainly, the Great Financial Crisis of 2008 taught us that real estate prices can go down too!
  3. Real estate returns are hard to measure, because real estate tends to illiquid and non-fungible, and the way depreciation affects accounting just confounds that matter even more. The 9% mean, 10% standard deviation modeled here is mostly out of thin air — I picked 9%/10% because it is a lower return with lower volatility than stocks. Some (unverified) data I’ve found suggests this is too pessimistic — historical real estate returns seems to be better than this.
  4. Rebalancing periodically is key here! If you do not rebalance, then most, if not all, the benefits of diversification goes away. Every time I hear someone boast about how they are both “diversified” and “passive” (so passive that they do not rebalance), I die a little bit inside. I am already old, stop trying to help me along.
  5. If you’ve managed to lose money by buying low and selling high, please let me know!

Financial planning, portfolio management and wealth management

Foreword

Financial planning, portfolio management and wealth management are often used interchangeably, but they are actually different disciplines in finance.

In this post, we look at the differences between the three, and how they should be employed.

As usual, a reminder that I am not a financial professional by training — I am a software engineer by training, and by trade. The following is based on my personal understanding, which is gained through self-study and working in finance for a few years.

If you find anything that you feel is incorrect, please feel free to leave a comment, and discuss your thoughts.

Financial planning

Financial planning, as the name implies, is a process where you plan out your finances. First, you come up with financial goals that you want to achieve, for example:

  • Save for a house down payment by age 30
  • Pay for children’s college
  • Financial independence by 45
  • Retire by 55
  • etc.

These goals should have a dollar amount attached, estimated to the best of your abilities. They should also have a deadline. In effect, all of these goals can be translated into a statement of the form:

I want to have $D by year Y.

Once you have your list of goals, you’ll effectively have a list of net worth dollar amounts that you’ll need, by certain years.

The next step is to take stock of what your assets are, right now. You should be able to then assess the viability of your financial plan, by just applying aggressive assumptions for your assets, for example, 15% annual growth year over year, every year. You should also factor in your expected annual income from a job, trust, allowance, etc., as well as your annual expenditures, again, use aggressive assumptions — your income will grow 2-4% a year, your expenditures will only grow 1.5-3% a year, etc.

If your financial plan fails even with the aggressive assumptions, i.e.: you miss one or more goals even with such aggressive assumptions, then your goals are likely unreasonable, and you should re-evaluate the goals and try and make them more reasonable. For example, maybe delaying retirement by a few years?

Finally, you need to figure out how much risk you need to take on, and how much you need to increase your income by, and how much you need to limit your expenditures by, in order to give your financial plan the highest probability of success. This is important! You are not trying to maximize the return of your assets/investments, but rather, under the set of goals, you are trying to figure out what is the least risky way for you to achieve it.

This last step is where you start making more conservative assumptions. Is 15% annual growth in investments reasonable? There certainly are stocks that grow 15% or more a year for long periods of time. But how likely are you to identify them ahead of time? Also, these stocks tend to be more risky — either small/mid caps, highly levered, etc. Also, how likely are you to get a 2-4% raise every year? How much harder will you have to work to achieve that? Are you willing to work that much harder? And how much will you have to sacrifice in terms of living standards to keep your expenditures low? Are you sure you can maintain such low expenditures for long periods of time?

These are all questions you need to ask yourself honestly, and answer honestly. Make the necessary adjustments to what kind of risks you are willing to take with your investments, how much you are willing to put into your job to try and achieve the raises you target, and how much you are willing to forsake in current standards of living in order to meet your goals.

Remember always, that you are trying to maximize the probability that your plan works! Yes, if you work 20hours a day, you may get a 6% raise every year. But is that reasonable? What are the chances that you work yourself into serious health issues, and then have to take months or even years off of work to recover? Think about all these issues, then ask yourself, is it reasonable to expect yourself to work 20hours a day for 2 years? 5 years? 10 years? Probably not!

As you are probably thinking now, this is an iterative process. As you figure out the kind of sacrifices, risks and adjustments you’ll have to make, you’ll find that perhaps you are willing to trade off some goals to reduce the amount of sacrifices, risks and adjustments you’ll need to make, which in turn will likely increase the probability of success.

After a few rounds of adjusting goals, making more conservative assumptions, you’ll have a better picture of the tradeoffs that you need to make — either reducing your goals, or increasing your risk, sacrifices and adjustments.

And once you are done, once you are happy with the final result, you’ll have a financial plan.

That’s not the end, though! Life is unpredictable and things often change without warning. After you have a financial plan, you need to re-evaluate your plan periodically — I like to do it once a year or when I have to make major financial decisions. Figure out if you are on track for your plan, and if not, go through the iterative process again, and figure out what you need to do to get yourself back on track.

Portfolio management

Portfolio management is the curation of your investment assets. For example, let’s say you have a financial plan in place, and you have devoted $100,000 to investing. What assets should you buy? In what ratio? Should you have excess cash lying around to opportunistically time market downturns? Or will you stay 100% invested at all times? Or will you even lever your position to be more than 100% invested?

These are all questions that you’ll answer when you are managing your portfolio.

In order to answer these questions, though, you’ll need to have an idea of the different asset classes. Largely they are:

  • Cash
  • Equity (stocks, or ownership of private businesses)
  • Bonds (or other types of debt(-like) instruments such as loan, preferred equity, etc.)
  • Real estate
  • Commodities (such as precious metals, agricultural products, energy commodities, or more likely derivatives of these)
  • More exotic forms such as fine wine, rare art, etc.

Each of these behave differently in different environments. For example, in inflationary environments, commodities and real estate tends to do well, equity decently, but bonds and cash tend to suffer. In reducing interest rate environments, bonds and equity tend to do well, real estate decently, commodities and cash maybe not so much, etc.

Figuring out what to invest in, and in what ratio, is non-trivial! Happily, for most people, the answer need not be very nuanced. A 60/40 portfolio of 60% equities and 40% bonds (1), with maybe a few percentage taken out of each to invest in real estate will generally be a fairly good trade off between risk undertaken and potential reward. However, if you are willing to spend more time on the topic, you may be able to eek out more return without increasing risk or reduce your risk without reducing your return. Unless you have a substantial amount of assets under you care, however, you may find that the results are simply not worth the effort.

Remember that when you are planning your portfolio, you are effectively aiming for some goal from your financial plan — say you need to get 10% returns every year. This goal may severely hamper the choice of assets that you can invest in! If you aim for 10% returns every year, for example, leaving your portfolio entirely in cash is unlikely to work.

Finally, unlikely financial planning, where the focus is mainly on trying to maximize the probability of success (i.e.: reducing risk), portfolio management takes a more balanced approach and looks more at expected returns of assets, before figuring out how to reconcile that with expected risk (i.e.: trading off risk vs return).

Wealth management

Wealth management is generally spoken of as a service provided by a professional, a wealth manager. It’s not really something someone does for themselves.

In effect, wealth management is a service which combines aspects of financial planning and portfolio management. The wealth manager will work with you to figure out what you are comfortable doing for yourself, and what you would prefer professional help with, and then work through the financial planning and portfolio management process with you. At the extreme, you may simply give the manager power of attorney over your assets, and they will then manage everything towards the goals you’ve discussed, and perhaps send you a regular stipend for living expenses.

In practice, wealth management services tend to be very expensive, as they involve a lot of risk for the manager (legal and liability risks mostly), which need to be defrayed with increased fees. Also, ongoing portfolio management and financial planning services tend to be labor intensive, while also requiring fairly specialized skills, again pointing to high fees. So, in general, wealth management services are typically only offered to those who are wealthy, and for most managers, the minimum assets a client must have is generally in the $2-10m range.

How they intertwine

Financial planning can be thought of as your “life’s goals”, finance-wise. It is the targets that you’d like to hit, if you think of your financial life as a business. Portfolio management is, then, the actual steps you’d take to achieve those targets (though focusing only on investments, while a financial plan often involves incomes and expenditures as well).

Wealth management, in our little analogy, will then be the hiring of external consultants or vendors to advice on or run part of your business for you.

Do I need a financial plan?

Probably yes! Everyone has goals they’d want to meet in the future, and unless you are so incredibly wealthy that almost any goal you can think of can be trivially met financially, you’ll probably want to develop a financial plan to figure out where you stand, and what you need to work on.

Do I need to manage my portfolio?

Probably yes, but this may not be that hard. Unlike financial planning which often involves taking stock of your current situation and trying to figure out what goals are feasible and how much effort/risk you need to take on, portfolio management can be fairly straightforward.

For most people, a passive (or mostly passive) investment portfolio may be appropriate — unless you have specialized knowledge about the financial markets, or you are personally interested in finance, or if you have a large amount of assets already where even a marginal increase in returns is a meaningful absolute number, you may find that effort spent on managing your portfolio to optimize it more, may be wasted. Instead, for most people, it may be more bang-for-the-buck if you spend more of your efforts on trying to increase your income, for example, taking on more at work to aim for a promotion, or taking on a side gig, etc., or by spending time going through your expenses to try and reduce your expenditures.

A passive investment portfolio may be as simple as figuring a ratio between stocks/bonds that you’d like to hold, and then buying the respective indices in the decided ratio. (2)

Do I need a wealth manager?

Probably not. The pre-requisite net worth for a wealth manager to be even willing to work with you is often a bar most people do not meet. And honestly, unless you are incredibly wealthy and have a very complicated financial situation, it probably isn’t worth the money hiring a wealth manager in the first place.

However, if you do happen to have the requisite $2-10m lying around (check your couch!), and you don’t happen to be interested in finance and just want to enjoy what life has to offer, then a wealth manager may indeed be just what you need.

Footnotes

  1. For those who are younger, you may want to take on more equity risk, say, 70/30, or even up to 90/10, depending on your risk tolerance. For those who are closer to retirement, you may want to reduce equity risk, say, 50/50, etc.
  2. It irks a lot of people, but I generally will not provide financial advice except to people I am close to. This is for conscience reasons (I may be wrong), legal reasons (I am not licensed to provide financial advice) and for liability reasons (you may sue me if I’m wrong). Therefore, this is about as specific as I will go.

Monte Carlo

Foreword

How much money can you spend every year, if you want your money to last 30 years?

Does this change if you invest 100% in stocks? 100% in bonds? 60/40 in stocks/bonds?

Do you even know what the historical returns of stocks are?

As usual, a reminder that I am not a financial professional by training — I am a software engineer by training, and by trade. The following is based on my personal understanding, which is gained through self-study and working in finance for a few years.

If you find anything that you feel is incorrect, please feel free to leave a comment, and discuss your thoughts.

Raw data

Here is the annual total return (1) of the S&P500 index since 1926, taken from https://www.slickcharts.com/sp500/returns. I haven’t verified the data, but a quick glance suggests it’s probably close enough for our purposes. I’ve excluded 2021 because the year hasn’t ended yet. All numbers are in percentage terms.

  18.40,  # 2020
  31.49,  # 2019
  -4.38,  # 2018
  21.83,  # 2017
  11.96,  # 2016
  1.38,  # 2015
  13.69,  # 2014
  32.39,  # 2013
  16.00,  # 2012
  2.11,  # 2011
  15.06,  # 2010
  26.46,  # 2009
  -37.00,  # 2008
  5.49,  # 2007
  15.79,  # 2006
  4.91,  # 2005
  10.88,  # 2004
  28.68,  # 2003
  -22.10,  # 2002
  -11.89,  # 2001
  -9.10,  # 2000
  21.04,  # 1999
  28.58,  # 1998
  33.36,  # 1997
  22.96,  # 1996
  37.58,  # 1995
  1.32,  # 1994
  10.08,  # 1993
  7.62,  # 1992
  30.47,  # 1991
  -3.10,  # 1990
  31.69,  # 1989
  16.61,  # 1988
  5.25,  # 1987
  18.67,  # 1986
  31.73,  # 1985
  6.27,  # 1984
  22.56,  # 1983
  21.55,  # 1982
  -4.91,  # 1981
  32.42,  # 1980
  18.44,  # 1979
  6.56,  # 1978
  -7.18,  # 1977
  23.84,  # 1976
  37.20,  # 1975
  -26.47,  # 1974
  -14.66,  # 1973
  18.98,  # 1972
  14.31,  # 1971
  4.01,  # 1970
  -8.50,  # 1969
  11.06,  # 1968
  23.98,  # 1967
  -10.06,  # 1966
  12.45,  # 1965
  16.48,  # 1964
  22.80,  # 1963
  -8.73,  # 1962
  26.89,  # 1961
  0.47,  # 1960
  11.96,  # 1959
  43.36,  # 1958
  -10.78,  # 1957
  6.56,  # 1956
  31.56,  # 1955
  52.62,  # 1954
  -0.99,  # 1953
  18.37,  # 1952
  24.02,  # 1951
  31.71,  # 1950
  18.79,  # 1949
  5.50,  # 1948
  5.71,  # 1947
  -8.07,  # 1946
  36.44,  # 1945
  19.75,  # 1944
  25.90,  # 1943
  20.34,  # 1942
  -11.59,  # 1941
  -9.78,  # 1940
  -0.41,  # 1939
  31.12,  # 1938
  -35.03,  # 1937
  33.92,  # 1936
  47.67,  # 1935
  -1.44,  # 1934
  53.99,  # 1933
  -8.19,  # 1932
  -43.34,  # 1931
  -24.90,  # 1930
  -8.42,  # 1929
  43.61,  # 1928
  37.49,  # 1927
  11.62,  # 1926

Pop quiz 1

You can refer to the numbers above, but don’t use a calculator or anything, just try to estimate the answers:

  1. What do you think is the average annual return over the period covered?
  2. What do you think is the median annual return over the period covered?
  3. What do you think is the CAGR(2) over the period covered?
  4. Which of the following 3 numbers above should you use, if you want to estimate how much returns you’ll get over the next 10 years?

The answers are:

  1. 12.2%
  2. 14.3%
  3. 10.3%
  4. CAGR, because total returns over a period of time compounds multiplicatively. Average and median are non-compounding measures.

Are those numbers surprising? Most people find it surprising that the CAGR is so much lower than the other 2 measures, because they generally hear about the average/median returns thrown around in the media, but CAGR is a number that’s less frequently used, even though it’s more important. Some people, especially those who started investing since 2010, may find it surprising that the numbers are so low, because they are used to 15+% returns, in most years since 2010. However, because returns compound multiplicatively, a down year dramatically skews the CAGR, which is why we see these numbers.

Pop quiz 2

Now, let’s say we have some amount of money, $R, to retire on, and assume inflation rate of 3% (3), which is to say, if you need $X in year one, you’ll need $(1.03 * X) in year 2, and $(1.03^2 * X) in year 3, and so on.

The ratio X/R is your withdrawal rate in the first year. The safe withdrawal rate (or SWR) is the ratio X/R, such that you have a high probability of not running out of money within your retirement — in our case, 30 years.

Assuming we used $R to buy the S&P 500 index on day 1 of our retirement, and ignoring transaction costs, taxes, etc.,

  1. What do you think is the SWR if you want a 90% probability of not running out of money in 30 years?
  2. What about if we want a 95% probability?
  3. 99% probability?

Now, if you are like most people, you’ll probably do something like take average/median/CAGR of stocks return, subtract the inflation rate, and that’s your SWR. That’ll give you a number that is either 9.2%, 11.3% or 7.3%, depending on which measure of stocks return you used.

And all 3 answers are wrong. The correct answers are:

  1. 3.8%
  2. 3.1%
  3. 1.9%

Hopefully, you are surprised (4).

Whadafuqjuzhappened!?

The reason the numbers are so small, is because of volatility. Stocks don’t go up in a straight line, they often take little detours where the annual total returns is the wrong shade of green (5). During the years where stocks are down, you are actually spending a much larger percentage of your assets to maintain your lifestyle — since your spending strictly goes up due to inflation, X/R (or your withdrawal rate) goes up if X goes up and R goes down.

So, if you want to maintain the same lifestyle over time, you’ll need to start off by just withdrawing a smaller portion of your portfolio in the first year, i.e.: a lower SWR, to compensate for these episodic underperformance of stocks.

This is sometimes called “sequencing risk”.

I am never gonna retire

Well, maybe don’t despair yet — it’s not as bad as it sounds. Recall that you don’t have to invest (just) in stocks. You can also invest in bonds! Or real estate! Or fine art! Or in this blog! I take donations! (6)

Now, as we know, bonds have, in recent history, really low yields. At the time of this writing, the 30y US Treasury is yielding only 1.93%. Can bonds really help?

Pop quiz 3

Let’s say you use your entire retirement fund of $R to buy a 30y US Treasury yielding 2% (7). So, what do you think your SWR is for

  1. 90% probability of not running out of money in 30 years?
  2. 95% probability?
  3. 99% probability?

And the answers are… 2.9%. For all 3. Note that we are assuming US Treasuries won’t default, and you’ll always get your money back, on top of all the other assumptions above.

So yea, for 90/95%, it’s not as good as stocks, but the stability of bonds help in the 99% case.

What’s going on here?

Recall that I said the main reason why SWR for stocks is so low, is because of volatility and sequencing risk — you need money every year to survive, even if the stock market is being uncooperative. But bonds, being so helpfully stable (at least in our made up model world with semi-unrealistic assumptions), means that even at 99% (and 100%!) percentile levels, we can have the same SWR of 2.9%, higher, in fact, than their CAGR (which is 2%)!

To hammer home this point, I ran simulations of various scenarios, and the results are summarized below:

PortfolioAverage returnMedian returnCAGRSWR 90%SWR 95%SWR 99%
Sampled stocks12.14%13.91%10.32%3.75%3.00%1.83%
Normalized stocks12.17%12.14%10.43%4.01%3.25%2.07%
Low vol stocks12.14%12.14%11.72%6.49%6.00%5.18%
Low vol, low return stocks6.06%6.08%5.62%3.25%2.90%2.36%
High vol, high return stocks24.34%24.42%14.30%2.77%1.17%Impossible
2% bonds2.00%2.00%2.00%2.88%2.88%2.88%
6% bonds6.00%6.00%6.00%4.90%4.90%4.90%
10% bonds10.00%10.00%10.00%7.39%7.39%7.39%
60/40 stocks, 2% bonds8.05%8.07%7.42%3.79%3.35%2.66%
55/35/10 stocks, 2% bonds, cash7.35%7.36%6.82%3.66%3.24%2.62%
60/40 stocks, 2% bonds, 1.5x 1% margin11.62%11.65%10.22%4.25%3.54%2.49%
60/40 stocks, 2% bonds, 1.5x 6% margin9.11%9.05%7.67%3.08%2.51%1.61%

“Sampled stocks” is stocks using actual historical returns, uniformly sampled for each simulation year.

“Normalized stocks” is stocks using a random returns sampled from a normal distribution with 12.16% mean and 19.66% standard deviation (which is the mean/standard deviation of our historical data above). As you can see, these numbers are fairly similar. Because it’s easier to model different scenarios using a normal distribution, all other simulations involving stocks use variations of “normalized stocks”.

“Low vol stocks” is stocks where we simply halved the standard deviation for modeling purposes. “Low vol, low return stocks” is stocks where we halved both the standard deviation and the mean. “High vol, high return stocks” is stocks where we doubled both standard deviation and mean.

“2/6/10% bonds” are bonds where the yield is 2%, 6% or 10%. (8)

The remaining rows show composite portfolios where we have some percentage of assets in stocks, bonds or cash, and where we may apply leverage (buying 50% of the portfolio’s value on margin) at different margin interest rates.

Observations

If you go through the data carefully, you’ll quickly see that:

  1. Expected returns (either via average, median or CAGR) is not a good predictor of SWR at all, especially at the higher confidences.
  2. Instead, volatility, or lack thereof, is a much better predictor of SWR, again, especially at the higher confidences.
  3. So, you can sacrifice some expected returns, and get a higher SWR 99% rate, by swapping out some stocks for bonds, or even cash!
  4. If you can get cheap leverage, then some mild application of leverage on a balanced portfolio (for example, 60/40 1.5x leverage with 1% margin) can yield even better results.
  5. But using leverage without first tamping down volatility is a recipe for disaster (not shown here, but the high vol, high return stocks scenario is a good approximate).

Wrapping up

For a very long time, people have been asking me why I’m “leaving money on the table” by not being more aggressive in stocks, or why I’m not levering 100% into stocks, etc. Some have even suggested a portfolio of 100% UPRO (which is a 3x daily balanced SPY product).

But think of it this way — when you retire, you’ll depend essentially 100% on your portfolio for cashflow to survive. And as we discussed in “net worth“, net worth is only useful if it can be used somehow to generate cash flow. Because, say it with me now, you cannot eat net worth. Therefore, “expected net worth”, based on whatever modeling of expected returns from a risky portfolio, is only useful if I can depend on it, at retirement, to generate cash flow. It doesn’t matter if the expected value of my portfolio is $1B at retirement, if there’s a 50% probability I’d go bankrupt — What? Am I supposed to eat caviar on my mega yacht off Monaco 50% of the time and then jump off a building the other 50%? (9)

What about levering up now and then selling everything at retirement to buy safer assets? Sure, if you happen to retire when the stock markets are at a high. But I’m not inclined to time my retirement based on the whims of the stock market. Also, since I don’t have a crystal ball, that means I’ll have to go with a more conservative strategy.

Which is to say, in general, as you approach retirement, it is a good idea to reduce volatility in your portfolio, so that you can smooth out market madness and thus achieve a higher level of stable cash flow (higher SWR) from your portfolio. (10)

Monte Carlo

By now, you’re probably wondering why this post is titled “Monte Carlo”. That’s simply the name of the methodology I used to run the simulation for the numbers above. The code for the simulation is attached, feel free to play with the assumptions yourself to see what comes up.

Note that for all the stocks based portfolios, the inputs are random (which is why we need Monte Carlo in the first place), so your numbers may differ slightly. But I’ve found that the differences are relatively minor, typically in the 5-10bps range.

#!/usr/bin/python3.8

import numpy


# Number of times to run each simulation.
TOTAL_ITERATIONS = 10000
# Ratio of runs where we must end up with more than $0, before we consider the test a success.
THRESHOLDS = [0.9, 0.95, 0.99, 1]

# Number of years to run for in each simulation.
NUM_YEARS = 30
# Inflation rate of cash withdrawal.
INFLATION = 0.03

# This should be mostly irrelevant.  Just use a large number.
START_CASH = 1000000

# Data from https://www.slickcharts.com/sp500/returns
HISTORICAL_RETURNS = numpy.array([
  18.40,  # 2020
  31.49,  # 2019
  -4.38,  # 2018
  21.83,  # 2017
  11.96,  # 2016
  1.38,  # 2015
  13.69,  # 2014
  32.39,  # 2013
  16.00,  # 2012
  2.11,  # 2011
  15.06,  # 2010
  26.46,  # 2009
  -37.00,  # 2008
  5.49,  # 2007
  15.79,  # 2006
  4.91,  # 2005
  10.88,  # 2004
  28.68,  # 2003
  -22.10,  # 2002
  -11.89,  # 2001
  -9.10,  # 2000
  21.04,  # 1999
  28.58,  # 1998
  33.36,  # 1997
  22.96,  # 1996
  37.58,  # 1995
  1.32,  # 1994
  10.08,  # 1993
  7.62,  # 1992
  30.47,  # 1991
  -3.10,  # 1990
  31.69,  # 1989
  16.61,  # 1988
  5.25,  # 1987
  18.67,  # 1986
  31.73,  # 1985
  6.27,  # 1984
  22.56,  # 1983
  21.55,  # 1982
  -4.91,  # 1981
  32.42,  # 1980
  18.44,  # 1979
  6.56,  # 1978
  -7.18,  # 1977
  23.84,  # 1976
  37.20,  # 1975
  -26.47,  # 1974
  -14.66,  # 1973
  18.98,  # 1972
  14.31,  # 1971
  4.01,  # 1970
  -8.50,  # 1969
  11.06,  # 1968
  23.98,  # 1967
  -10.06,  # 1966
  12.45,  # 1965
  16.48,  # 1964
  22.80,  # 1963
  -8.73,  # 1962
  26.89,  # 1961
  0.47,  # 1960
  11.96,  # 1959
  43.36,  # 1958
  -10.78,  # 1957
  6.56,  # 1956
  31.56,  # 1955
  52.62,  # 1954
  -0.99,  # 1953
  18.37,  # 1952
  24.02,  # 1951
  31.71,  # 1950
  18.79,  # 1949
  5.50,  # 1948
  5.71,  # 1947
  -8.07,  # 1946
  36.44,  # 1945
  19.75,  # 1944
  25.90,  # 1943
  20.34,  # 1942
  -11.59,  # 1941
  -9.78,  # 1940
  -0.41,  # 1939
  31.12,  # 1938
  -35.03,  # 1937
  33.92,  # 1936
  47.67,  # 1935
  -1.44,  # 1934
  53.99,  # 1933
  -8.19,  # 1932
  -43.34,  # 1931
  -24.90,  # 1930
  -8.42,  # 1929
  43.61,  # 1928
  37.49,  # 1927
  11.62,  # 1926
])
HISTORICAL_RETURNS /= 100

# Uncomment to print average, median and CAGR of HISTORICAL_RETURNS.
#print(numpy.mean(HISTORICAL_RETURNS) * 100)
#print(numpy.median(HISTORICAL_RETURNS) * 100)
#print((numpy.prod(HISTORICAL_RETURNS + 1) ** (1 / len(HISTORICAL_RETURNS)) - 1) * 100)


class Sim():
  def __init__(self, label):
    self.__label = label

  def Name(self):
    return self.__label


class FixedRate(Sim):
  def __init__(self, label, interest_rate):
    Sim.__init__(self, label)
    self.__interest_rate = interest_rate

  def Return(self):
    return self.__interest_rate


class NormalDistribution(Sim):
  def __init__(self, label, mean, std_dev):
    Sim.__init__(self, label)
    self.__mean = mean
    self.__std_dev = std_dev

  def Return(self):
    return max(-1, numpy.random.normal(self.__mean, self.__std_dev))


class UniformSampling(Sim):
  def __init__(self, label, data):
    Sim.__init__(self, label)
    self.__data = data

  def Return(self):
    return numpy.random.choice(self.__data)


class Cash(FixedRate):
  def __init__(self, label):
    FixedRate.__init__(self, label, 0)


class FullLoss(FixedRate):
  def __init__(self, label):
    FixedRate.__init__(self, label, -1)


class Composite(Sim):
  def __init__(self, label, *args):
    Sim.__init__(self, label)
    self.__args = args

  def Return(self):
    result = 0
    for asset, ratio in self.__args:
      result += asset.Return() * ratio
    return result


def RunOneIteration(model, rate, returns):
  value = START_CASH
  required_cash = START_CASH * rate
  for i in range(NUM_YEARS):
    if value < required_cash:
      return False
    value -= required_cash
    value *= 1 + returns[i]
    required_cash *= (1 + INFLATION)
  return True


def RunSim(threshold, model, rate, returns):
  num_pass_required = TOTAL_ITERATIONS * threshold
  for i in range(TOTAL_ITERATIONS):
    if RunOneIteration(model, rate, returns[i]):
      num_pass_required -= 1
      if num_pass_required <= 0:
        return True
  return False


def GenerateReturns(model):
  output = numpy.empty([TOTAL_ITERATIONS, NUM_YEARS])

  for i in range(TOTAL_ITERATIONS):
    curr_results = output[i]
    for j in range(NUM_YEARS):
      curr_results[j] = model.Return()

  return output


def Report(model, output):
  print("{}:".format(model.Name()))

  while output:
    prefix = output[:5]
    output = output[5:]
    print("  " + "  ".join(["{:>8s}: {:<7s}".format(metric, "{:.2f}%".format(result * 100)) for (metric, result) in prefix]))
  print()



def MonteCarlo(model):
  returns = GenerateReturns(model)

  highest_rate = {}
  for threshold in THRESHOLDS:
    highest_rate[threshold] = float("nan")
    min_rate = 0
    max_rate = 1
    while round(min_rate, 4) < round(max_rate, 4):
      rate = (min_rate + max_rate) / 2
      if RunSim(threshold, model, rate, returns):
        min_rate = rate
        highest_rate[threshold] = rate
      else:
        max_rate = rate

  output = [
    ("Average", numpy.mean(numpy.mean(returns, axis=1))),
    ("Median", numpy.mean(numpy.median(returns, axis=1))),
    ("CAGR", numpy.mean(numpy.prod(returns + 1, axis=1) ** (1 / NUM_YEARS) - 1)),
  ]

  for threshold, rate in highest_rate.items():
    output.append(("SWR-{}%".format(int(threshold * 100)), rate))

  Report(model, output)


def MakeLabelParams(label, *params):
  full_label = label
  first = True
  for param in params:
    if first:
      first = False
      full_label += " {:.2f}".format(param * 100)
    else:
      full_label += "/{:.2f}".format(param * 100)

  return full_label, *params


def Main():
  cash = Cash("Cash")
  margin = FullLoss("MarginCost")

  bonds2 = FixedRate("2% Bonds", 0.02)
  MonteCarlo(bonds2)

  bonds6 = FixedRate("6% Bonds", 0.06)
  MonteCarlo(bonds6)

  bonds10 = FixedRate("10% Bonds", 0.1)
  MonteCarlo(bonds10)

  sampled_stocks = UniformSampling("SampledStocks", HISTORICAL_RETURNS)
  MonteCarlo(sampled_stocks)

  stocks_mean = numpy.mean(HISTORICAL_RETURNS)
  stocks_stdev = numpy.std(HISTORICAL_RETURNS, ddof=1)
  stocks = NormalDistribution(*MakeLabelParams("Stocks", stocks_mean, stocks_stdev))
  MonteCarlo(stocks)

  low_vol = NormalDistribution(*MakeLabelParams("Stocks[LoVol]", stocks_mean, stocks_stdev * 0.5))
  MonteCarlo(low_vol)

  low_vol_mean = NormalDistribution(*MakeLabelParams("Stocks[LoVolMean]", stocks_mean * 0.5, stocks_stdev * 0.5))
  MonteCarlo(low_vol_mean)

  high_vol_mean = NormalDistribution(*MakeLabelParams("Stocks[HiVolMean]", stocks_mean * 2, stocks_stdev * 2))
  MonteCarlo(high_vol_mean)

  stocks60_bonds240 = Composite("60/40", (stocks, 0.6), (bonds2, 0.4))
  MonteCarlo(stocks60_bonds240)

  stocks55_bonds235_cash10 = Composite("55/35/10", (stocks, 0.55), (bonds2, 0.35), (cash, 0.1))
  MonteCarlo(stocks55_bonds235_cash10)

  # 50% margin loan, at 1% rate = 0.05% interest payments per year.
  stocks60_bonds240_x15 = Composite("60/40 x1.5", (stocks, 0.9), (bonds2, 0.6), (margin, 0.005))
  MonteCarlo(stocks60_bonds240_x15)

  # 50% margin loan, at 6% rate = 3% interest payments per year.
  stocks60_bonds240_x15 = Composite("60/40 x1.5", (stocks, 0.9), (bonds2, 0.6), (margin, 0.03))
  MonteCarlo(stocks60_bonds240_x15)


if __name__ == "__main__":
  Main()

Footnotes

  1. Total return is equal to dividends + gains in asset price.
  2. CAGR is “compounded annual growth rate”, which is, loosely speaking, the geometric mean of the returns, expressed in percentage terms.
  3. I’ve been using 3% for modeling inflation for a while now. People used to laugh at me for this, especially during the 2009-2019 period. After 2020, they are still laughing at me. But for very different reasons. For those who are more conservative, feel free to jack up the value to 5% (or more!) in the simulation to see how that affects the numbers.
  4. Look, buddy. I worked really hard to build up the suspense and everything. At least act surprised.
  5. Also known as “red”.
  6. I’m kidding, I don’t take donations.
  7. I’m using 2% because it’s easier to type than 1.93%. Also, US Treasuries have some tax advantages, so it’s probably not THAT crazy an assumption. Finally, there are other “safe’ish” assets that can yield as high as 5-6% “safely”.
  8. Yes, 6% and 10% bonds sound crazy in today’s low interest rates world. But there are assets (mostly for accredited investors) which can indeed yield up to 12%. They have varying degrees of risk, and certainly aren’t risk free like this modeling suggests. But they behave very similarly to bonds.
  9. Interestingly, someone made the argument to me recently that if there’s an asset with a 25% probability of 10x, and 75% probability of going to 0, the expected value is still 2.5x, which means (paraphrased) “you almost have an obligation to buy that asset”. Hopefully this post and the discussion have shown that the question (and thus answer) is not so simple, and that there are a lot of other considerations other than “expected return”.
  10. There are other withdrawal strategies that try to mitigate the sequencing risk issue. Most of them revolve around reducing your cash flow in bad market years (e.g.: keeping your withdrawal rate the same, or even reducing it). Some of them may work, but in general, I’m not really inclined to eat lobster one year and starve the next, just because the stock market decides to tank. I’d rather just have my daily, stable supply of ramen noodle.

Components of a trading strategy

Foreword

Contrary to the perception of many people, a lot of things go into a good trading strategy.

It is not simply just “a good idea”, but really, the orchestration of many different disciplines towards a common goal.

As usual, a reminder that I am not a financial professional by training — I am a software engineer by training, and by trade. The following is based on my personal understanding, which is gained through self-study and working in finance for a few years.

If you find anything that you feel is incorrect, please feel free to leave a comment, and discuss your thoughts.

Investing vs Speculating

Before we begin, let’s address the elephant in the room. Are we talking about investing or speculating?

Both. While most associate “trading” with speculation, in this particular post, I’m using the word in a more mechanical way — a “trade” is just a transaction, an exchange, in this case, of cash for some asset.

In the world of speculation, a “successful trade” is actually 2 (or more) separate trades — one or more to get into the “position”, and one or more to get out of it, sometimes also called a “roundtrip”. A speculative trade is never a success until you close out the position.

In the world of investing, most “successful trades” are also “roundtrips”. However, there is a separate class of trade which are perpetual, or near perpetual, where a “successful trade” is simply how you edge into a long term advantageous position. Recall that when investing, you are hoping to profit off the productive capacity of the asset. Therefore, a successful long term trade could simply just be getting into a long position with an asset that is productive and stable, at a good price — in such a trade, you are not looking to sell, instead, you are looking to hold the asset for an indefinite amount of time and let the productive capacity accrue profits.

There is an old trader’s adage which goes roughly, “An investment is a trade gone pear shaped”. And therein lies the difference as explained above, albeit with a tragicomedy twist.

Components of a trading strategy

So what are the components of a trading strategy? In broad terms, a good trading strategy should always have these 3 main components:

  • Base thesis
    • Why are we even considering this trade?
    • What is the catalyst, or driver for this trade to perform well?
    • Examples:
      • Inflation trade, e.g.: we believe inflation is going up/down over the next N months/years
      • Macro trade, e.g.: we believe this country/industry/sector will go up/down over the next N months/years because of <reason>
  • Execution
    • How would we translate the base thesis, from a purely analytical state, to one or more trades?
    • Embedded in this, are considerations such as:
      • Time horizon – How long are we holding the position in each roundtrip?
      • Instrument – What asset are we going to trade to express the base thesis?
      • Price – At what price are we looking to trade?
      • Trading – Are we going to edge into the position slowly? Or buy everything at once?
    • Example:
      • Base thesis: We believe that inflation will go up slightly in the next 2-3 years
      • Time horizon: 2-3 years
      • Instruments:
        • Short short/medium term Treasuries
        • Long stocks of businesses with fixed input costs and variable output prices
      • Price: At the market based on trading strategy.
      • Trading: Form a basket of the instruments with some ratio, rebalance every 3 months
  • Risk management
    • How would we know that our base thesis/execution strategy was wrong?
    • And if one (or both) was wrong, what are we going to do to salvage the situation?
    • Example (follow up on the above):
      • We’ll know our inflation thesis is wrong if inflation does not go up at least 0.1% on a year over year basis every month for the next 6 months.
      • If our thesis is wrong, immediately close out the short Treasuries leg of the position, keep the long stock leg as long as it is still performing at or near broad market performance, and slowly close it out over 2-3 quarters.
      • We’ll know our execution strategy is wrong if inflation does go up as described, but out position does not appreciate faster than broad market performance over a 1 month moving window, sampled daily.
      • If our execution strategy is wrong, immediately close out all positions and rethink.

Case study – Inflation in the 1970s

Base thesis

We are currently in 1971, we predict inflation is going to be much higher for the rest of the decade into 1980.

Execution strategy

Buy near month exchange traded gold futures, and continually roll the contracts forward until expiration of thesis. We believe market pricing is currently fair, so we’ll trade at the market.

We’ll leverage our position by 3x of equity, rebalanced yearly.

Case study result

Anyone who predicted (in 1971) that high inflation will be a problem that decade would have been absolutely correct — inflation went from around 5% in 1971 to 12% in 1975, and finally around 14% in 1980.

However, this simple summary is misleading. Inflation actually fell after 1971 to a low of around 3% in mid 1972, before its enormous rise to 12% in 1975. After that, it again fell to around 5% in 1977, before another huge surge, before ending at around 14% in 1980.

So while the base thesis was, on the whole, correct, the sampling period and how we decide we were correct or wrong (risk management) may have led to us conclude that high inflation was over in 1972 or 1977!

The execution strategy, on the other hand, likely would have given us a roller coaster ride. From 1971 to 1975, gold prices raised from around $260 per ounce to $929 in early 1975. At 3x leverage balanced yearly, we’d have suffered a devastating 91% loss in 1976, ending up with a value worse than if we had simply just bought gold outright without leverage:

YearGold price in JanAnnual % change3x leverage annual % change3x leverage value
1971261.07261.07
1972305.3417.0%50.9%393.95
1973419.4437.4%112.1%835.57
1974762.3081.7%245.3%2885.22
1975929.3821.9%65.8%4783.69
1976647.59-30.3%-91.0%430.53
1977619.89-4.3%-12.8%375.42
1978760.8322.7%68.2%631.46
1979912.9620.0%60.0%1010.34
19802390.52161.8%485.5%5915.54
Gold prices in 1971-1980 and effects of leverage

If we had closed our position then, however, we’d have lost out on a magnificent rise in value till 1980. True, it’s quite a bit less than 3x what the underlying did, but it was still pretty decent!

The astute reader will notice that in the case study, a section on risk management was left out. This is intentional, because since we are looking at the data in hindsight, any risk management strategy can be crafted to make any arbitrary point. That said, a good risk management strategy would hopefully have gotten us out of the trade either in 1972 (because the base thesis, at that point in time, looked like it might have been wrong), or in mid 1975, because gold prices and inflation were both turning down, or (albeit a very risky strategy) it could have given us the courage to held on to our convictions till 1980.

Why bother?

The reason why a good trading strategy plans out the base thesis, execution strategy and risk management way before even entering a trade, is so that these decisions can be made with a level head. Imagine if you were the portfolio manager of the strategy above. Would you have the conviction to hold in 1972, after a very decent (almost double) gain, but with inflation lower than expected? What about in 1976, after a devastating 91% drawdown? Or would you have folded, expecting gold prices to go even lower (as it did the next year by 1977, by another 12.8%)?

Laying out your strategies, and putting them to paper while you still have a clear head helps to eliminate emotional biases that creep in in the heat of the moment. This gives you a chance to at least think clearly about the issues, and decide what your risk tolerances are.

Efficient Market Hypothesis

Foreword

The Efficient Market Hypothesis (EMH) is often cited, or at least alluded to, as the reason why everyone should just buy a basket of all stocks in the market, and then hold them passively. (1)

However, while I believe that the general advice is reasonable (2), the premise is, I believe, flawed.

As usual, a reminder that I am not a financial professional by training — I am a software engineer by training, and by trade. The following is based on my personal understanding, which is gained through self-study and working in finance for a few years.

If you find anything that you feel is incorrect, please feel free to leave a comment, and discuss your thoughts.

EMH, eh?

The EMH is generally attributed to Eugene Fama, in his seminal work “Efficient Capital Markets: A Review of Theory and Empirical Work”, though as the name suggests, many of the core ideas of the EMH did not come from Fama, but from others before him.

The gist of EMH is best summarized by a quote from the very first paragraph of that paper:

A market in which prices always “fully reflect” available information is called “efficient”.

Fama, E. (1970). Efficient Capital Markets: A Review of Theory and Empirical Work. The Journal of Finance, 25(2), 383-417. doi:10.2307/2325486

Note the key words: “always”, “fully reflect”, “available information”.

In other words, the EMH proposes that any public information is instantaneously (i.e.: always + fully reflected) incorporated into the prices of any securities affected by that information.

Models, models everywhere and not a single forecast to trade on

There are 2 main reasons why I believe the EMH is wrong — one is a technical reason, and the other is based on empirical observations.

Technically speaking…

The EMH is not really a hypothesis, so much as it is a model. It is a model of how financial instruments are supposed to behave, and the idea is that using that model, you can then make reasonable deductions about financial assets (or more accurately, their prices).

By definition, a model is a simulacrum of the original — models abstract away certain details of the original, to achieve a simplified representation.

Therefore, models are, by definition, wrong — when you remove certain aspects of the original in order to achieve the model, you are, in effect, creating something that is not a perfect reflection of the original, and thus it will never predict every single nuance of the original.

However, this doesn’t mean all models are useless! Within the assumptions on the parameters used to create the model, the model could very well be very predictive. For example, a simple model of the Sun is that it rises in the East and sets in the West. This is a model of how the Sun operates, but with the implicit assumption that you are observing the Sun on Earth, in a spot a little bit removed from the absolute North and South poles. If, say, you are observing the Sun from Mars, then this may not hold true any more. So, while this model is useful, because everyone I know is on Earth and none are on Mars, it is actually wrong — it implies the Sun revolves around the Earth in a prescribed path, instead of the other way around.

Ergo, all models are wrong, but some models are selectively useful.

EMH? This. Is. Empirical!

Going back to definition of EMH, note that it explicitly states that publicly available information are instantaneously reflected in the prices of security. Well, how often do you hear market moving information about stocks? Maybe once a day? Once an hour? Every few minutes?

But how often do stock prices move? If you have access to tick level information on stock prices, you’ll notice that they literally move every few microseconds. Microseconds. Are there really “publicly available price moving news” every few microseconds? If not, then why are the stock prices moving if they supposedly “always ‘fully reflect’ available information”? (3)

At a more high level, there exists easily observed price discrepancies in the stock markets. Take, for example, the stock symbols GOOG and GOOGL. Both are stocks of Alphabet Inc., the parent company of Google. GOOG represent class C shares which have exactly the same financial/economic interests as GOOGL, the class A shares. However, GOOGL, the class A shares, have voting rights on top of the financial/economic interests, while GOOG, the class C shares, only have the financial/economic interests.

Given that GOOGL = GOOG + “voting rights”, and voting is optional — you can choose to vote or you can choose to abstain, which means voting rights have a value strictly above 0, we should arrive at the conclusions that GOOGL should always trade at least as high as GOOG, and possibly a little bit higher. Right?

GOOG vs GOOGL stock prices in the past ~5 months in 2021, courtesy of Interactive Broker’s Trader Workstation.

Well, would you look at that…

There are some who claim that prior to Q3 2021, because Alphabet Inc. does buybacks primarily via GOOG, therefore GOOG tends to trade at a higher price compared to GOOGL. I have no idea if that’s accurate, but on the face of it, it seems accurate enough — in Q3 Alphabet Inc. announced that they’ll also buyback GOOGL and the gap closed significantly.

Before the EMH crowd screams “Eureka!”… think about it. A stock buyback is essentially the company taking $N of cash and exchanging it for $N of its own stock. It is a financially and economically neutral move, i.e.: stock buybacks, according to the EMH, should not impact the company’s stock price at all.

Hypothetically speaking…

This is where I’ll admit that I was being a little misleading. If you read Fama’s paper in full, you’ll realize that he didn’t actually say that EMH is correct. In fact, he fully admits the hypothesis is wrong:

We shall conclude that, with but a few exceptions, the efficient markets model stands up well.

Fama, E. (1970). Efficient Capital Markets: A Review of Theory and Empirical Work. The Journal of Finance, 25(2), 383-417. doi:10.2307/2325486

Note that he clearly stated there are “exceptions”, and that the “model” isn’t correct, but that it “stands up well”. More importantly, he doesn’t even call it a hypothesis, but a model.

Because a hypothesis is a proposition of what reality is, and as all budding scientists know, “no amount of experimentation can ever prove me right; a single experiment can prove me wrong”, i.e.: just a single counter example, or exception, can prove a hypothesis is wrong. And we have “a few exceptions” here.

Which is to say, it appears that Fama is fully aware that EMM(odel) is a model, with all that implies about a model. It is close enough to reality that it is a useful model in some cases, but it is wrong to assume that the model is always right.

Practically speaking…

In practice, the EMH is useful essentially when you are unable or unwilling (4) to delve deeper into the data. By abstracting away a lot of the complexities of modern financial system, the EMH provides a useful simplification of what happens in the markets, and allows us to ignore those parts of the markets which we don’t care to care about.

For example, when you are developing a trading algorithm for SPY, the number of things the perfect such algorithm will need to know about is basically limitless — interest rates, consensus interest rates predictions, possible Fed initiatives, major events happening around the world, etc. The list is, quite literally, endless.

To make a perfect trading algorithm for SPY is thus impossible. But that doesn’t mean that a profitable SPY trading algorithm cannot exist! The EMH suggests that for the most part, you can assume away most of the details, and focus only on those bits that you have an edge on. For example, maybe you really understand how interest rates and SPY interact. Well, then you can build a model and an algo off that model, which assumes everything else is priced in (5), and just trade based off your simplistic model. Maybe it works, maybe it doesn’t — the point is, the EMH does not predestine it to not work.

In other words — the EMH is useful if there are some things you simply don’t care to worry about right now. Maybe v2 of your model/algo will take those into account. But right now, you have money to make.

Passive investing

Coming back to “passive investing” (1) — if you are unable or unwilling (4) to delve deeper into the data/details, and you simply want a carefree, easy way of investing your money, passive investing is a reasonable answer (2). This is a corollary of “the EMH is useful if there are some things you simply don’t care to worry about right now” — in this case, you simply don’t care to worry about any of those things.

But understand that it is reasonable, only because you are willingly looking at the problem from 10’000 feet away, and thus missing a lot of the nuances and detail that others who are more attentive may see.

Footnotes

  1. I intentionally avoided using “passive investing” in the foreword, because that term is often overloaded — some people mean “buy and hold” (i.e.: don’t trade too much), some people mean “buy baskets of stocks reflecting the total market” (i.e.: don’t do active stock selection), and some people mean both. For the sake of this article, I’m going with “both”.
  2. It is “reasonable”, in that for most people, it is pretty good advice — most people are unlikely to do much better than simply passive investing (as defined in (1) above), though this is not always true in every case. Remember that financial planning isn’t about maximizing your returns, it is the reverse — it is about finding an acceptable level of return, then figuring out the least risky way of attaining that return. Therefore, in some cases, it may be reasonable to adjust your holdings. For example, if you work in tech and your company pays much of your salary in stock, it may make sense to hedge against a general tech stocks decline by overweighting non-tech stocks in your investing portfolio.
  3. There are some who claim that the stock prices themselves are “publicly available information”, and thus, the “current” price move is just a reflection of the “prior” price move, i.e.: the stock price is moving because the stock price moved and generated new information. This is mostly circular reasoning that falls apart upon even cursory examination — as noted, the information must be “fully reflected” in the price “always”, which implies the information must be priced in instantaneously. There is simply no “prior” or “current” in an instant.
  4. Unable here means, well, unable. It doesn’t necessarily mean “too stupid to”. Similarly, unwilling here means unwilling — it doesn’t necessarily mean “too lazy to”.
  5. By the powers vested in me by the EMH, I pronounced all those factors I don’t care about “priced in”.