A little piece of financial math

Like many homeowners, I don’t put a lot of thought into my mortgage payments. Indeed, it suffices for me to know that if I pay the bank the amount that they asked for, then they’ll stay off my back for at least a month. Most of the Canadian banks have a mortgage calculator on their website, and I’ve never put much thought as to how it works.

This changed when my wife, who’s getting certified as a professional accountant, asked me how to perform what turns out to be equivalent to calculating a mortgage. The derivation is quite intricate and surprisingly satisfying mathematically, so I thought I would share.

Let us set up the problem as follows. Suppose that you borrowed an amount k from a lender, and the interest rate is r percent per period. You are to pay the lender back in n equal payments, including all interest and principal. How do you calculate the amount of each payment, and the total cost of borrowing (excluding time value of money which is not part of the problem)?

This question seems quite intractable, as there are many unknowns. However, in a realistic situation k, r, n are all known. In concrete terms, suppose you borrowed k = 250,000 dollars to buy a house, at an interest rate of 3% per month. You are to pay the bank back over a period of 25 years, or n = 300 months. Therefore, our final formula would make use of the parameters n, k ,r, or in other words, we wish to derive the payment amount P as a function of n, k, r.

To do this, let us think about the first payment, say P_1. We have to pay rk amount in interest, and an amount a_1 in principal. Therefore, we have

P_1 = rk + a_1.

The next payment, P_2, we pay an interest equal r(k - a_1), since the principal has been reduced by a_1, and a principal amount equal to a_2 = P_2 - r(k-a_1). Making use of the fact that each payment is equal, i.e. P_1 = P_2 = P, we have

a_2 = P - r(k - P + rk) = P - rk + rP - r^2 k = (1+r)P - k(r + r^2) = (1+r)a_1.

Likewise, for the third payment, we have

a_3 = P - r(k - a_1 - a_2) = P - r(k - a_1 - (1+r)a_1) = a_1 + ra_1 + r(1+r)a_1 = a_1(1+r)^2.

We now have enough data to make an induction hypothesis, namely

a_l = a_1 (1+r)^{l-1}.

If we assume the induction hypothesis, then we have

a_{l+1} = P - r(k - a_1 - \cdots - a_l) = a_1 + r a_1 + \cdots + r(1+r)^{l-1}a_1 = a_1(1+r)^l.

Now we use the fact that after n payments, we must pay back the principal. In other words, we must have

\sum_{j=1}^n a_j = k,

which is equivalent to

a_1 \sum_{j=0}^{n-1} (1+r)^j = k.

The partial geometric series on the left hand side can be evaluated to be

a_1 \left(\frac{(1+r)^n - 1}{r}\right),


a_1 = \frac{kr}{(1+r)^n - 1}.

Recall that a_1 = P - rk, and we obtain

P = rk\left(1 + \frac{1}{(1+r)^n - 1}\right) = \frac{rk(1+r)^n}{(1+r)^n - 1}.

Lessons learned from WW2

The conflict known as World War 2 (officially starting with the invasion of Poland by Germany in 1939, even though many parts of the world was already at war years before that date) is without a doubt the most brutal war (in terms of sheer number of people killed) in the history of the world. It is without surprise that all nations touched by that war had learned a harsh lesson from that war. What is debatable, however, is whether that learned lesson is the same for each participant. I claim that the answer is most certainly ‘no’, and most importantly, the two most powerful nations in the world today learned drastically different lessons.

If the United States learned anything from WW2, it is that if you leave a dangerous despot in charge for too long, you are only giving him enough time to build up his forces to wreck even greater damage later. In other words, the US learned that non-interventionist policies lead to large scale conflict. I remember in our schools, this specific point was made against Neville Chamberlain. If we let a ‘Hitler’ build a powerful autocratic regime for too long, we will face a devastating war. This explains the subsequent US response to the USSR and can be used to explain the Vietnam War, both Iraq Wars, and the war in Afghanistan. These are all manifestations of a ‘preemptive strike’ doctrine, designed to remove dangerous enemy leaders before they are strong enough to pose a serious threat. The USA has used this tactic in less inspiring ways, including the removal of democratically elected socialist leader Salvadore Allende in Chile.

What China learned is that if social order collapses and internal conflict erupts, the nation will be too weak and exhausted to face foreign threats appropriately. Therefore, it has since emphasized social order and national unity above all else in the last seventy years. Interestingly, China did not surmise that the reason Japan was able to invade China so successfully and so devastatingly is because China failed to strike first, but that China was so weak that Japan saw it as an opportunity. Despite its bitter history, China never devised a doctrine of first-strike against would-be opponents. Indeed, China’s foreign policy is almost entirely non-interventionist.

Arguably, China and the USA are the two biggest voices on the United Nations Security Council, who is charged with resolving conflicts like the Syrian conflict. Because of the vastly divergent views of the two most dominant members (not to mention both hold veto power), it is unlikely the UNSC will adopt any tangible action that will actually lead to any reasonable solution. Indeed, what a ‘solution’ might look like will be very different for the two nations.

The Untied States’s desired solution would be: remove Bashar Al-Assad from power, implement a ‘moderate’ (i.e. western leaning) government who will oversee democratic elections, then deployment of western forces to prop up the system, then begin the work of rebuilding the country. However, the removal of the ‘bad regime’ is extremely important desired consequence for the US. The other things are of lesser priority.

China’s desired solution would be to supply the current government with resources to combat their enemies (either western leaning or not), ensure stability, and no foreign troops deployed. At the end of the day, the Assad regime would remain and the country would go back to the way it was before the civil war started five years ago.

In terms of ending the current crisis, both solutions reach the immediate goal of stopping the hemorrhaging of refugees from Syria, but the final outcomes are complete polar opposites. Public opinion in the west will never support China’s solution, so the only possibility is a UNSC stalemate and a weakly worded resolution that ‘condemns’ the actions of various vague parties.

If this conflict is to be stopped, then one side has to win. If every group of combatants is getting weapons and supplies because someone they are ideologically aligned with is willing to supply them, the conflict will never end and the root problem never addressed, until the one group of fighters that are the most dedicated and most fanatical comes out on top. If the history of China is anything of a guide, that group is not necessarily the most well equipped. The most tenacious and dedicated faction will come out on top, and that faction is likely the one where they are not fighting for money but for some ideology, however deranged it is. By that of course I mean the Islamic State.

So if the world’s two superpowers will not yield, they might both lose big time to their most dangerous common enemy. In the sake of both country’s national interests and for the broader interests of humanity, it is important that at least one side is willing to back off. However, the US has been expecting the world to ‘compromise’ to their desired solution for so long, with China being fed up with this for decades, that this is an unlikely scenario.

Bhargavaology and Chabauty implies weak Stewart’s conjecture ‘almost surely’

This is a continuation of a previous post. Recall that Stewart’s conjecture asserts that there exists a constant c_0 such that for all binary forms F(x,y) \in \mathbb{Z}[x,y] with non-zero discriminant and degree r at least 3, there exists a number C_F which depends on the coefficients of F such that for all integers |h| \geq C_F, the equation F(x,y) = h has at most c_0 solutions. The so-called weak Stewart’s conjecture is the same statement with the absolute constant c_0 replaced by a constant c(r) which is only allowed to depend on the degree of F, but otherwise independent of (the coefficients of) F. The weaker conjecture is ‘almost surely’ a consequence of a theorem of Bhargava and Gross, which is the main content of this paper and recent work of Michael Stoll using Chabauty’s method; seen here. Indeed, by the Bhargava-Gross theorem, we know that `almost all’ (in the sense that all but o(2^{-g}) when ordered by naive height) hyperellitpic curves of genus g with g large has Jacobian rank less than g-3, since the average size is only 3/2, and from there we obtain the bound that c(2g+2) \leq 8(g+1)(g-1) + (4g-12)g = 12g^2 - 12g - 8.

The formulation is as follows. The equation F(x,y) = hz^2 defines the equation of a quadratic twist of the hyperelliptic curve F(x,y) = z^2. Assuming that the average over the family of quadratic twists does not deviate too much from the average over all curves, we should see that every curve in the family of quadratic twists have small rank ‘most of the time’, and hence obtain the weak version of Stewart’s conjecture.

However, we are far from being able to establish such a result. The most basic obstruction is that there could exist a set of exceptional curves with very large Jacobian rank in a set of density o(2^{-g}), which may still be positive. Secondly, it is very difficult to control the average size, much less an upper bound, for the Jacobian rank of twists of a curve, as there are infinitely many congruence conditions at play.

Nevertheless, with a sharper tool to deal with potential large rank cases or even an argument to dispense the large genus case altogether, Chabauty’s method and Bhargavaology would imply the weak version of Stewart’s conjecture. Exciting times!

Thue equation “funnel”

In this post I will be detailing a problem I have thought about for about a year, but has not made any progress on. The problem is one posed by my advisor, Professor Cameron Stewart, in the following paper:

C.L. Stewart, On the number of solutions of polynomial congruences and Thue equations, Journal of the AMS, (4) 4 (1991), 793-835.

His conjecture can be seen on page 816 of the above paper:

“… we conjecture that there exists an absolute constant c_0 such that for any binary form F \in \mathbb{Z}[x,y] with nonzero discriminant and degree at least three there exists a number C, which depends on F, such that if h is an integer larger than C then the Thue equation [F(x,y) = h] has at most c_0 solutions in coprime integers x and y.”

In the same paper, Stewart proves that the equation F(x,y) = h has no more than O((\deg F)^{1 + \omega(g)}) solutions, where g is a large divisor of h. The crucial point is that quite often, we can pick g which has few prime divisors, so that \omega(g) is small (see also this recent preprint due to Shabnam Akhtari: http://arxiv.org/abs/1508.03602).

However, this situation should not be typical. The basic idea is that when h is large with respect to the coefficients of F, that F(x,y) = h should behave `generically’, meaning that most of the points on the plane curve defined by the Thue equation should have few rational points. Indeed, generically the curve F(x,y) = h should be of general type (i.e. have genus at least 2), so one should not expect too many rational points by Faltings’ theorem.

Nevertheless, if one checks Stewart’s argument (this particular part is not necessarily new; Bombieri and Schmidt had used roughly the same idea in other papers), then one sees that a crucial ingredient is a p-adic reduction lemma. In particular, for a prime p and a positive integer k such that p^k || h, one can transform the equation F(x,y) = h into at most d = \deg F many equations of the form F_i(x,y) = hp^{-k}. Indeed, this is where the power of d appears in Stewart’s theorem. Another crucial input of Stewart, arguably the most novel part of his paper, is that he shows that the equation F(x,y) = n has few solutions provided that n is sufficiently small with respect to various invariants of F; in particular, he does not require that n = 1.

The deficit of Stewart’s argument, as with all other related results, is that it fundamentally obtains the ‘wrong’ bound: one should expect fewer solutions to the equation F(x,y) = h when h is large, not more. In particular, all arguments involve some sort of reduction or descent argument and reducing the equation to one where the right hand side is a small integer, thereby susceptible to various diophantine approximation arguments, at a cost that is not so severe. This type of argument is unlikely to be useful in resolving Stewart’s conjecture.

However, recent groundbreaking work due to Manjul Bhargava offer hope. In this paper, Bhargava shows that most hyperelliptic curves in the sense of some natural density with respect to the coefficients of the curve written as z^2 = f(x,y) with f a binary form with integral coefficients and even degree, have no rational points. One of the most ingenious constructions in the paper is an explicit representation of a binary form f(x,y) whenever the curve

z^2 = f(x,y)

has a rational point. Indeed, if the curve above has a rational point (z_0, x_0, y_0) say, then there exist integer matrices A,B \in \text{GL}_{2n}(\mathbb{Z}) with 2n = \deg f such that

f(x,y) = (-1)^n \det(Ax - By).

He then showed that most binary forms cannot be represented in the above way, thereby showing that most hyperelliptic curves have no rational points.

If one carries out Stewart’s p-adic reduction argument all the way down to 1, we see the following. Start with a generic equation F(x,y) = h, apply a descent argument, and end up with a bunch of equations of the form \mathcal{F}(x,y) = 1. In particular, the curve defined by

\mathcal{F}(x,y) = z^2

has a rational point! Therefore, it must be one of the rare binary forms with a representation of the form (-1)^n \det(Ax - By). I call this effect ‘funneling’, because we start with a generic, typical object and end up with a special object. Therefore, all of the initial data had to pass through a ‘general to special’ funnel. Since the final object is so rare, the initial object could not be too abundant; otherwise we would ‘violate’ Bhargava’s result.

Of course, the above paragraph is too coarse and fuzzy to formulate precise statements, much less proving a rigorous theorem. However, I still believe that this `funnel’ should exist and that it will lead to a solution to Stewart’s conjecture.

If you have any insights or ideas, please feel free to contact me, I would be extremely pleased if this question gets an answer.

On getting our names “whitesplained”

The phrase “mansplaining” is defined as follows, according to wikipedia: “to explain something to someone, typically a man to woman, in a manner regarded as condescending or patronizing.” It can easily be generalized to the case when a dominant social group tries to explain something to someone from a less dominant social group. This is particularly an issue when it comes to Chinese names and native English speakers trying to dictate to us how to say our own names ‘in English’.

This is particularly a problem for my wife, who has the very common Chinese surname ‘Wang’. According to this source (written in Chinese), there are over 93 million people in China (which does not include the diaspora, which my wife is a part of) with that surname. Most native English speakers pronounce it as spelt, which is like ‘bang’ but with a w in front. In fact, the correct pronunciation is closer to ‘Wong’ or ‘Wung’. There is no word in English that sounds exactly like how it sounds in Chinese, so one could be forgiven if they can’t pronounce it exactly right. This is not the problem.

The problem is that people tell my wife, when she corrects them on how to say her surname, that she’s incorrect. She hears people say “well in English it’s just said that way”. Many people tell her that it’s because she’s not a native speaker and therefore have an accent, that her pronunciation is flawed.

Why is this an issue? Well, it is absolutely insulting to say the least. To suggest that we don’t know how to say our own names is preposterous. The other issue at hand is that there is a flagrant lack of respect for our language. This issue flared up on a recent trip where we noticed a member of our group didn’t know the ‘correct’ pronunciation of Mexican food items such as quesadilla or tortilla. In particular, she didn’t know that the double l in these words are supposed to be a ‘yee’ sound. Upon closer examination, it seems that native English speakers have no problem adopting the actual correct pronunciation of a wide variety of foreign words. Nobody insists on pronouncing the following words ‘as written’, and in fact if you tried to pronounce these words using the usual rules of the English language, someone will correct you on it. These include:

Tortilla, quesadilla, fajita, gelato, latte, cappuccino, schadenfreude, de ja vu, jalapeño, etc.

Notice that all of these are words from another European language. It appears that native English speakers have no problem accepting that these words are not English words and therefore deserve to be pronounced the way that the original language conceived, but that Chinese surnames do not deserve the same courtesy. In fact, even on surnames, there is a double standard. If someone with a European sounding name insists on a pronunciation, nobody suggests that they simply need to say their name ‘the English way’.

So, today I say enough is enough. Please respect us when we say how our name is pronounced and do your best to pronounce it that way, instead of condescendingly imply that we’re speaking Chinglish.

What the Eurozone crisis teaches about us

As should be well known today, there is an ongoing financial crisis in the Eurozone centred around Greece. Namely, Greece defaulted on its IMF loan, and although a new bailout package has been more or less secured, the future of the Eurozone is now seriously questioned.

The Greek crisis teaches us many things here in Canada and the US. Although it is a less serious problem in Canada, Canada being much more egalitarian than our southern neighbours, we often hear about how great various socialist states in Europe are doing. Moreover, we distance ourselves from the kind of turmoil that is currently engulfing the Eurozone, as we think we are much more united than the different stated in Europe. However, I argue that we are closer to the latter than the former.

I believe the main obstacle to achieving more equitable social programs and wealth distribution schemes is our inability to identify all other citizens as a part of the same tribe. Indeed, being countries that depend on immigration for population growth and featuring a highly diverse population, racism inevitably comes into the picture. While a significant portion of Canadians and Americans are not white, they usually cannot be identified as ‘Canadian’ or ‘American’ unless they show their passports. This includes people who have lived on this continent for generations, and ironically, even includes native people. As such, the white dominated majority in both countries favour rules that keep the ‘others’ down. This is particularly severe in the US, where their prison system and the school-to-prison pipeline disproportionately affects minorities. This means that most people cannot accept a “we are all in this together” premise, applied to a national scale. Therefore, our innate racism and tendency to see people who look different as others prevent us from adopting socialist policies that we seem to like in Europe, because in those countries the population is almost uniformly homogeneous.

The Eurozone crisis is an exaggeration of what could happen if racial harmony deteriorates further. The root problem with the Eurozone is that while European leaders have a responsibility to safeguard the collective economic prosperity of the Eurozone, they are only held accountable for the prosperity of their own nation, as they are all nationally elected leaders (i.e. even if Angela Merkel does something that seriously damages the Eurozone but Germany comes out on top, making Merkel super unpopular in the Eurozone but popular in Germany, she will still be elected). This potential conflict of interest obstructs the European Union from becoming a functioning body. In a single nation, inevitably rich people and wealthy places subsidize poor people and impoverished places. This may not be done directly, but each nation collects taxes at the nation level, and have national social programs that directly or indirectly redistribute wealth. Wealthy places naturally pay more taxes, and in most cases benefit less proportionately from welfare programs, therefore creating a subsidy effect. Usually people don’t have too much of a problem with this because they need to accept, albeit begrudgingly perhaps, that their tax dollars are helping their fellow countrymen. This is not so on the scale of the EU, since Germans will likely never see Greeks as ‘their own’. This is further exacerbated by the strong national identities in Europe that have persisted for millennia.

While the problem is not quite so severe in Canada, some of our attitudes are just as problematic. For instance, the basic premise that paying taxes is a drain on one’s personal finances rather than an investment towards creating better public goods. Our sense of other prevents us from seeing the utility of ‘public goods’, because of the perception that ‘others’ will use them up more than us or even that ‘others’ will use these goods when they don’t ‘deserve to’. Only when we realize that investment in public goods leads to a better situation for all (and that it’s ok that this investment benefits the poor and disadvantaged more than those who are not poor and not disadvantaged), can we hope to create a better society.

My thoughts on reading the news

I read this article about a year ago and has contemplated on it from time to time over the year. However, some recent developments prompted me to think about the notion of reading the news a bit more.

From an early age, I was taught that reading the news daily (and not just local news, but national/international news) is a good habit. After neglecting this habit during my teens, I picked it up again in my early 20s and hasn’t stopped since. When I encountered the article linked above, I was dismissive at first, because how can there be an advantage to being under-informed? However, I was forced to go back on that thought during a recent news wave.

There are two big financial stories being told right now. One is centred in the Eurozone, and more specifically about Greece. I quickly realized how polarized the reporting is and how differently the story is told from different perspectives. On the one hand, the ‘right wing’ segments all focus on how lazy and deceitful the Greek people are and how they are basically robbing everyone else. On the other, the focus is on how austerity measures have crushed the Greek economy and that there is genuine suffering in Greece. However, the most important thing to take away, in line with the ‘focus on the car and forget the bridge’ analogy in the above article, is the lack of focus on the big picture, or exaggerating the situation.

Let us first discuss how the big picture is neglected. Greece is a tiny part of Europe. It accounts for less than 2% of the EU GDP, its population is a meagre 10 million, and it is geographically disconnected from the rest of the Eurozone. Its economic impact on the rest of the Eurozone, while not negligible perse, is not significant. So what is the big fuss about? It cannot be about the actual economic realities in Europe, because Greece is such a small part of it. One cannot suggest that the real economic impact will be catastrophic unless one is implying some sort of domino effect.

Next, how things are exaggerated. The biggest suggestion from the ashes of the Grexit debacle is that this might lead to the dissolution of the Eurozone (see here, for example). However, this conclusion seems odd, because it seems like the exact opposite happened. Despite tough rhetoric and strong defiance from the Greeks for weeks, at the last minute they caved, because they realized how important staying in the Eurozone is for their continued existence. Germany also folded in some sense, because they realized the fallout for being the black-hand in the death of the Eurozone would be disastrous for them. Therefore, the Eurozone is not really going anywhere because all parties from top and bottom have a vested interest in keeping it intact.

The next major instance of news distorting your perception rather than improving it is with China and its recent stock market crash. One can hardly find an objective analysis of what happened without the author injecting more of their own opinions on the matter. However, when one talks to someone actually on ground level, the situation seems not so bad. Most Chinese citizens are not involved directly with the stock market. In fact, even if claims that “millions” of Chinese people are buying stocks, in a country of 1.4 billion, that amounts to a lot less than 1% of the population. The true percentage is actually higher, which is an embarrassing testament to how a lot of news writers fail to comprehend basic arithmetic when trying to exaggerate (i.e. in their attempt to exaggerate the numbers they actually made the numbers underwhelming).

Next, the news is full of suggestions about the political ramifications for the Chinese government. Every time there is the slightest economic upheaval, suggestions abound that the end of the ‘Chinese miracle’ is near, and that the whole thing will come crashing down. This type of hysteria has existed for 30 years, since the ‘Chinese miracle’ began in the 1980s. This is the result of knee jerk reactions based on personal prejudices rather than a careful analysis. One has to remember that news writers are not scholars; their role is to write a good story that sells, rather than solid research that can hold up to peer review. Therefore, it is better to stick to sources closer to being the latter than the former.