Example output
I'll help analyze this conservative retiree portfolio following the provided framework.
```tsx
import React from 'react';
import { Card, CardHeader, CardTitle, CardContent } from '@/components/ui/card';
import { PieChart, Pie, Cell, ResponsiveContainer, LineChart, Line, XAxis, YAxis, Tooltip, Legend, BarChart, Bar } from 'recharts';
import { Alert, AlertDescription } from '@/components/ui/alert';
import { Shield, AlertTriangle, TrendingUp } from 'lucide-react';
const PortfolioAnalysis = () => {
const currentAllocation = [
{ name: 'US Large Cap ETF', value: 40, color: '#4299e1' },
{ name: 'US Government Bonds', value: 40, color: '#48bb78' },
{ name: 'Corporate Bonds', value: 15, color: '#ed8936' },
{ name: 'Cash', value: 5, color: '#a0aec0' }
];
const targetAllocation = [
{ name: 'Equities', current: 40, target: 35, deviation: 5 },
{ name: 'Gov Bonds', current: 40, target: 45, deviation: -5 },
{ name: 'Corp Bonds', current: 15, target: 15, deviation: 0 },
{ name: 'Cash', current: 5, target: 5, deviation: 0 }
];
const riskMetrics = [
{ name: 'Portfolio Beta', value: 0.45 },
{ name: 'Volatility', value: '6.8%' },
{ name: 'Sharpe Ratio', value: 1.2 },
{ name: 'Max Drawdown', value: '-12%' }
];
return (
<div className="space-y-6">
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
<Card>
<CardHeader>
<CardTitle className="flex items-center gap-2">
<Shield className="w-5 h-5" />
Executive Summary
</CardTitle>
</CardHeader>
<CardContent>
<div className="space-y-4">
<Alert>
<AlertTriangle className="w-4 h-4" />
<AlertDescription>
Risk Score: 3.5/10 (Conservative)
</AlertDescription>
</Alert>
<ul className="space-y-2">
<li className="flex items-center gap-2">
<TrendingUp className="w-4 h-4" />
Slight equity overweight (+5%)
</li>
<li className="flex items-center gap-2">
<AlertTriangle className="w-4 h-4" />
Bond duration risk exposure
</li>
<li className="flex items-center gap-2">
<Shield className="w-4 h-4" />
Strong liquidity position
</li>
</ul>
</div>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Current Allocation</CardTitle>
</CardHeader>
<CardContent className="h-64">
<ResponsiveContainer width="100%" height="100%">
<PieChart>
<Pie
data={currentAllocation}
dataKey="value"
nameKey="name"
cx="50%"
cy="50%"
innerRadius={60}
outerRadius={80}
label
>
{currentAllocation.map((entry, index) => (
<Cell key={`cell-${index}`} fill={entry.color} />
))}
</Pie>
<Tooltip />
<Legend />
</PieChart>
</ResponsiveContainer>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Allocation vs Target</CardTitle>
</CardHeader>
<CardContent className="h-64">
<ResponsiveContainer width="100%" height="100%">
<BarChart data={targetAllocation}>
<XAxis dataKey="name" />
<YAxis />
<Tooltip />
<Legend />
<Bar dataKey="current" fill="#4299e1" name="Current" />
<Bar dataKey="target" fill="#48bb78" name="Target" />
</BarChart>
</ResponsiveContainer>
</CardContent>
</Card>
<Card>
<CardHeader>
<CardTitle>Risk Metrics</CardTitle>
</CardHeader>
<CardContent>
<div className="grid grid-cols-2 gap-4">
{riskMetrics.map((metric) => (
<div key={metric.name} className="p-4 bg-gray-50 rounded-lg">
<div className="text-sm text-gray-600">{metric.name}</div>
<div className="text-xl font-semibold">{metric.value}</div>
</div>
))}
</div>
</CardContent>
</Card>
</div>
</div>
);
};
export default PortfolioAnalysis;
```
Based on the analysis of your conservative retiree portfolio, here are the key findings and recommendations:
1. Executive Summary
- Risk Score: 3.5/10 (Appropriately conservative)
- Current portfolio is slightly overweight equities (+5%) relative to target
- Strong overall alignment with stated low risk tolerance
- Adequate liquidity buffer maintained
2. Key Risk Analysis
- Asset Concentration: Well-diversified across major asset classes
- Duration Risk: High exposure through government bonds
- Credit Risk: Moderate exposure through corporate bonds (15%)
- Geographic Risk: Heavy US concentration
3. Priority Recommendations
a) Rebalancing Actions:
- Consider reducing US Large Cap ETF by 5%
- Increase government bond allocation by 5%
- Maintain current corporate bond and cash positions
b) Risk Mitigation:
- Consider adding short-term bonds to reduce duration risk
- Evaluate international bond exposure for diversification
- Maintain current cash buffer for liquidity needs
4. Portfolio Strengths
- Strong liquidity position
- Conservative allocation appropriate for risk tolerance
- Simple, low-cost structure
- High-quality fixed income core
Would you like me to elaborate on any specific aspect of the analysis or provide more detailed recommendations for any particular area?