Baby Quantitative Finance

In this post, we will explore some basic notions in quantitative finance.

More specifically, buying and selling stocks.

Suppose 1 unit of a stock KMATH costs $1 at time t = 0. Assume negligible trading fees.

Problem 1. At time t = 0, you buy 200 units of KMATH. What is the value of your position?

(Click for Solution)

Solution. The value of 200 units of KMATH is

200 \times \$1 = \$200.

Problem 2. Suppose at time t = 1, the price per unit of KMATH increased by 10%. What is the value of your position at t = 1?

(Click for Solution)

Solution. The value of the position has increased by 10\%, that is,

10\% \times \$200 = 0.1 \times \$200 = \$20.

Therefore, the position has a new value of

\$200 + \$20 = \$220.

Alternate Solution. If the initial position has a value of \$P and the price increased by a percentage of r_1, then the position increases by the value

r_1 \times \$P = \$(P \times r_1).

Therefore, the position would have a new value of

\begin{aligned} \$P + \$(P \times r_1) &= \$P + r_1 \times \$P \\ &= (1 + r_1) \times \$P \\ &= \$((1 + r_1) \times P).\end{aligned}

In particular, setting P = 200 and

\displaystyle r_1 = 10\% = \frac{ 10 }{ 100 } = 0.1

in Problem 2 yields a new value of

\$((1 + 0.1) \times 200) = \$220.

Problem 3. Suppose at time t = 2, the price per unit of KMATH decreased by 10%. What is the overall change in your position from t = 0 to t = 2? How about its overall percentage change? Is your position in a profit or a loss?

(Click for Solution)

Solution. We will use the calculation in Remark 1. Let

\displaystyle r_2 = -10\% = -\frac{ 10 }{ 100 } = -0.1

denote the percentage decrease of the price per unit of KMATH from t = 1 to t = 2.

By Remark 1, the new position at t = 1 is \$( (1+r_1) \times 200 ) . Therefore, the new position at t = 2 has a value of

\$ ( (1 + r_2) \times ((1 + r_1) \times 200) ) = \$ ( (1 + r_1) \times (1+r_2) \times 200 ).

Substituting r = 0.1, the new position has a value of

\begin{aligned} \$ ( (1 + r_1) \times (1+r_2) \times 200 )&= \$ ( (1 + 0.01) \times (1-0.01) \times 100 ) \\ &= \$ ( (1 - 0.1^2) \times 200 ) \\ &= \$ ( (1 - 0.01) \times 200 ) \\ &= \$ 198. \end{aligned}

The overall percentage change is

\displaystyle -0.01 \times 100\% = -1\%.

Since the percentage change is negative, our position currently sits in a loss.

Problem 4. For any positive integer n, let rn denote the percentage change in your position from t = n – 1 to t = n. Show that the overall percentage change r between t = 0 and t = n is calculated by

1 + r = (1 + r1) × (1 + r2) × … × (1 + rn).

(Click for Solution)

Solution. Let P_n denote the value of the position at time t = n. Applying the alternate solution in Problem 2 repeatedly,

\begin{aligned} \$P_n &= (1 + r_n) \times \$P_{n-1} \\ &= (1 + r_n) \times (1 + r_{n-1}) \times P_{n-2} \\ &= \, \vdots \\ &=  (1 + r_n) \times (1 + r_{n-1}) \times \cdots \times (1 + r_1) \times \$P_0 \\  &= \$ ( (1 + r_n) \times (1 + r_{n-1}) \times \cdots \times (1 + r_1) \times P_0 ). \end{aligned}

On the other hand, denoting the overall percentage change by r, we have

\$P_n = \$((1+r) \times P_0)

Equating the two sides,

\$ ((1 + r) \times P_0) = \$ ( (1 + r_n) \times (1 + r_{n-1}) \times \cdots \times (1 + r_1) \times P_0 ).

Dividing by P_0 on both sides yields the desired result:

1 + r = (1 + r_n) \times (1 + r_{n-1}) \times \cdots \times (1 + r_1).

Problem 5. What is the minimum percentage increase of the price per unit of KMATH from t = 2 to t = 3 required for you to not incur loss?

(Click for Solution)

Solution. Let r_3 denote the required percentage increase of the price per unit of KMATH from t = 2 to t = 3. By Problem 3, the overall percentage change r is given by

1 + r = (1 + r_1) \times (1 + r_2) \times (1 + r_3).

Substituting r_1 = 0.1 and r_2 = -0.1, since 1+r_1 > 0 and 1+r_2 > 0, we can divide on both sides to obtain

\displaystyle 1 + r_3 = \frac{ 1 + r }{ (1 + 0.1) \times (1 - 0.1) } = \frac{ 1 + r }{ 1 - 0.01}.

Subtracting by 1 on both sides,

\displaystyle r_3 = \frac{ 1 + r }{ 1 - 0.01 } - 1.

Since we do not want to incur loss, the overall percentage change must be non-negative, that is to say, r \geq 0:

\begin{aligned} r_3 = \frac{ 1 + r }{ 1 - 0.0001 } - 1 \geq \frac{ 1 + 0 }{ 1 - 0.01 } - 1 = \frac{ 1 }{ 99 } > 0.01 = 1\%. \end{aligned}

In particular, we need more than 1\% increase in order to compensate for an overall decrease of 1\%.

—Joel Kindiak, 22 Feb 26, 1324H

Published by


Leave a comment