Inflation Hedge Potential of Real Estate Analyzer (Conceptual Simulator)

Property & Financial Baseline

$

Annual Income & Expenses (Current Year 0 / Start of Year 1)

$
%
$

Financing Details (Optional)

$
%
Must be less than or equal to Original Loan Term.

Inflation Scenario & Sensitivity Assumptions

%

Inflation Sensitivity (How components grow relative to CPI)

Enter factor for how much each component grows compared to CPI (e.g., 100 = grows with CPI, 120 = outpaces CPI by 20% of CPI rate, 80 = lags CPI by 20% of CPI rate).

% of CPI
% of CPI
% of CPI

Inflation Impact Projections

Projection summary will appear here.

Nominal vs. Real Value Chart will appear here.

Year-by-Year Projection Details:

Projection table will appear here.

Chart will appear here.

'; tableContainer.innerHTML = '

Projection table will appear here.

'; return; } const projections = ihprea_results.projections; const inputs = ihprea_results.inputs; const baselineYear = projections[0]; // Year 0 (current) const lastYear = projections[projections.length - 1]; // End of last projected year let summaryHTML = `

Projection Summary (Over ${inputs.projectionPeriod} Years, End of Period Values)

`; summaryHTML += `
Initial Real NOI (Baseline): ${ihprea_formatCurrency(baselineYear.realNOI)}
`; summaryHTML += `
End Real NOI (Year ${lastYear.year+1}): ${ihprea_formatCurrency(lastYear.realNOI)}
`; summaryHTML += `
Initial Real Cash Flow (Baseline): ${ihprea_formatCurrency(baselineYear.realCashFlow)}
`; summaryHTML += `
End Real Cash Flow (Year ${lastYear.year+1}): ${ihprea_formatCurrency(lastYear.realCashFlow)}
`; summaryHTML += `
Initial Real Property Value (Baseline): ${ihprea_formatCurrency(baselineYear.realValue)}
`; summaryHTML += `
End Real Property Value (Year ${lastYear.year+1}): ${ihprea_formatCurrency(lastYear.realValue)}
`; summaryHTML += `
Initial Real Net Equity (Baseline): ${ihprea_formatCurrency(baselineYear.realEquity)}
`; summaryHTML += `
End Real Net Equity (Year ${lastYear.year+1}): ${ihprea_formatCurrency(lastYear.realEquity)}
`; const realValueGrowth = lastYear.realValue > baselineYear.realValue; const realCashFlowPositiveAtEnd = lastYear.realCashFlow > 0; let hedgeAssessment = "Mixed"; if (realValueGrowth && realCashFlowPositiveAtEnd) hedgeAssessment = "Potentially Good Inflation Hedge"; else if (!realValueGrowth && lastYear.realCashFlow < 0) hedgeAssessment = "Potentially Poor Inflation Hedge"; else if (realValueGrowth) hedgeAssessment = "Value Hedge, Cash Flow Pressured"; else if (realCashFlowPositiveAtEnd && lastYear.realCashFlow > baselineYear.realCashFlow) hedgeAssessment = "Cash Flow Hedge, Value Lagging"; summaryHTML += `
Overall Hedge Assessment: ${hedgeAssessment}
`; summaryDiv.innerHTML = summaryHTML; // Chart const svgWidth = Math.min(800, (ihprea_getEl('ihpreaContainer_main').offsetWidth || 400) - 60); const svgHeight = 280; const m = {top: 20, right: 30, bottom: 40, left: 70}; const w = svgWidth - m.left - m.right; const h = svgHeight - m.top - m.bottom; const allYValuesChart = projections.flatMap(p => [p.nominalValue, p.realValue, p.loanBalance]); const yMinChart = Math.min(0, ...allYValuesChart.filter(v=>!isNaN(v))); const yMaxChart = Math.max(...allYValuesChart.filter(v=>!isNaN(v))); const xMaxChart = projections.length -1; // Years from 0 to N-1 const xScaleChart = x => (x / (xMaxChart === 0 ? 1 : xMaxChart)) * w; const yScaleChart = y => h - ((y - yMinChart) / (yMaxChart - yMinChart === 0 ? 1 : yMaxChart - yMinChart)) * h; let nominalValuePath = "M" + projections.map((p,i) => `${xScaleChart(i).toFixed(2)},${yScaleChart(p.nominalValue).toFixed(2)}`).join(" L"); let realValuePath = "M" + projections.map((p,i) => `${xScaleChart(i).toFixed(2)},${yScaleChart(p.realValue).toFixed(2)}`).join(" L"); let loanBalancePath = inputs.useFinancing ? "M" + projections.map((p,i) => `${xScaleChart(i).toFixed(2)},${yScaleChart(p.loanBalance).toFixed(2)}`).join(" L") : ""; chartContainer.innerHTML = ` {/* X-axis */} {/* Y-axis */} Year (0 = Baseline, ${xMaxChart+1} = End of Year ${xMaxChart+1}) Value ($) ${ihprea_formatCurrency(yMaxChart,0)} ${ihprea_formatCurrency(yMinChart,0)} ${inputs.useFinancing ? `` : ''} Nominal Value Real Value ${inputs.useFinancing ? ` Loan Balance` : ''} `; // Table let tableHTML = `${inputs.useFinancing ? '' : ''}`; projections.forEach(p => { // p.year is 0-indexed for calculation, display as Year p.year + 1 tableHTML += ` ${inputs.useFinancing ? `` : ''} `; }); tableHTML += `
YearNominal Values ($)|Real Values ($) (Inflation-Adjusted)
Gross RentOp. Ex.NOIDebt Svc.Princ. PaidInt. PaidLoan Bal.Cash FlowProp. ValueNet Equity|NOICash FlowProp. ValueNet Equity
${p.year === 0 ? 'Baseline (Yr0)' : p.year} ${ihprea_formatCurrency(p.nominalGrossRent)} ${ihprea_formatCurrency(p.nominalOpEx)} ${ihprea_formatCurrency(p.nominalNOI)}${ihprea_formatCurrency(p.nominalDebtService)}${ihprea_formatCurrency(p.principalPaid)}${ihprea_formatCurrency(p.interestPaid)}${ihprea_formatCurrency(p.loanBalance)}${ihprea_formatCurrency(p.nominalCashFlow)} ${ihprea_formatCurrency(p.nominalValue)} ${ihprea_formatCurrency(p.nominalEquity)} | ${ihprea_formatCurrency(p.realNOI)} ${ihprea_formatCurrency(p.realCashFlow)} ${ihprea_formatCurrency(p.realValue)} ${ihprea_formatCurrency(p.realEquity)}
`; tableContainer.innerHTML = tableHTML; const pdfBtn = document.getElementById('ihprea_downloadPdfButton'); if(pdfBtn) pdfBtn.style.display = 'block'; } // --- PDF Generation --- function ihprea_downloadPDF() { if (!ihprea_results) { alert("Please calculate projections first."); return; } if (typeof window.jspdf === 'undefined' || typeof window.jspdf.jsPDF === 'undefined') { alert('Core PDF library (jsPDF) is not loaded.'); console.error('jsPDF library not found.'); return; } const { jsPDF: JSPDF } = window.jspdf; const doc = new JSPDF('landscape'); // Use landscape for wider tables if (typeof doc.autoTable !== 'function') { alert('PDF Table plugin (jsPDF-AutoTable) not loaded. Tables in PDF may be missing.'); console.error('doc.autoTable is not a function.'); } let y = 15; const m = 10; const inputs = ihprea_results.inputs; const projections = ihprea_results.projections; doc.setFontSize(16); doc.text("Real Estate Inflation Hedge Analysis", m, y); y += 8; doc.setFontSize(10); doc.text(`Property Type: ${inputs.propertyType} | Report Date: ${new Date().toLocaleDateString()}`, m, y); y += 6; doc.setFontSize(11); doc.text("Baseline & Assumptions Summary:", m, y); y += 5; doc.setFontSize(8); let inputData = [ ["Current Market Value:", ihprea_formatCurrency(inputs.currentMarketValue), "Avg. Annual Inflation (CPI):", ihprea_formatPercent(inputs.avgAnnualInflation)], ["Initial Gross Rent (Ann.):", ihprea_formatCurrency(inputs.initialAnnualGrossRent), "Rent Growth vs CPI:", ihprea_formatPercent(inputs.rentSensitivity)], ["Initial OpEx (Ann.):", ihprea_formatCurrency(inputs.initialAnnualOpEx), "OpEx Growth vs CPI:", ihprea_formatPercent(inputs.opExSensitivity)], ["Initial NOI (Ann.):", ihprea_formatCurrency(inputs.initialNOI), "Value Growth vs CPI:", ihprea_formatPercent(inputs.valueSensitivity)], ["Projection Period:", `${inputs.projectionPeriod} years`, "", ""], ]; if (inputs.useFinancing) { inputData.push(["Financing:", "Yes", "Loan Amount:", ihprea_formatCurrency(inputs.originalLoanAmount)]); inputData.push(["Interest Rate:", ihprea_formatPercent(inputs.fixedInterestRate), "Term (Orig./Rem.):", `${inputs.loanTermYears} / ${inputs.loanRemainingTermYears} yrs`]); inputData.push(["Annual Debt Service (P&I):", ihprea_formatCurrency(inputs.annualDebtService), "", ""]); } else { inputData.push(["Financing:", "No", "", ""]); } if (typeof doc.autoTable === 'function') { doc.autoTable({ startY: y, body: inputData, theme: 'plain', styles: {fontSize: 7.5, cellPadding: 0.8}, columnStyles: {0:{fontStyle:'bold'}, 2:{fontStyle:'bold'}}}); y = doc.lastAutoTable.finalY + 5; } else { inputData.forEach(row => {doc.text(`${row[0]} ${row[1]} | ${row[2]} ${row[3]}`,m,y); y+=3.5;}); y+=2;} doc.setFontSize(11); doc.text(`Year-by-Year Projections (${inputs.projectionPeriod} Years):`, m, y); y+=2; let head = [['Yr', 'Nom.Rent', 'Nom.OpEx', 'Nom.NOI']]; if (inputs.useFinancing) head[0].push('Nom.Debt', 'Nom.LoanBal'); head[0].push('Nom.CF', 'Nom.Value', 'Nom.Equity', '|', 'Real.NOI', 'Real.CF', 'Real.Value', 'Real.Equity'); let body = projections.map(p => { let row = [p.year === 0 ? 'Base' : p.year, p.nominalGrossRent.toFixed(0), p.nominalOpEx.toFixed(0), p.nominalNOI.toFixed(0)]; if (inputs.useFinancing) row.push(p.nominalDebtService.toFixed(0), p.loanBalance.toFixed(0)); row.push(p.nominalCashFlow.toFixed(0), p.nominalValue.toFixed(0), p.nominalEquity.toFixed(0), '|', p.realNOI.toFixed(0), p.realCashFlow.toFixed(0), p.realValue.toFixed(0), p.realEquity.toFixed(0) ); return row; }); if (typeof doc.autoTable === 'function') { doc.autoTable({ startY: y, head: head, body: body, theme: 'grid', headStyles: { fillColor: [46, 125, 50], textColor: 255, fontSize: 6.5, cellPadding: 1, halign:'center' }, styles: { fontSize: 6, cellPadding: 1, halign: 'right', overflow: 'linebreak' }, columnStyles: { 0: { halign: 'center', fontStyle: 'bold', cellWidth: 7 }, 8: {cellWidth:1.5, halign:'center',valign:'middle'} } }); y = doc.lastAutoTable.finalY + 5; } else { doc.setFontSize(6); head[0].forEach((h,idx) => doc.text(h, m + idx*12, y)); y+=2; body.forEach(row => { row.forEach((cell, idx) => doc.text(String(cell), m + idx*12, y)); y+=2.5; if(y>190){doc.addPage(); y=m;} }); y+=2; } doc.setFontSize(10); doc.text("Summary of Real Value Changes (End of Period vs. Initial Baseline):", m, y); y+=4; const baselineProj = projections[0]; const lastYearProj = projections[projections.length - 1]; let summaryData = [ ["Metric", "Initial Real (Baseline)", "End Real (Yr " + (lastYearProj.year === 0 ? 1 : lastYearProj.year+1) + ")", "% Change Real"], ["Net Operating Income", ihprea_formatCurrency(baselineProj.realNOI), ihprea_formatCurrency(lastYearProj.realNOI), ihprea_formatPercent(baselineProj.realNOI !== 0 ? ((lastYearProj.realNOI - baselineProj.realNOI) / baselineProj.realNOI * 100) : (lastYearProj.realNOI > 0 ? Infinity : 0))], ["Pre-Tax Cash Flow", ihprea_formatCurrency(baselineProj.realCashFlow), ihprea_formatCurrency(lastYearProj.realCashFlow), ihprea_formatPercent(baselineProj.realCashFlow !== 0 && isFinite(baselineProj.realCashFlow) ? ((lastYearProj.realCashFlow - baselineProj.realCashFlow) / Math.abs(baselineProj.realCashFlow) * 100) : (lastYearProj.realCashFlow > 0 ? Infinity : (lastYearProj.realCashFlow < 0 ? -Infinity : 0) ))], ["Property Value", ihprea_formatCurrency(baselineProj.realValue), ihprea_formatCurrency(lastYearProj.realValue), ihprea_formatPercent(baselineProj.realValue !== 0 ? ((lastYearProj.realValue - baselineProj.realValue) / baselineProj.realValue * 100) : (lastYearProj.realValue > 0 ? Infinity : 0))], ["Net Equity", ihprea_formatCurrency(baselineProj.realEquity), ihprea_formatCurrency(lastYearProj.realEquity), ihprea_formatPercent(baselineProj.realEquity !== 0 && isFinite(baselineProj.realEquity) ? ((lastYearProj.realEquity - baselineProj.realEquity) / Math.abs(baselineProj.realEquity) * 100) : (lastYearProj.realEquity > 0 ? Infinity : (lastYearProj.realEquity < 0 ? -Infinity : 0) ))], ]; if (typeof doc.autoTable === 'function') { doc.autoTable({startY: y, head: [summaryData[0]], body: summaryData.slice(1), theme:'striped', styles:{fontSize:8}}); y = doc.lastAutoTable.finalY + 5; } else { summaryData.forEach(row => {doc.text(row.join(' | '), m, y); y+=3.5;}); y+=2;} doc.setFontSize(7); doc.text("Disclaimer: This is a conceptual simulator based on user-defined assumptions for informational purposes. Not financial advice.", m, y); doc.save(`InflationHedge_RealEstate_${inputs.propertyType.replace(/\s+/g, '_')}.pdf`); }
Scroll to Top