openavmkit.income
calculate_cap_rate_growth
calculate_cap_rate_growth(sale_price_growth, noi_growth)
Calculate the capitalization rate given the annual percentage changes in sale price ($/sqft) and net operating income (NOI).
Given NOI = Sale Price * Cap Rate
, the cap rate is NOI / Sale Price
.
Approximating the percentage change (assuming small changes):
ΔCap Rate ≈ ΔNOI - ΔSale Price.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sale_price_growth
|
ndarray
|
Annual percentage changes in sale price as decimals. (Example: [0.01, 0.01, 0.015, 0.02, 0.01] for 1%, 1%, 1.5%, 2%, 1%) |
required |
noi_growth
|
ndarray
|
Annual percentage changes in NOI as decimals. (Example: [0.01, 0.005, 0.0, -0.0025, 0.01]) |
required |
Returns:
Type | Description |
---|---|
np.ndarray :
|
Capitalization rate as decimals |
Source code in openavmkit/income.py
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
|
calculate_noi
calculate_noi(price, cap_rate)
Calculate the Net Operating Income (NOI) given a property price and cap rate.
Source code in openavmkit/income.py
6 7 8 |
|
calculate_noi_growth
calculate_noi_growth(sale_price_growth, cap_rate_growth)
Calculate the annual percentage change in NOI given the annual percentage changes in sale price ($/sqft) and cap rate.
Given NOI = Sale Price * Cap Rate
, the compounded growth in NOI is:
(1 + ΔSale Price) * (1 + ΔCap Rate) - 1
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
sale_price_growth
|
ndarray
|
Annual percentage changes in sale price as decimals. (Example: [0.01, 0.01, 0.015, 0.02, 0.01] for 1%, 1%, 1.5%, 2%, 1%) |
required |
cap_rate_growth
|
ndarray
|
Annual percentage changes in cap rate as decimals. (Example: [0.01, 0.005, 0.0, -0.0025, 0.01]) |
required |
Returns:
Type | Description |
---|---|
np.ndarray :
|
Annual percentage changes in NOI as decimals. |
Source code in openavmkit/income.py
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
|
derive_irr
derive_irr(entry_price, exit_price, entry_cap_rate, noi_growth, holding_period)
Calculate the implied IRR given:
- entry_price: Purchase price of the property.
- exit_price: Observed sale price (terminal cash flow) at the end of the holding period.
- entry_cap_rate: Entry cap rate (used to derive the initial NOI).
- noi_growth: Annual growth rate of NOI (decimal form, e.g., 0.03 for 3%).
- holding_period: Holding period in years.
The model assumes:
- NOI₀ = entry_price * entry_cap_rate
- IRRM = (1+IRR)
- NOIM = (1+noi_growth)
And the DCF equation:
NPV = ∑ₜ₌₁ᴴ [NOI₀ * (1 + noi_growth)ᵗ / (1 + IRR)ᵗ] + [sale_price / (1 + IRR)ᴴ] - entry_price = 0
NPV = ∑ₜ₌₁ᴴ [NOI₀ * NOIMᵗ/IRRMᵗ] + [exit_price/IRRMᴴ] - entry_price = 0
Parameters:
Name | Type | Description | Default |
---|---|---|---|
entry_price
|
float
|
The purchase price of the property. |
required |
exit_price
|
float
|
The observed sale price at the end of the holding period. |
required |
entry_cap_rate
|
float
|
The entry cap rate as a decimal (e.g., 0.06 for 6%). |
required |
noi_growth
|
float
|
The expected annual growth rate of NOI as a decimal (e.g., 0.03 for 3%). |
required |
holding_period
|
int
|
The holding period in years. |
required |
Returns:
Type | Description |
---|---|
The IRR (as a decimal).
|
|
Source code in openavmkit/income.py
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 |
|
derive_irr_df
derive_irr_df(df, hist_cap_rates, hist_noi_growths)
Given a DataFrame of paired sales with columns:
- "key"
- "entry_price"
- "exit_price"
- "entry_date"
- "exit_date"
And historical dictionaries:
- "hist_cap_rates" : {year -> entry cap rate}
- "hist_noi_growths" : {year -> NOI growth rate}
This function computes for each row:
- holding_period (in years, float)
- entry_year (from entry_date)
- implied_IRR (using the DCF method)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
df
|
DataFrame
|
A DataFrame of paired sales containing the columns ["key", "entry_price", "exit_price", "entry_date", "exit_date"] |
required |
hist_cap_rates
|
dict
|
A Dictionary whose keys are years and whose values are entry cap rates |
required |
hist_noi_growths
|
dict
|
A Dictionary whose keys are years and whose values are NOI growth rates |
required |
Returns:
Type | Description |
---|---|
pd.DataFrame:
|
A new DataFrame that includes the original columns plus these computed fields. |
Source code in openavmkit/income.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
|
derive_prices
derive_prices(target_irr, exit_cap_rate, entry_noi, noi_growth, holding_period)
Calculate the entry and exit prices based on a DCF model given:
- target_irr: The target internal rate of return (IRR) (e.g., 0.10 for 10%)
- exit_cap_rate: The exit cap rate used to value the property at sale (e.g., 0.06 for 6%)
- entry_noi: NOI at purchase (NOI₀)
- noi_growth: Expected annual NOI growth rate (g) (e.g., 0.03 for 3%)
- holding_period: Holding period in years (H)
The model assumes:
- Annual NOI cash flows:
NOI₀ * (1 + noi_growth) ** t
fort = 1, …, H
. -
At exit, the property is sold at:
Sale Price =
NOI₀ * (1 + noi_growth) ** (H + 1)
/exit_cap_rate
-
That sale price is discounted back to time 0.
The DCF equation is:
Asking Price = Σₜ₌₁ᴴ [ NOI₀ * (1 + noi_growth)^t / (1 + target_irr)^t ]
+ [ NOI₀ * (1 + noi_growth)^(H + 1) / exit_cap_rate ]
/ (1 + target_irr)^H
Parameters:
Name | Type | Description | Default |
---|---|---|---|
target_irr
|
float
|
The target internal rate of return (IRR) as a decimal (e.g., 0.10 for 10%). |
required |
exit_cap_rate
|
float
|
The exit cap rate as a decimal (e.g., 0.06 for 6%). |
required |
entry_noi
|
float
|
The net operating income (NOI) at the time of purchase. |
required |
noi_growth
|
float
|
The expected annual growth rate of NOI as a decimal (e.g., 0.03 for 3%). |
required |
holding_period
|
int
|
The holding period in years. |
required |
Returns:
Type | Description |
---|---|
tuple[float, float]
|
The entry and exit prices |
Source code in openavmkit/income.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 |
|