Spaces:
Running
Running
File size: 35,674 Bytes
cff8519 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>XAI Stock & ETF Analyzer</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="https://cdn.jsdelivr.net/npm/lime-js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/shap/0.41.0/shap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.gradient-bg {
background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #1d4ed8 100%);
}
.feature-impact-bar {
transition: all 0.3s ease;
}
.feature-impact-bar:hover {
transform: scaleX(1.05);
}
.financial-card {
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
transition: all 0.3s ease;
}
.financial-card:hover {
transform: translateY(-2px);
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.tab-button {
transition: all 0.2s ease;
}
.tab-button.active {
border-bottom-width: 3px;
border-color: #3B82F6;
}
.positive-change {
color: #10B981;
}
.negative-change {
color: #EF4444;
}
.neutral-change {
color: #6B7280;
}
.ticker-search:focus {
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}
</style>
</head>
<body class="bg-gray-50 min-h-screen">
<div class="gradient-bg text-white py-6 px-4 shadow-lg">
<div class="container mx-auto flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<h1 class="text-3xl font-bold mb-1">XAI Stock & ETF Analyzer</h1>
<p class="text-lg opacity-90">AI-powered investment insights with explainable analytics</p>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<input type="text" id="ticker-search" placeholder="Search ticker (e.g. AAPL, SPY)"
class="ticker-search pl-10 pr-4 py-2 rounded-full text-gray-800 focus:outline-none w-64">
<i class="fas fa-search absolute left-3 top-3 text-gray-500"></i>
</div>
<button id="search-btn" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-full transition">
Analyze
</button>
</div>
</div>
</div>
<div class="container mx-auto px-4 py-6">
<!-- Portfolio Selection -->
<div class="bg-white rounded-xl shadow-md p-6 mb-6">
<div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-6">
<h2 class="text-2xl font-semibold text-gray-800 mb-4 md:mb-0">Portfolio Analysis</h2>
<div class="flex space-x-3">
<button id="add-stock-btn" class="bg-blue-100 text-blue-700 px-4 py-2 rounded-lg hover:bg-blue-200 transition">
<i class="fas fa-plus mr-2"></i>Add Stock
</button>
<button id="add-etf-btn" class="bg-green-100 text-green-700 px-4 py-2 rounded-lg hover:bg-green-200 transition">
<i class="fas fa-plus mr-2"></i>Add ETF
</button>
<button id="compare-btn" class="bg-purple-100 text-purple-700 px-4 py-2 rounded-lg hover:bg-purple-200 transition">
<i class="fas fa-exchange-alt mr-2"></i>Compare
</button>
</div>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-6" id="portfolio-cards">
<!-- Default cards -->
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200">
<div class="flex justify-between items-start mb-4">
<div>
<h3 class="text-xl font-semibold text-gray-800">SPY</h3>
<p class="text-gray-600">SPDR S&P 500 ETF</p>
</div>
<span class="bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded-full">ETF</span>
</div>
<div class="flex justify-between items-center mb-2">
<span class="text-2xl font-bold text-gray-800">$453.27</span>
<span class="positive-change text-sm font-medium">+1.24%</span>
</div>
<div class="h-40 mb-4">
<canvas id="spy-chart"></canvas>
</div>
<button class="analyze-btn w-full bg-blue-600 hover:bg-blue-700 text-white py-2 rounded-lg transition"
data-ticker="SPY">
Analyze with XAI
</button>
</div>
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200">
<div class="flex justify-between items-start mb-4">
<div>
<h3 class="text-xl font-semibold text-gray-800">AAPL</h3>
<p class="text-gray-600">Apple Inc.</p>
</div>
<span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded-full">Stock</span>
</div>
<div class="flex justify-between items-center mb-2">
<span class="text-2xl font-bold text-gray-800">$193.05</span>
<span class="negative-change text-sm font-medium">-0.56%</span>
</div>
<div class="h-40 mb-4">
<canvas id="aapl-chart"></canvas>
</div>
<button class="analyze-btn w-full bg-blue-600 hover:bg-blue-700 text-white py-2 rounded-lg transition"
data-ticker="AAPL">
Analyze with XAI
</button>
</div>
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200">
<div class="flex justify-between items-start mb-4">
<div>
<h3 class="text-xl font-semibold text-gray-800">TSLA</h3>
<p class="text-gray-600">Tesla Inc.</p>
</div>
<span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded-full">Stock</span>
</div>
<div class="flex justify-between items-center mb-2">
<span class="text-2xl font-bold text-gray-800">$248.48</span>
<span class="positive-change text-sm font-medium">+3.12%</span>
</div>
<div class="h-40 mb-4">
<canvas id="tsla-chart"></canvas>
</div>
<button class="analyze-btn w-full bg-blue-600 hover:bg-blue-700 text-white py-2 rounded-lg transition"
data-ticker="TSLA">
Analyze with XAI
</button>
</div>
</div>
</div>
<!-- Analysis Tabs -->
<div class="bg-white rounded-xl shadow-md overflow-hidden mb-6">
<div class="border-b border-gray-200">
<nav class="flex -mb-px overflow-x-auto">
<button id="overview-tab" class="tab-button active py-4 px-6 text-center border-b-2 font-medium text-sm whitespace-nowrap">
<i class="fas fa-chart-line mr-2"></i>Overview
</button>
<button id="fundamentals-tab" class="tab-button py-4 px-6 text-center border-b-2 font-medium text-sm whitespace-nowrap">
<i class="fas fa-file-invoice-dollar mr-2"></i>Fundamentals
</button>
<button id="lime-tab" class="tab-button py-4 px-6 text-center border-b-2 font-medium text-sm whitespace-nowrap">
<i class="fas fa-brain mr-2"></i>LIME Explanation
</button>
<button id="shap-tab" class="tab-button py-4 px-6 text-center border-b-2 font-medium text-sm whitespace-nowrap">
<i class="fas fa-project-diagram mr-2"></i>SHAP Analysis
</button>
<button id="compare-tab" class="tab-button py-4 px-6 text-center border-b-2 font-medium text-sm whitespace-nowrap">
<i class="fas fa-balance-scale mr-2"></i>Comparison
</button>
<button id="sentiment-tab" class="tab-button py-4 px-6 text-center border-b-2 font-medium text-sm whitespace-nowrap">
<i class="fas fa-comment-dots mr-2"></i>Sentiment
</button>
</nav>
</div>
<div class="p-6">
<!-- Overview Panel -->
<div id="overview-panel">
<div class="flex flex-col md:flex-row justify-between items-start md:items-center mb-6">
<div>
<h3 class="text-xl font-semibold text-gray-800 mb-1">SPDR S&P 500 ETF (SPY)</h3>
<div class="flex items-center space-x-4">
<span class="text-3xl font-bold text-gray-800">$453.27</span>
<span class="positive-change text-lg font-medium">+$5.52 (+1.24%)</span>
<span class="text-gray-600">Today</span>
</div>
</div>
<div class="mt-4 md:mt-0">
<span class="bg-blue-100 text-blue-800 px-3 py-1 rounded-full text-sm font-medium">ETF</span>
<span class="bg-gray-100 text-gray-800 px-3 py-1 rounded-full text-sm font-medium ml-2">Large Cap</span>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200">
<h4 class="font-medium text-lg text-gray-700 mb-3">Key Metrics</h4>
<div class="space-y-3">
<div class="flex justify-between">
<span class="text-gray-600">P/E Ratio</span>
<span class="font-medium">21.34</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">Dividend Yield</span>
<span class="font-medium">1.35%</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">Expense Ratio</span>
<span class="font-medium">0.09%</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">Assets</span>
<span class="font-medium">$380.2B</span>
</div>
</div>
</div>
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200">
<h4 class="font-medium text-lg text-gray-700 mb-3">Performance</h4>
<div class="space-y-3">
<div class="flex justify-between">
<span class="text-gray-600">1 Week</span>
<span class="positive-change font-medium">+2.1%</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">1 Month</span>
<span class="positive-change font-medium">+5.3%</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">YTD</span>
<span class="positive-change font-medium">+14.7%</span>
</div>
<div class="flex justify-between">
<span class="text-gray-600">1 Year</span>
<span class="positive-change font-medium">+22.4%</span>
</div>
</div>
</div>
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200">
<h4 class="font-medium text-lg text-gray-700 mb-3">AI Prediction</h4>
<div class="flex flex-col items-center justify-center h-full">
<div class="text-4xl font-bold text-blue-600 mb-2">Bullish</div>
<div class="text-gray-600 mb-4">68% confidence</div>
<div class="w-full bg-gray-200 rounded-full h-2.5">
<div class="bg-blue-600 h-2.5 rounded-full" style="width: 68%"></div>
</div>
</div>
</div>
</div>
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200 mb-6">
<h4 class="font-medium text-lg text-gray-700 mb-4">Price Chart (6 Months)</h4>
<div class="h-80">
<canvas id="overview-chart"></canvas>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200">
<h4 class="font-medium text-lg text-gray-700 mb-4">Top Holdings</h4>
<div class="space-y-3">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-3">
<div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center">
<span class="text-blue-600 font-medium text-sm">1</span>
</div>
<span class="font-medium">Apple Inc.</span>
</div>
<span class="text-gray-600">7.2%</span>
</div>
<div class="flex justify-between items-center">
<div class="flex items-center space-x-3">
<div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center">
<span class="text-blue-600 font-medium text-sm">2</span>
</div>
<span class="font-medium">Microsoft Corp.</span>
</div>
<span class="text-gray-600">6.8%</span>
</div>
<div class="flex justify-between items-center">
<div class="flex items-center space-x-3">
<div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center">
<span class="text-blue-600 font-medium text-sm">3</span>
</div>
<span class="font-medium">Amazon.com Inc.</span>
</div>
<span class="text-gray-600">3.5%</span>
</div>
<div class="flex justify-between items-center">
<div class="flex items-center space-x-3">
<div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center">
<span class="text-blue-600 font-medium text-sm">4</span>
</div>
<span class="font-medium">NVIDIA Corp.</span>
</div>
<span class="text-gray-600">3.2%</span>
</div>
<div class="flex justify-between items-center">
<div class="flex items-center space-x-3">
<div class="w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center">
<span class="text-blue-600 font-medium text-sm">5</span>
</div>
<span class="font-medium">Alphabet Inc.</span>
</div>
<span class="text-gray-600">2.1%</span>
</div>
</div>
</div>
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200">
<h4 class="font-medium text-lg text-gray-700 mb-4">Sector Allocation</h4>
<div class="h-64">
<canvas id="sector-chart"></canvas>
</div>
</div>
</div>
</div>
<!-- Fundamentals Panel -->
<div id="fundamentals-panel" class="hidden">
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200">
<h4 class="font-medium text-lg text-gray-700 mb-4">Valuation Metrics</h4>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">P/E Ratio</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">21.34</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 24.56</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">P/B Ratio</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">3.87</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 4.12</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">P/S Ratio</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">2.45</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 2.78</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">Dividend Yield</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">1.35%</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 1.42%</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">PEG Ratio</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">1.56</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 1.72</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200">
<h4 class="font-medium text-lg text-gray-700 mb-4">Financial Health</h4>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">Debt/Equity</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">0.45</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 0.62</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">Current Ratio</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">1.32</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 1.18</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">ROE</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">18.2%</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 15.7%</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">ROA</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">8.5%</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 7.2%</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">Operating Margin</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">22.4%</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 19.8%</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200 mb-6">
<h4 class="font-medium text-lg text-gray-700 mb-4">Historical Financials</h4>
<div class="h-80">
<canvas id="financials-chart"></canvas>
</div>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200">
<h4 class="font-medium text-lg text-gray-700 mb-4">Growth Metrics</h4>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">Revenue Growth (YoY)</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">8.7%</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 6.5%</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">EPS Growth (YoY)</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">12.4%</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 9.8%</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">3Y Revenue Growth</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">9.2%</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 7.1%</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">3Y EPS Growth</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">11.5%</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 8.9%</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">5Y Revenue Growth</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">8.3%</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 6.7%</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200">
<h4 class="font-medium text-lg text-gray-700 mb-4">Cash Flow</h4>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<tbody class="bg-white divide-y divide-gray-200">
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">Operating Cash Flow</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">$45.2B</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">+12.4% YoY</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">Free Cash Flow</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">$32.7B</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">+9.8% YoY</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">CapEx</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">$12.5B</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">+5.2% YoY</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">FCF Yield</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">3.8%</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 2.9%</td>
</tr>
<tr>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-600">Dividend Payout Ratio</td>
<td class="px-4 py-3 whitespace-nowrap text-sm font-medium">28.4%</td>
<td class="px-4 py-3 whitespace-nowrap text-sm text-gray-500">Industry: 35.2%</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- LIME Explanation Panel -->
<div id="lime-panel" class="hidden">
<div class="mb-6">
<h3 class="text-xl font-semibold text-gray-800 mb-2">LIME Explanation</h3>
<p class="text-gray-600">Local Interpretable Model-agnostic Explanations show which features most influenced this prediction.</p>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6">
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200">
<h4 class="font-medium text-lg text-gray-700 mb-4">Feature Impact on Prediction</h4>
<div id="lime-features" class="space-y-4">
<div>
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-700">P/E Ratio (21.3)</span>
<span class="text-sm font-medium text-red-600">-0.23</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="feature-impact-bar bg-red-500 h-2 rounded-full" style="width: 45%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-700">Revenue Growth (8.7%)</span>
<span class="text-sm font-medium text-green-600">+0.38</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="feature-impact-bar bg-green-500 h-2 rounded-full" style="width: 65%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-700">ROE (18.2%)</span>
<span class="text-sm font-medium text-green-600">+0.31</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="feature-impact-bar bg-green-500 h-2 rounded-full" style="width: 55%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-700">Debt/Equity (0.45)</span>
<span class="text-sm font-medium text-green-600">+0.18</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="feature-impact-bar bg-green-500 h-2 rounded-full" style="width: 35%"></div>
</div>
</div>
<div>
<div class="flex justify-between mb-1">
<span class="text-sm font-medium text-gray-700">Dividend Yield (1.35%)</span>
<span class="text-sm font-medium text-red-600">-0.12</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="feature-impact-bar bg-red-500 h-2 rounded-full" style="width: 25%"></div>
</div>
</div>
</div>
</div>
<div class="financial-card bg-white p-6 rounded-xl border border-gray-200">
<h4 class="font-medium text-lg text-gray-700 mb-4">Prediction Confidence</h4>
<div class="h-64">
<canvas id="lime-confidence-chart"></canvas>
</div>
</div>
</div>
<div class="financial-card bg-white p-6 rounded-xl border
</html> |