import React from "react"; export default function PortfolioVersions({ snapshots, onRestore }) { if (!snapshots || snapshots.length === 0) return null; return (

Portfolio History

Previous portfolio snapshots. Click to restore.

{snapshots.map((s, i) => ( ))}
# Label Date Tickers Return Sharpe
{i + 1} {s.label || `Snapshot #${i + 1}`} {new Date(s.timestamp * 1000).toLocaleDateString()} {s.tickers.join(", ")} {s.performance?.annual_return != null ? `${(s.performance.annual_return * 100).toFixed(2)}%` : "—"} {s.performance?.sharpe_ratio != null ? s.performance.sharpe_ratio.toFixed(2) : "—"}
); }