UK CGT (w/ Share Pooling) - rule 2 (30days)

There are three rules for UK CGT calculation.

  1. If you are buying and selling assets on the same day then the Average Cost is calculated by taking the average cost of holdings bought during that day. This is known as the same-day rule. If you are selling more than you bought on that day, use rule #2 for the remaining assets.
  2. The average cost of assets bought during 30 days following the day of disposal. This is known as the 30 day rule. If you did not buy enough assets in this period to cover all the disposed assets then move to rule #3 for the remaining amount.
  3. Take the average cost of all assets bought prior to the disposal (aka section 104 holdings).

For rule 2, if there are multiple sell records within 30 days, how to calculate the average cost of assets bought during 30 days following the day of disposal. Here is the sample

Ryan carried out the following transactions for Bitcoin:
1 Jan 2019 – Purchased 4 BTC for £6,200
30 Aug 2019 – Purchased 2 BTC for £8,800
15 Dec 2019 – Sold 4.5 BTC for £27,000
28 Dec 2019 – Sold 0.5 BTC for £3,100
30 Dec 2019 – Purchased 0.5 BTC for £2,500
3 Jan 2020 – Purchased 1.5 BTC for £7,000
20 Jan 2020 – Purchased 0.5 BTC for £2,000

The trasaction on 30 Dec 2019 and 3 Jan 2020 are fullfilled the rule2. So how to calculate the GCT and average cost of assets for the overall pool?