Question: CP5805 Assignment 1 - Challenge The challenge task is to write a function that will calculate the taxable capital gain or loss for each sale

 CP5805 Assignment 1 - Challenge The challenge task is to write

CP5805 Assignment 1 - Challenge The challenge task is to write a function that will calculate the taxable capital gain or loss for each sale of a stock. Because the sale of stock may include units purchased at dierent times for different prices, this is not a trivial task. Furthermore, there is a 50% discount applied to capital gains where the units of stock have been held for at least 12 months (we consider this to be 365 calendar days). To identify which units of stock have been sold= the Australian Tax Office (ATO) uses the 'rst in, first out' principle. Consider the following examples. Example 1 Alice buys 100 units of PEAR for $1000.00 (that's $10 per unit) on 1 January 2010. Alice sells 50 units of PEAR for $1500.00 (that's $30 per unit) on 1 December 2010. These units were purchased at $10 per unit, for an original price of $5 00. This a taxable capital gain 0f$1500 - $500 = $1000. Because she held the units less than 365 days, there is no capital gains tax discount. Alice then sells 20 units of PEAR for $2000.00 on 1 January 2015. This is a capital gain of $2000 - $200 = $1800. Because she held the units for more than 365 days, there is a 50% discount. and the taxable gain is therefore $900

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!