{"name":"Dre1mery underwriting accuracy: golden-answer results","url":"https://www.dre1mery.com/underwriting-accuracy","note":"These cases are regression locks for the Dre1mery underwriting engine. Each expected value is computed by hand from the inputs shown. CI runs every case against the engine on each change; a failure means the engine is producing a wrong answer, not a rounding difference. Percentages are decimals (0.08 = 8 percent). Tolerance is 1e-6 unless stated.","sourceTest":"tests/underwrite/golden/knownAccuracyBugs.test.js","percentConvention":"decimal","caseCount":8,"cases":[{"id":"expenses-management-8pct","category":"Operating expenses","title":"8 percent management on $2,500 of income","fn":"calculateVariableExpenses","inputs":{"monthlyIncome":2500,"ops":{"management":0.08}},"expected":{"monthlyVariableExpenses":200},"workings":"2,500 x 0.08 = 200 (not 2, which is the double-divided value)."},{"id":"expenses-variable-stack","category":"Operating expenses","title":"Management 8 + maintenance 5 + capEx 5 percent on $2,000 rent, all cash","fn":"calculateBasicMetrics","inputs":{"propertyType":"Single Family","operationType":"Buy & Hold","offerType":"Cash","purchasePrice":200000,"monthlyRent":2000,"fixedMonthlyExpenses":{"taxes":200,"insurance":100},"debtService":0,"vacancy":0,"ops":{"management":0.08,"maintenance":0.05,"capEx":0.05}},"expected":{"monthlyVariableOps":360,"monthlyCashFlow":1340},"workings":"Variable: 2,000 x (0.08 + 0.05 + 0.05) = 360. Cash flow: 2,000 - 300 fixed - 360 = 1,340."},{"id":"expenses-at-a-glance-pct","category":"Operating expenses","title":"At-a-Glance variable ops percentage","fn":"computeVariableMonthlyOpsPct","inputs":{"ops":{"management":0.08,"maintenance":0.05,"utilitiesPct":0.02,"capEx":0.05,"opEx":0.01}},"expected":{"variableOpsPct":0.21},"tolerance":1e-10,"workings":"0.08 + 0.05 + 0.02 + 0.05 + 0.01 = 0.21. Decimals are summed, not divided by 100 again."},{"id":"str-break-even","category":"STR break-even","title":"Short-term rental break-even occupancy and ADR","fn":"calculateBreakEvenAnalysisSTR","inputs":{"adr":200,"avgNightsPerMonth":15,"fixedMonthly":{"taxes":150},"ops":{"management":0.1,"maintenance":0.05,"capEx":0.05}},"expected":{"breakEvenOccupancy":0.03125,"breakEvenADR":6.25},"workings":"Fixed 150/mo = 5/day. Variable 20 percent of 200 ADR = 40/night. Occupancy = 5 / (200 - 40) = 0.03125. ADR at full occupancy = 5 / (1 - 0.20) = 6.25."},{"id":"vacancy-5pct","category":"Vacancy","title":"5 percent vacancy on $2,000 gross rent, all cash","fn":"calculateBasicMetrics","inputs":{"propertyType":"Single Family","operationType":"Buy & Hold","offerType":"Cash","purchasePrice":200000,"monthlyRent":2000,"fixedMonthlyExpenses":{"taxes":200,"insurance":100},"debtService":0,"vacancy":0.05,"ops":{}},"expected":{"grossPotentialIncome":2000,"monthlyIncome":1900,"vacancyLoss":100,"monthlyCashFlow":1600,"annualCashFlow":19200},"workings":"Vacancy loss 2,000 x 0.05 = 100. EGI 1,900. Cash flow 1,900 - 300 = 1,600/mo, 19,200/yr."},{"id":"vacancy-then-variable","category":"Vacancy","title":"Variable expenses charged on post-vacancy income","fn":"calculateBasicMetrics","inputs":{"propertyType":"Single Family","operationType":"Buy & Hold","offerType":"Cash","purchasePrice":200000,"monthlyRent":2000,"fixedMonthlyExpenses":{"taxes":200,"insurance":100},"debtService":0,"vacancy":0.05,"ops":{"management":0.1}},"expected":{"monthlyVariableOps":190,"monthlyCashFlow":1410},"workings":"EGI 1,900 x 0.10 = 190. Cash flow 1,900 - 300 - 190 = 1,410."},{"id":"irr-par-bond-5yr","category":"IRR period","title":"Buy 1,000, receive 100/yr for 5 years, sell for 1,000 at year 5","fn":"calculateIRR","inputs":{"initialInvestment":-1000,"cashFlows":[100,100,100,100,100],"saleProceeds":1000},"expected":{"irr":0.1},"tolerance":0.0001,"workings":"Par bond identity: a 10 percent coupon redeemed at par yields exactly 10 percent. Discounting the sale one period late gave 8.66 percent."},{"id":"irr-two-year-hold","category":"IRR period","title":"Buy 1,000, no interim cash flow, sell for 1,210 after 2 years","fn":"calculateIRR","inputs":{"initialInvestment":-1000,"cashFlows":[0,0],"saleProceeds":1210},"expected":{"irr":0.1},"tolerance":0.0001,"workings":"1,000 x 1.1^2 = 1,210, so IRR = 10 percent."}]}