Quantitative Easing (QE) Effect Predictor

Quantitative Easing (QE) Effect Predictor

Enter QE Program Details & Current Economic Snapshot

QE Program

Current Economy

Predicted Economic Effects

The following predictions are illustrative and based on a simplified economic model. Actual outcomes can vary significantly due to complex real-world factors.

Summary of Inputs

Estimated Impacts

Economic Indicator Current Value Est. Change (pp) Predicted Value

QE Amount: $${qeAmount.toLocaleString()} Billion

QE Duration: ${qeDuration} Months

Economy's Annual GDP: $${currentGDP.toLocaleString()} Trillion

Initial Inflation: ${inflationRate.toFixed(2)}%

Initial Unemployment: ${unemploymentRate.toFixed(2)}%

Initial GDP Growth: ${gdpGrowthRate.toFixed(2)}%

Initial Bond Yield: ${bondYield.toFixed(2)}%

`; // Enable and switch to results tab resultsTabButtonEl.disabled = false; const resultsTabBtn = document.querySelector('.tab-button[onclick*="tabResults"]'); // More robust selection if (resultsTabBtn) { // Simulate a click on the results tab button to change tab const mockEvent = { currentTarget: resultsTabBtn }; changeTab(mockEvent, 'tabResults'); } else { console.error("Could not find results tab button to click."); } } function goBackToInputs() { const inputsTabBtn = document.querySelector('.tab-button[onclick*="tabInputs"]'); if (inputsTabBtn) { const mockEvent = { currentTarget: inputsTabBtn }; changeTab(mockEvent, 'tabInputs'); } else { console.error("Could not find inputs tab button to click."); } } function downloadResultsPDF() { if (!currentInputs || !currentInputs.results) { alert("Please calculate effects first before downloading PDF."); return; } const doc = new jsPDF(); // Tool Title doc.setFontSize(18); doc.setTextColor(59, 130, 246); // Blue-500 doc.text("Quantitative Easing (QE) Effect Predictor", doc.internal.pageSize.getWidth() / 2, 20, { align: 'center' }); doc.setFontSize(10); doc.setTextColor(107, 114, 128); // Gray-500 const disclaimer = "Predictions are illustrative and based on a simplified model. Actual outcomes can vary."; const disclaimerWidth = doc.getTextWidth(disclaimer); doc.text(disclaimer, (doc.internal.pageSize.getWidth() - disclaimerWidth) / 2, 28); // Input Summary Section doc.setFontSize(14); doc.setTextColor(37, 99, 235); // Blue-600 doc.text("Summary of Inputs", 14, 40); const inputData = [ ["QE Amount:", `$${currentInputs.qeAmount.toLocaleString()} Billion`], ["QE Duration:", `${currentInputs.qeDuration} Months`], ["Economy's Annual GDP:", `$${currentInputs.currentGDP.toLocaleString()} Trillion`], ["Initial Inflation Rate:", `${currentInputs.inflationRate.toFixed(2)}%`], ["Initial Unemployment Rate:", `${currentInputs.unemploymentRate.toFixed(2)}%`], ["Initial GDP Growth Rate:", `${currentInputs.gdpGrowthRate.toFixed(2)}%`], ["Initial 10-yr Gov. Bond Yield:", `${currentInputs.bondYield.toFixed(2)}%`], ]; doc.autoTable({ startY: 45, head: [['Parameter', 'Value']], body: inputData, theme: 'striped', // 'striped', 'grid', 'plain' headStyles: { fillColor: [59, 130, 246] }, // Blue-500 styles: { fontSize: 10, cellPadding: 2 }, columnStyles: { 0: { fontStyle: 'bold' } } }); // Predicted Effects Section let finalY = doc.lastAutoTable.finalY || 45; // Get Y pos after first table doc.setFontSize(14); doc.setTextColor(37, 99, 235); // Blue-600 doc.text("Estimated Impacts", 14, finalY + 15); const results = currentInputs.results; const tableData = [ ["Inflation Rate", `${results.inflation.current.toFixed(2)}%`, `${results.inflation.change.toFixed(2)} pp`, `${results.inflation.predicted.toFixed(2)}%`], ["Unemployment Rate", `${results.unemployment.current.toFixed(2)}%`, `${results.unemployment.change.toFixed(2)} pp`, `${results.unemployment.predicted.toFixed(2)}%`], ["GDP Growth Rate", `${results.gdpGrowth.current.toFixed(2)}%`, `${results.gdpGrowth.change.toFixed(2)} pp`, `${results.gdpGrowth.predicted.toFixed(2)}%`], ["10-yr Gov. Bond Yield", `${results.bondYield.current.toFixed(2)}%`, `${results.bondYield.change.toFixed(2)} pp`, `${results.bondYield.predicted.toFixed(2)}%`], ]; doc.autoTable({ startY: finalY + 20, head: [['Economic Indicator', 'Current Value', 'Est. Change (pp)', 'Predicted Value']], body: tableData, theme: 'striped', headStyles: { fillColor: [59, 130, 246] }, // Blue-500 styles: { fontSize: 10, cellPadding: 2 }, didParseCell: function (data) { // Color coding for change values if (data.column.index === 2 && data.cell.section === 'body') { const value = parseFloat(data.cell.raw.toString().replace(' pp','')); if (data.row.index === 0 || data.row.index === 2) { // Inflation, GDP Growth (positive change good for GDP, bad for inflation if too high) data.cell.styles.textColor = value >= 0 ? (data.row.index === 0 ? [220, 38, 38] : [22,163,74]) : (data.row.index === 0 ? [22,163,74] : [220,38,38]); // Red for increase in inflation, Green for increase in GDP } else { // Unemployment, Bond Yield (negative change generally good) data.cell.styles.textColor = value < 0 ? [22, 163, 74] : [220, 38, 38]; // Green for decrease } } } }); // Footer with generation date finalY = doc.lastAutoTable.finalY || finalY + 20; doc.setFontSize(8); doc.setTextColor(156, 163, 175); // Gray-400 const generationDate = `Generated on: ${new Date().toLocaleDateString()} ${new Date().toLocaleTimeString()}`; const pageWidth = doc.internal.pageSize.getWidth(); doc.text(generationDate, pageWidth - 14, doc.internal.pageSize.getHeight() - 10, { align: 'right' }); doc.save('QE_Effect_Predictions.pdf'); }
Scroll to Top