Quick Contact Information

Email: focusedtuition@aol.com

Wednesday, July 12, 2017

Capital Gains Tax Methods in Python 3.6.0

An M.Tax student recently approached me with an optimisation problem in relation to Capital Gains Tax. Specifically, the problem relates to the attribution of capital losses to capital gains and the choice between the Discount and the Indexation method for assets purchased prior to September 1999 and have been held for at least 12 months.

The question appears under Example 18 of the ATO publication "Personal Investors Guide to Capital Gains Tax 2016" (LINK).

EXAMPLE 18: Clare made capital gains from shares she bought before 11.45am <by legal time in the ACT> on 21 September 1999 and had capital losses carried forward from a previous year.


Clare sold a parcel of 500 shares last March for \$12,500, that is, for \$25 each. She had acquired the shares in March 1995 for \$7,500, that is, for \$15 each, including stamp duty and brokerage costs. There were no brokerage costs on sale. Clare had no other capital gains or capital losses for the current income year, although she has \$3,500 unapplied net capital losses carried forward from earlier income years.

Because Clare owned the shares for more than 12 months and acquired the shares before September 1999 she can use the discount method or the indexation method to work out her capital gain, whichever gives her a better result. Clare firstly works out her net capital gain by applying both the indexation method and the discount method to the whole parcel of shares <Figure 1>:


If we were to adopt the naive approach and assume the methods are mutually exclusive, then clearly the Discount Method offers a materially better outcome.

However, because each share is a separate asset, Clare can use different methods to work out her capital gains for shares within the parcel. The lowest net capital gain would result from her applying the indexation method to sufficient shares to absorb the capital loss, or as much of the capital loss as she can, and apply the discount method to any remaining shares. Clare therefore applies the indexation method to the sale of 396** shares and the discount method to the remaining 104 shares. She works out her net capital gain as follows <Figure 2>:


Note that the problem description clearly states \$3500 in prior years carry forward capital losses but the example applied \$3503 in capital losses across the two methods. Barring that irregularity, The net capital gain under the discount method should be \$520 which brings the total net capital gain across the two methods to \$523, i.e. \$520 + \$3. Clearly, the hybrid method beats a pure Indexation or Discount Method but there is more work involved in fully exploring the different ways we allocate the number of shares and losses to each method.

Of course, the last thing we'd want is to pay a human to go through all the different permutations of share and capital loss attributions across the two methods. We are effectively carrying out a 2-dimensional goal seek to identify a global minimum. Here's some code in Python to automate the process:


And here are the Python results:


I've summarised the comparison between the ATO's calculation <with adjustments to correct their error> and Python:


Close enough!


** To calculate this, Clare worked out the capital gain made on each share using the indexation method, i.e. \$4,422 ÷ 500 = 8.84, and divided the capital loss by this amount, i.e. \$3,500 ÷ 8.84 = 396). The ATO is kinda cheating here as it knows, in this case, that the losses are best absorbed by the Indexation Method. This is one of the differences between an Expert System and an Optimisation Engine. Expert systems use hardwired business rules to screen out sections of the exploration landscape but they are difficult to scale.

Wednesday, March 23, 2016



In most psychometric assessments you will be presented with a series of text passages, each of which is followed by several statements.


Your task is generally to read the passage and evaluate each statement according to the following rules:
>  Select TRUE if the statement must be true based on the information in the passage.
>  Select FALSE if the statement is definitely false given the information in the passage.
>  Select CANNOT SAY if you cannot say whether the statement is true or false without further information.


You need to base your answers only on the information given in the passage. Regardless of what you may, or think you may, already know about the topic, refrain from using your prior/legacy knowledge to influence your choice.


After each question there are a number of different answer options. Most responses have a binary outcome in that there is one, and only one, correct answer to each question. The set of choices are either one of:


(1.) ONE choice is definitely CORRECT and the remaining choices are definitely INCORRECT.


(2.) A number of choices have VALIDITY but there is one choice that is the BEST.

Friday, January 29, 2016

Sandwiches

Definition 1: A sandwich is two or more pieces of bread stacked on top of one another. Eg. two pieces of bread stacked together is a 'sandwich'.

Definition 2: Two slices of bread NOT adjacent to each other forms a sandwich. Eg. a bread stack of 4 slices contains 3 sandwiches.

In a loaf of bread with N slices of bread, N being an integer, how many sandwiches are there according to Definition 1? Definition 2?

Saturday, August 22, 2015

UMAT timeline

Dear All,

Please be advised:

"From 2017 onwards, at least 50 of the available places in the Graduate Entry Medicine program will be reserved for students who have completed Monash University's Bachelor of Biomedical Science. Generally, only students who start a first year undergraduate Biomedical Science degree at Monash University will be considered eligible for entry via the direct pathway into Graduate Entry Medicine at Monash University."

External applications will still be assessed on the basis of their GAMSAT but with relegated priority. Undergraduate entrance will also remain an option with equal weighting given to (1) ATAR, (2) UMAT and (3) Interview.

Sources: 
Transition to Graduate Entry MBBS
Undergraduate Entry

Sunday, July 12, 2015

Simple Kinematic Problem

Problem: Find the magnitude of the force $P$ in the figure below.

Let $F_{d}=(m_{1}+m_{2})\cdot \overline{a}$  where  $\overline{a}$  is the acceleration to the right.

Note the following relationships:

$$tan(\theta)=\frac{F_{v}}{F_{h}} \quad\rightarrow\quad F_{h}=\frac{F_{v}}{tan(\theta)}$$
$$F_{1}=\mu N_{1}=\mu m_{1}g$$
$$F_{2}=\mu N_{2} \quad where \quad m_{2}g=N_{2}+F_{v}$$
$$F_{h}=F_{d}+F_{1}+F_{2}$$

Making the appropriate substitutions give:

$$\frac{F_{v}}{tan(\theta)}=(m_{1}+m_{2})\cdot \overline{a}+\mu m_{1}g+\mu (m_{2}g-F_{v})$$

After some algebraic rearrangement, we arrive at:

$$F_{v}=\frac{tan(\theta)}{1+\mu tan(\theta)}\bigg[ m_{1}+m_{2}(\mu g + \overline{a})  \bigg]$$

Hence,  $P=\frac{F_{v}}{sin(\theta)}=\frac{tan(\theta)}{sin(\theta)[1+\mu tan(\theta)]}\bigg[ m_{1}+m_{2}(\mu g + \overline{a})  \bigg]$

Thursday, June 11, 2015

Problem Statement:



A wealthy and successful businessman decides to showcase his wealth by wearing a tailor made 'gilded' silk shirt. However, in order to ward off potential muggers, he hires four (4) bodyguards to follow him around as he flaunts his way about town.

The guards are well compensated for their services and, in time, they make enough money to afford their own gilded silk shirts. And so that's what they did. Now we have the boss plus his four guards all wearing gilded silk shirts. Now that the guards are well off, they each decide to hire four (4) bodyguards of their own to ward off potential muggers.

If the above scenario perpetuates, then we can envision each successive generation of employees (guards) becoming wealthy enough so that they can afford their own gilded shirts and bodyguards. Guards in the n-th generation will concurrently become wealthy enough to guy their gilded silk shirt and each will, concurrently, hire 4 of their own bodyguards.

Assume that the population of India is 1.3 billion. Answer the following questions:

$(a)$
What proportion (\rho) of the total population have gilded silk shirts?

$(b)$
Find ratio (R) of gilded silk shirt-wearers to 'ungilded' bodyguards.

$(c)$
What proportion (\epsilon) of the population are neither gilded shirt-wears or bodyguards?



Suggested Solution: 

Let $\zeta(t)$ be the number of gilded silk shirt wearers at time $t$ and note that $\zeta(0)=1$.

Let $\eta(t)$ be the number of guards without gilded silk shirts where $eta(0)=4$.

Let $L=1.3\cdot10^{9}$ be the total population.

The value of $\zeta(t)$ and $\eta(t)$ respectively grows as follows:

$$\zeta(t)=\sum_{k=0}^{t}4^{k}$$ and $$\eta(t)=4^{t+1}$$

This is a deterministic branching process whereby each instance of $\zeta$ in the current iteration spawns four new instances of $\eta$ in the next iteration. Other examples of (probabilistic) branching processes include nuclear fission, population growth and cellular division.

We choose some time $t=T$ such that $\zeta(T) + \eta(T) \leq L$ and $\zeta(T+1) + \eta(T+1) > L$

$(a)$
The proportion of the total population have gilded silk shirts:

$$\rho=\frac{\zeta(T)}{L}=\frac{\sum_{k=0}^{T}4^{k}}{L}$$

$(b)$
The ratio of gilded silk shirt-wearers to 'ungilded' bodyguards.

$$R=\frac{\zeta(T)}{\eta(T)}=\frac{\sum_{k=0}^{T}4^{k}}{4^{T+1}}$$

$(c)$
The proportion of the population who are neither gilded nor bodyguards?

$$\epsilon=\frac{L-\zeta(T)-\eta(T)}{L}=\frac{L-\sum_{k=0}^{T+1}4^{k}}{L}$$

Now solve the above using recursion.

Wednesday, June 10, 2015

To my MEC2010 group members,

The test function you should implement in your expression is as follows:

$$\theta(i,j)=\varepsilon \cdot \sin \bigg( \frac{ij\pi}{n_{x}} \bigg)$$

The test case was the diffusion (heat) equation:

$$\frac{\partial U}{\partial t}=\kappa\frac{\partial^{2}U}{\partial x^2}$$

In your response, you need to discuss the conditions that ensure numerical stability and produce a plot using meshgrid() to show the stable and unstable cases respectively.

Email me if further clarification is required.