US Appendix J APR
Bases: Convention
The US Regulation Z, Appendix J day count convention for Annual Percentage Rate (APR).
Used for closed-end credit transactions (e.g., mortgages) under the Truth in Lending Act. Defined in Appendix J, Paragraph (b)(3), treating months as equal and using specific denominators for odd days. Computes whole periods (e.g., months) and fractional adjustments for odd days using the discount formula:
d = a / ((1 + f * i / p) * (1 + i / p)^t)
Where
t: Number of whole periods (e.g., months, years), stored asprimary_period_fraction.f: Fractional period for odd days (e.g., 5/30 for 5 days in a 30-day month), stored aspartial_period_fraction.p: Number of periods in a year (e.g., 12 for monthly, 365 for daily), included indiscount_terms_log.
Denominators for odd days
- Year: 365
- Half-year: 180
- Quarter: 90
- Month:
- Fortnight: 15
- Week: 7
- Daily periods: actual days / 365
Aligns days or month-ends for whole period counts.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
time_period
|
DayCountTimePeriod
|
Interval for calculation (year, half-year, quarter, month, fortnight, week, day). Defaults to month. |
MONTH
|
Source code in curo/daycount/us_appendix_j.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
compute_factor(start, end)
Computes the day count factor between two dates using the US Appendix J convention.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
Timestamp
|
Initial drawdown date. |
required |
end
|
Timestamp
|
Cash flow post date. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
DayCountFactor |
DayCountFactor
|
Factor with |
Raises:
| Type | Description |
|---|---|
ValueError
|
If end is before start or unsupported time period. |
Source code in curo/daycount/us_appendix_j.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |