Repository: PolicyEngine/policyengine-canada (language: python)

Issue:
Northwest Territories Basic Personal Amount
Reference: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1nt/td1nt-23e.pdf (#1)


Discussion / hints:

Fix patch:
diff --git a/changelog_entry.yaml b/changelog_entry.yaml
index e69de29bb..77f1cf513 100644
--- a/changelog_entry.yaml
+++ b/changelog_entry.yaml
@@ -0,0 +1,4 @@
+- bump: minor
+  changes:
+    added:
+    - Northwest Territories basic personal amount.
diff --git a/policyengine_canada/parameters/gov/provinces/nt/tax/income/credits/basic_personal_amount/base.yaml b/policyengine_canada/parameters/gov/provinces/nt/tax/income/credits/basic_personal_amount/base.yaml
new file mode 100644
index 000000000..e8843151e
--- /dev/null
+++ b/policyengine_canada/parameters/gov/provinces/nt/tax/income/credits/basic_personal_amount/base.yaml
@@ -0,0 +1,15 @@
+description: Northwest Territories provides the following Basic Personal Amount.
+values:
+  2022-01-01: 15_609
+  2023-01-01: 16_593
+metadata:
+  unit: currency-CAD
+  period: year
+  label: Northwest Territories Basic Personal Amount
+  reference:
+    - title: Income Tax Act - Section 2.16 Single Status Credit
+      href: https://www.justice.gov.nt.ca/en/files/legislation/income-tax/income-tax.a.pdf#page=29
+    - title: 2022 Northwest Territories Personal Tax Credits Return - Basic Personal Amount
+      href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/5012-c/5012-c-22e.pdf#page=1
+    - title: 2023 Northwest Territories Personal Tax Credits Return - Basic Personal Amount
+      href: https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1nt/td1nt-23e.pdf#page=1
diff --git a/policyengine_canada/variables/gov/provinces/nt/tax/income/credits/basic_personal_amount/nt_basic_personal_amount.py b/policyengine_canada/variables/gov/provinces/nt/tax/income/credits/basic_personal_amount/nt_basic_personal_amount.py
new file mode 100644
index 000000000..d31617659
--- /dev/null
+++ b/policyengine_canada/variables/gov/provinces/nt/tax/income/credits/basic_personal_amount/nt_basic_personal_amount.py
@@ -0,0 +1,16 @@
+from policyengine_canada.model_api import *
+
+
+class nt_basic_personal_amount(Variable):
+    value_type = float
+    entity = Person
+    label = "Northwest Territories basic personal amount"
+    unit = CAD
+    definition_period = YEAR
+    defined_for = ProvinceCode.NT
+    reference = "https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/td1nt/td1nt-23e.pdf#page=1"
+
+    def formula(person, period, parameters):
+        return parameters(
+            period
+        ).gov.provinces.nt.tax.income.credits.basic_personal_amount.base


Test patch:
diff --git a/policyengine_canada/tests/gov/provinces/nt/tax/income/nt_basic_personal_amount.yaml b/policyengine_canada/tests/gov/provinces/nt/tax/income/nt_basic_personal_amount.yaml
new file mode 100644
index 000000000..700575b3d
--- /dev/null
+++ b/policyengine_canada/tests/gov/provinces/nt/tax/income/nt_basic_personal_amount.yaml
@@ -0,0 +1,27 @@
+- name: 2022 NT basic personal amount
+  period: 2022
+  input:
+    province_code: NT
+  output:
+    nt_basic_personal_amount: 15_609
+
+- name: 2022 NT basic personal amount; wrong province
+  period: 2022
+  input:
+    province_code: AB
+  output:
+    nt_basic_personal_amount: 0
+
+- name: 2023 NT basic personal amount
+  period: 2023
+  input:
+    province_code: NT
+  output:
+    nt_basic_personal_amount: 16_593
+
+- name: 2023 NT basic personal amount; wrong province
+  period: 2023
+  input:
+    province_code: AB
+  output:
+    nt_basic_personal_amount: 0