Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

South Carolina Net Capital Gain Deduction #2718

Merged
merged 26 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
33a7694
South Carolina Net Capital Gain Deduction
hua7450 Jul 27, 2023
a64c8a0
git pull upstream master
hua7450 Jul 27, 2023
89bec43
South Carolina Net Capital Gain Deduction
hua7450 Jul 27, 2023
92e26f7
South Carolina Net Capital Gain Deduction
hua7450 Aug 2, 2023
630e6bf
update version
hua7450 Aug 2, 2023
a0bc0e6
South Carolina Net Capital Gain Deduction
hua7450 Aug 2, 2023
f80f196
South Carolina Net Capital Gain Deduction
hua7450 Aug 30, 2023
b11e244
Merge branch 'master' of https://github.com/PolicyEngine/policyengine…
hua7450 Aug 30, 2023
8049a56
minor change
hua7450 Aug 30, 2023
c2ce825
fix code
hua7450 Aug 31, 2023
2a1cbf0
Update policyengine_us/parameters/gov/states/sc/tax/income/deductions…
PavelMakarchuk Aug 31, 2023
905a9ed
South Carolina Net Capital Gain Deduction
hua7450 Sep 2, 2023
153eed1
update version
hua7450 Sep 2, 2023
0347386
Merge branch 'hua7450/issue2716' of https://github.com/hua7450/policy…
hua7450 Sep 2, 2023
0d70fb6
South Carolina Net Capital Gain Deduction
hua7450 Sep 2, 2023
0b1002f
South Carolina Net Capital Gain Deduction
hua7450 Sep 4, 2023
61a6815
update version
hua7450 Sep 4, 2023
5f537de
South Carolina Net Capital Gain Deduction
hua7450 Sep 6, 2023
9c490cf
update version
hua7450 Sep 6, 2023
20afe51
update version
hua7450 Sep 20, 2023
885ceac
minor change
hua7450 Sep 21, 2023
ae2c2f3
update version
hua7450 Sep 21, 2023
2e4ed87
update version
hua7450 Sep 26, 2023
bc80114
rename folders
hua7450 Oct 4, 2023
2a1915e
update version
hua7450 Oct 4, 2023
1dfd0e0
minor code fix
hua7450 Oct 4, 2023
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
4 changes: 4 additions & 0 deletions changelog_entry.yaml
hua7450 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- bump: minor
changes:
added:
- South Carolina net capital gain deduction.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
description: Net capital gains included in taxable income are reduced by this rate for South Carolina Income tax.
hua7450 marked this conversation as resolved.
Show resolved Hide resolved
values:
2021-01-01: 0.44
metadata:
unit: /1
hua7450 marked this conversation as resolved.
Show resolved Hide resolved
label: South Carolina Net Capital Gain Rate
hua7450 marked this conversation as resolved.
Show resolved Hide resolved
reference:
- title: SC1040 tax form (2021)
href: https://dor.sc.gov/forms-site/Forms/SC1040_2021.pdf#page=2
- title: Instructions for Form SC-1040 (line 3i)
href: https://dor.sc.gov/forms-site/Forms/IITPacket_2021.pdf#page=15
- title: South Carolina Code of Laws Section 12-6-1150 (A)
href: https://www.scstatehouse.gov/code/t12c006.php
- title: SC1040 tax form (2022)
href: https://dor.sc.gov/forms-site/Forms/SC1040_2022.pdf#page=2
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
- name: Long term capital gains $10000, long term capital loss $3000, short term capital loss $5000
period: 2021
input:
state_code: SC
long_term_capital_gains: 7_000
#long_term_capital_losses: 3_000
hua7450 marked this conversation as resolved.
Show resolved Hide resolved
#short_term_capital_losses: 5_000
short_term_capital_gains: -5_000
output:
sc_net_capital_gains_deduction: 880
# (10000-3000-5000) *0.44 = 880

- name: Long term capital gains $3000, long term capital loss $10000, short term capital loss $5000
period: 2021
input:
state_code: SC
long_term_capital_gains: -7_000
#long_term_capital_losses: 10_000
#short_term_capital_losses: 5_000
short_term_capital_gains: -5_000
output:
sc_net_capital_gains_deduction: 0

- name: Long term capital gains $6000, long term capital loss $3000, short term capital loss $5000
period: 2021
input:
state_code: SC
long_term_capital_gains: 3_000
#long_term_capital_losses: 3_000
#short_term_capital_losses: 5_000
short_term_capital_gains: -5_000
output:
sc_net_capital_gains_deduction: 0
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
from policyengine_us.model_api import *


class sc_net_capital_gains_deduction(Variable):
hua7450 marked this conversation as resolved.
Show resolved Hide resolved
value_type = float
entity = TaxUnit
label = "South Carolina net capital gains deduction"
hua7450 marked this conversation as resolved.
Show resolved Hide resolved
unit = USD
definition_period = YEAR
defined_for = StateCode.SC
reference = (
"https://dor.sc.gov/forms-site/Forms/IITPacket_2021.pdf#page=15"
)

def formula(tax_unit, period, parameters):
p = parameters(
period
).gov.states.sc.tax.income.deductions.net_capital_gains_deduction
sc_net_long_term_capital_gains = max_(
hua7450 marked this conversation as resolved.
Show resolved Hide resolved
0, add(tax_unit, period, ["long_term_capital_gains"])
)
# ltcl = add(tax_unit, period, ["long_term_capital_losses"])
hua7450 marked this conversation as resolved.
Show resolved Hide resolved
# stcl = add(tax_unit, period, ["short_term_capital_losses"])
sc_net_short_term_capital_gains = add(
tax_unit, period, ["short_term_capital_gains"]
)

# SC Net Captial Gain = (ltcg-ltcl)-stcl
# sc_net_long_term_capital_gains = max_(ltcg - ltcl, 0)
# sc_net_capital_gains = max_(sc_net_long_term_capital_gains - stcl, 0)

sc_net_capital_gains = max_(
0, sc_net_long_term_capital_gains + sc_net_short_term_capital_gains
)
return sc_net_capital_gains * p.rate