Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description: Maximum annual insurable earnings for Employment Insurance
values:
2020-01-01: 54_200
2021-01-01: 56_300
2022-01-01: 60_300
2023-01-01: 61_500
2024-01-01: 63_200
2025-01-01: 65_700
metadata:
unit: currency-CAD
period: year
label: EI maximum insurable earnings
reference:
- title: EI premium rates and maximums
href: https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/payroll/payroll-deductions-contributions/employment-insurance-ei/ei-premium-rates-maximums.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
description: Maximum weekly Employment Insurance benefit amount
values:
2020-01-01: 573
2021-01-01: 595
2022-01-01: 638
2023-01-01: 650
2024-01-01: 668
2025-01-01: 695
metadata:
unit: currency-CAD
period: week
label: EI maximum weekly benefit
reference:
- title: Employment Insurance benefit amounts
href: https://www.canada.ca/en/services/benefits/ei/ei-regular-benefit/benefit-amount.html
- title: EI premium rates and maximums
href: https://www.canada.ca/en/revenue-agency/services/tax/businesses/topics/payroll/payroll-deductions-contributions/employment-insurance-ei/ei-premium-rates-maximums.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Minimum insurable hours required for Employment Insurance eligibility
values:
2020-01-01: 420
metadata:
unit: hour
period: year
label: EI minimum insurable hours
reference:
- title: Employment Insurance eligibility
href: https://www.canada.ca/en/services/benefits/ei/ei-regular-benefit/eligibility.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
description: Employment Insurance benefit replacement rate
values:
2020-01-01: 0.55
metadata:
unit: /1
period: year
label: EI benefit rate
reference:
- title: Employment Insurance benefit amounts
href: https://www.canada.ca/en/services/benefits/ei/ei-regular-benefit/benefit-amount.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
- name: Basic EI benefit calculation
period: 2024
input:
employment_income: 50_000
ei_insurable_hours: 600
output:
# Weekly: min($50,000, $63,200) / 52 * 0.55 = $528.85
# Capped at maximum $668/week, so $528.85
# Annual: $528.85 * 26 weeks = $13,750
ei_benefit: 13_750

- name: EI benefit at maximum
period: 2024
input:
employment_income: 80_000
ei_insurable_hours: 1_000
output:
# Weekly: min($80,000, $63,200) / 52 * 0.55 = $668 (at maximum)
# Annual: $668 * 26 weeks = $17,368
ei_benefit: 17_368

- name: Below minimum hours - no benefit
period: 2024
input:
employment_income: 40_000
ei_insurable_hours: 400
output:
ei_benefit: 0

- name: No employment income - no benefit
period: 2024
input:
employment_income: 0
ei_insurable_hours: 600
output:
ei_benefit: 0

- name: EI benefit for 2025
period: 2025
input:
employment_income: 60_000
ei_insurable_hours: 800
output:
# Weekly: $60,000 / 52 * 0.55 = $634.62
# Annual: $634.62 * 26 weeks = $16,500
ei_benefit: 16_500

- name: EI benefit at 2025 maximum
period: 2025
input:
employment_income: 90_000
ei_insurable_hours: 1_200
output:
# Weekly: min($90,000, $65,700) / 52 * 0.55 = $694.90
# Annual: $694.90 * 26 weeks = $18,067.50
ei_benefit: 18_067.50
1 change: 1 addition & 0 deletions policyengine_canada/variables/gov/benefits.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class benefits(Variable):
"child_disability_benefit",
"canada_workers_benefit",
"dental_benefit",
"ei_benefit",
"oas_net",
# Ontario programs.
"on_benefits",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from policyengine_canada.model_api import *


class ei_benefit(Variable):
value_type = float
entity = Person
label = "Employment Insurance benefit"
definition_period = YEAR
unit = CAD
documentation = "Annual Employment Insurance benefit amount"
adds = ["ei_benefit"]

def formula(person, period, parameters):
# Get the weekly benefit amount
weekly_benefit = person("ei_weekly_benefit", period)

# For simplicity, assume 26 weeks of benefits (halfway between min 14 and max 45)
weeks_of_benefits = 26

return weekly_benefit * weeks_of_benefits
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from policyengine_canada.model_api import *


class ei_eligible(Variable):
value_type = bool
entity = Person
label = "Eligible for Employment Insurance"
definition_period = YEAR
documentation = "Whether person is eligible for Employment Insurance benefits"

def formula(person, period, parameters):
p = parameters(period).gov.cra.benefits.employment_insurance

# Check minimum hours requirement
insurable_hours = person("ei_insurable_hours", period)
meets_hours = insurable_hours >= p.minimum_hours

# Must have insurable earnings
insurable_earnings = person("ei_insurable_earnings", period)
has_earnings = insurable_earnings > 0

return meets_hours & has_earnings
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from policyengine_canada.model_api import *


class ei_insurable_earnings(Variable):
value_type = float
entity = Person
label = "Employment Insurance insurable earnings"
definition_period = YEAR
unit = CAD
documentation = "Total insurable earnings in the qualifying period"

def formula(person, period, parameters):
employment_income = person("employment_income", period)
p = parameters(period).gov.cra.benefits.employment_insurance

# Cap at maximum insurable earnings
return min_(employment_income, p.maximum_insurable_earnings)
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from policyengine_canada.model_api import *


class ei_insurable_hours(Variable):
value_type = float
entity = Person
label = "Employment Insurance insurable hours"
definition_period = YEAR
unit = "hour"
documentation = "Number of insurable hours worked in the qualifying period"
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from policyengine_canada.model_api import *


class ei_weekly_benefit(Variable):
value_type = float
entity = Person
label = "Employment Insurance weekly benefit"
definition_period = YEAR
unit = CAD
documentation = "Weekly Employment Insurance benefit amount (calculated annually)"

def formula(person, period, parameters):
p = parameters(period).gov.cra.benefits.employment_insurance

# Check eligibility
eligible = person("ei_eligible", period)

# Calculate average weekly earnings
# Simplified - using annual earnings divided by 52
insurable_earnings = person("ei_insurable_earnings", period)
weekly_earnings = insurable_earnings / 52

# Apply benefit rate
benefit_amount = weekly_earnings * p.rate

# Cap at maximum
capped_benefit = min_(benefit_amount, p.maximum_weekly_benefit)

return where(eligible, capped_benefit, 0)
Loading