1+ import React from 'react' ;
2+ import { PieChart , BarChart , TrendingUp , Users } from 'lucide-react' ;
3+
4+ export const PortfolioAnalytics : React . FC = ( ) => {
5+ return (
6+ < div className = "p-8" >
7+ < div className = "mb-8" >
8+ < h1 className = "text-3xl font-bold text-gray-900" > Portfolio Analytics</ h1 >
9+ < p className = "text-gray-600 mt-2" > Deep dive into portfolio performance and risk</ p >
10+ </ div >
11+
12+ < div className = "grid grid-cols-1 lg:grid-cols-2 gap-8" >
13+ < div className = "bg-white rounded-xl shadow-sm border border-gray-200 p-6" >
14+ < h3 className = "text-lg font-semibold text-gray-900 mb-4" > Asset Allocation</ h3 >
15+ < div className = "h-64 flex items-center justify-center text-gray-500" >
16+ < PieChart className = "w-12 h-12 opacity-50 mr-4" />
17+ < span > Allocation chart will be displayed here</ span >
18+ </ div >
19+ </ div >
20+
21+ < div className = "bg-white rounded-xl shadow-sm border border-gray-200 p-6" >
22+ < h3 className = "text-lg font-semibold text-gray-900 mb-4" > Sector Exposure</ h3 >
23+ < div className = "h-64 flex items-center justify-center text-gray-500" >
24+ < BarChart className = "w-12 h-12 opacity-50 mr-4" />
25+ < span > Sector exposure chart will be displayed here</ span >
26+ </ div >
27+ </ div >
28+
29+ < div className = "bg-white rounded-xl shadow-sm border border-gray-200 p-6" >
30+ < h3 className = "text-lg font-semibold text-gray-900 mb-4" > Risk Analysis</ h3 >
31+ < div className = "space-y-4" >
32+ { [
33+ { metric : 'Value at Risk (95%)' , value : '-5.2%' } ,
34+ { metric : 'Expected Shortfall' , value : '-7.8%' } ,
35+ { metric : 'Beta to Market' , value : '1.12' } ,
36+ { metric : 'Tracking Error' , value : '4.5%' }
37+ ] . map ( ( item , index ) => (
38+ < div key = { index } className = "flex justify-between items-center p-3 bg-gray-50 rounded-lg" >
39+ < span className = "text-gray-700" > { item . metric } </ span >
40+ < span className = "font-semibold text-gray-900" > { item . value } </ span >
41+ </ div >
42+ ) ) }
43+ </ div >
44+ </ div >
45+
46+ < div className = "bg-white rounded-xl shadow-sm border border-gray-200 p-6" >
47+ < h3 className = "text-lg font-semibold text-gray-900 mb-4" > Performance Attribution</ h3 >
48+ < div className = "space-y-3" >
49+ { [
50+ { factor : 'Stock Selection' , contribution : '+3.2%' } ,
51+ { factor : 'Sector Allocation' , contribution : '+1.8%' } ,
52+ { factor : 'Currency Effects' , contribution : '-0.4%' } ,
53+ { factor : 'Transaction Costs' , contribution : '-0.9%' }
54+ ] . map ( ( item , index ) => (
55+ < div key = { index } className = "flex justify-between items-center" >
56+ < span className = "text-gray-600" > { item . factor } </ span >
57+ < span className = { `font-medium ${
58+ item . contribution . startsWith ( '+' )
59+ ? 'text-green-600'
60+ : item . contribution . startsWith ( '-' )
61+ ? 'text-red-600'
62+ : 'text-gray-600'
63+ } `} >
64+ { item . contribution }
65+ </ span >
66+ </ div >
67+ ) ) }
68+ </ div >
69+ </ div >
70+ </ div >
71+ </ div >
72+ ) ;
73+ } ;
0 commit comments