Pension Fund Asset Allocation Tool

Pension Fund Asset Allocation Tool

No Allocation Data

Complete the input tabs to generate a strategic asset allocation.

${fundName} - ${riskProfile.charAt(0).toUpperCase() + riskProfile.slice(1)} Profile

${chartHtml} `; initialMessage.classList.add('hidden'); resultsContainer.classList.remove('hidden'); pdfButtonContainer.classList.remove('hidden'); }; downloadPdfBtn.addEventListener('click', () => { if (!lastAllocationData) return; const { jsPDF } = window.jspdf; const { fundName, totalAssets, riskProfile, allocation } = lastAllocationData; const doc = new jsPDF({ orientation: 'p', unit: 'pt', format: 'a4' }); const pageW = doc.internal.pageSize.getWidth(); const margin = 50; let y = 0; // PDF Header doc.setFillColor('#1e293b'); // slate-800 doc.rect(0, 0, pageW, 75, 'F'); doc.setFont('helvetica', 'bold'); doc.setFontSize(22); doc.setTextColor('#ffffff'); doc.text('Investment Policy Statement', margin, 48); y = 110; // Fund Details doc.setFontSize(11); doc.setTextColor('#475569'); doc.text(`Fund Name:`, margin, y); doc.setFont('helvetica', 'normal'); doc.setTextColor('#1e293b'); doc.text(fundName, margin + 70, y); doc.setFont('helvetica', 'bold'); doc.setTextColor('#475569'); doc.text(`Total AUM:`, margin, y + 20); doc.setFont('helvetica', 'normal'); doc.setTextColor('#1e293b'); doc.text(`$${totalAssets.toLocaleString()}`, margin + 70, y + 20); doc.setFont('helvetica', 'bold'); doc.setTextColor('#475569'); doc.text(`Risk Profile:`, pageW - margin - 100, y); doc.setFont('helvetica', 'normal'); doc.setTextColor('#1e293b'); doc.text(riskProfile.charAt(0).toUpperCase() + riskProfile.slice(1), pageW - margin, y, { align: 'right' }); y += 50; // Strategic Asset Allocation Section doc.setFont('helvetica', 'bold'); doc.setFontSize(16); doc.setTextColor('#1e293b'); doc.text('Target Asset Allocation', margin, y); y += 25; // Allocation Table const tableBody = Object.entries(allocation).map(([asset, percent]) => { const value = totalAssets * (percent / 100); return [asset, `${percent.toFixed(1)}%`, `$${(value / 1_000_000_000).toFixed(2)}B`]; }); doc.autoTable({ startY: y, head: [['Asset Class', 'Target Weight', 'Target Value']], body: tableBody, theme: 'grid', headStyles: { fillColor: '#334155' }, styles: { font: 'helvetica', fontSize: 10, cellPadding: 8 }, }); y = doc.autoTable.previous.finalY + 40; // Allocation Bar Chart doc.setFont('helvetica', 'bold'); doc.setFontSize(12); doc.setTextColor('#334155'); doc.text('Allocation Visualization', margin, y); y += 20; const chartX = margin + 120; const chartWidth = pageW - margin - chartX; const barHeight = 15; const colors = { "Domestic Equities": "#0ea5e9", "International Equities": "#60a5fa", "Fixed Income": "#64748b", "Real Estate": "#f59e0b", "Alternatives": "#9ca3af" }; for (const [asset, percent] of Object.entries(allocation)) { doc.setFontSize(10); doc.setTextColor('#475569'); doc.text(asset, margin, y + barHeight / 2 + 3); // Background bar doc.setFillColor('#e2e8f0'); doc.rect(chartX, y, chartWidth, barHeight, 'F'); // Data bar const barLength = (percent / 100) * chartWidth; doc.setFillColor(colors[asset]); doc.rect(chartX, y, barLength, barHeight, 'F'); doc.setFontSize(9); doc.setTextColor('#ffffff'); doc.text(`${percent}%`, chartX + 5, y + barHeight / 2 + 3); y += barHeight + 8; } // Footer const date = `Policy Effective Date: ${new Date().toLocaleDateString('en-US')}`; doc.setFontSize(9); doc.setTextColor('#64748b'); doc.text(date, pageW / 2, doc.internal.pageSize.getHeight() - 20, { align: 'center' }); doc.save(`Investment_Policy_${fundName.replace(/\s/g, '_')}.pdf`); }); showTab(0); });
Scroll to Top