Skip to content

Commit

Permalink
SE-2827: TaxRuleSets notebook (#626)
Browse files Browse the repository at this point in the history
* SE-2827: TaxRuleSets notebook

* Corrected typo in adding another ruleset

* add subsections to toc

* moved csvs to setup section

* Removed auto toc metadata and re-run notebook

* Added to intro and more clarity in function calls

* Add note that rules can reference portfolio properties

* Revert "Merge branch 'finbourne:master' into feature/SE-2827.taxrulesets"

This reverts commit 2d52290, reversing
changes made to 668692d.

* Fix readme and cron unexpected diffs

My branch had gone out of sync for these 2 files. Copied from repo to bring them back into sync.

* SE-2827 Update notebook commentary

* SE-2827 Add TransactionId column for holdings

* SE-2827 Added comment for transaction id

* SE-2827 Reworked cleanup in last section

* SE-2827 Update following Connor's review

* SE-2827 Various updates following CS feedback

* SE-2827 Updated formatting

* SE-2827 Use ficticious company names

* SE-2827 Remove redundant cell

* SE-2827 Add section 7.4 showing applied tax rule

* SE-2827 Remove redundant column filter section 4.2

* SE-2827 update with comments from CS

* SE-2827 Added links to KB article

* SE-2827 Fix typo
  • Loading branch information
johnd83 authored and Concourse committed Apr 14, 2023
1 parent 88a4bbf commit 8f5a62b
Show file tree
Hide file tree
Showing 5 changed files with 4,347 additions and 0 deletions.
4,332 changes: 4,332 additions & 0 deletions examples/use-cases/ibor/Tax Rule Sets.ipynb

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions examples/use-cases/ibor/data/taxrs_bcc_dividends.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
code,client_internal,div_amount,div_ccy,announcement_date,ex_date,record_date,payment_date,Holding,Expected Gross Dividend (div_amount * Holding),Expected Tax Rate,Expected Tax Amount (Gross * Tax Rate),Expected Net Dividend (Gross - Tax),Expected cash prior to dividend,Expected cash after net dividend
BCC_1_20200707,BCC,0.0379,GBP,31-Mar-20,28-Apr-20,29-Apr-20,07-Jul-20,60000,2274,20%,454.8,1819.2,100,1919.2
BCC_2_20210107,BCC,0.035,GBP,01-Oct-20,29-Oct-20,30-Oct-20,07-Jan-21,60000,2100,20%,420,1680,1919.2,3599.2
BCC_3_20210707,BCC,0.0375,GBP,31-Mar-21,28-Apr-21,29-Apr-21,07-Jul-21,60000,2250,22%,495,1755,3599.2,5354.2
BCC_4_20220107,BCC,0.0402,GBP,01-Oct-21,29-Oct-21,01-Nov-21,07-Jan-22,60000,2412,22%,530.64,1881.36,5354.2,7235.56
BCC_5_20220807,BCC,0.0399,GBP,31-Mar-22,28-Apr-22,29-Apr-22,07-Jul-22,60000,2394,24%,574.56,1819.44,7235.56,9055
2 changes: 2 additions & 0 deletions examples/use-cases/ibor/data/taxrs_svs_dividends.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
code,client_internal,div_amount,div_ccy,announcement_date,ex_date,record_date,payment_date,Holding,Gross Dividend,Tax Rate,Expected: Tax Amount (Gross * Tax Rate),Expected: Gross - Tax,Starting cash,Expected: Holdings cash after net dividend
SVS_1_20220807,SVS,0.6,USD,31-Mar-22,28-Apr-22,29-Apr-22,07-Jul-22,2000,1200,0%,0,1200,100,1300
4 changes: 4 additions & 0 deletions examples/use-cases/ibor/data/taxrs_transactions.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
txn_id,trade_date,transaction_type,inst_client_internal,instrument_currency,quantity,price,net_money
tx_00001,2020-01-02T00:00:00.0000000+00:00,Buy,SVS,USD,2000,159,318000
tx_00002,2020-01-02T00:00:00.0000000+00:00,Buy,UKF,GBP,80000,2.32,185600
tx_00003,2020-01-02T00:00:00.0000000+00:00,Buy,BCC,GBP,60000,2.37,142200
3 changes: 3 additions & 0 deletions examples/use-cases/ibor/data/taxrs_ukf_dividends.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
code,client_internal,div_amount,div_ccy,announcement_date,ex_date,record_date,payment_date,Holding,Expected Gross Dividend (div_amount * Holding),Expected Tax Rate,Expected Tax Amount (Gross * Tax Rate),Expected Net Dividend (Gross - Tax)
UKF_1_20210315,UKF,0.028,GBP,18-Jan-21,15-Feb-21,16-Feb-21,15-Mar-21,80000,2240,22%,492.8,1747.2
UKF_2_20220315,UKF,0.025,GBP,18-Jan-22,15-Feb-22,16-Feb-22,15-Mar-22,80000,2000,30%,600,1400

0 comments on commit 8f5a62b

Please sign in to comment.