Inflation-Protected Strategy Generator

Inflation-Protected Investment Strategy Generator

Inflation-Adjusted Portfolio Value After ${years} Years: $${adjustedFV.toFixed(2)}

`; const ctx = document.getElementById('chart').getContext('2d'); if (window.portfolioChart) window.portfolioChart.destroy(); window.portfolioChart = new Chart(ctx, { type: 'doughnut', data: { labels: Object.keys(weights), datasets: [{ data: Object.values(weights), backgroundColor: ['#4caf50', '#2196f3', '#ff9800', '#9c27b0', '#f44336'] }] }, options: { responsive: true, plugins: { legend: { position: 'bottom' } } } }); } async function downloadPDF() { const { jsPDF } = window.jspdf; const doc = new jsPDF(); doc.setFontSize(14); doc.text('Inflation-Protected Investment Strategy', 20, 20); const result = document.getElementById('result').innerText; const lines = doc.splitTextToSize(result, 180); doc.text(lines, 20, 40); doc.save('investment_strategy.pdf'); } function printStrategy() { const printWindow = window.open('', '', 'height=800,width=1000'); printWindow.document.write('Print Strategy'); printWindow.document.write(''); printWindow.document.write(''); printWindow.document.write(document.getElementById('result').innerHTML); printWindow.document.write(''); printWindow.document.close(); printWindow.focus(); printWindow.print(); printWindow.close(); }
Scroll to Top