diff --git a/README.md b/README.md index 1d48e1d8..a6cdb449 100644 --- a/README.md +++ b/README.md @@ -94,8 +94,11 @@ python -m quant_research_starter.cli compute-factors -d data_sample/sample_price # run a backtest python -m quant_research_starter.cli backtest -d data_sample/sample_prices.csv -s output/factors.csv -o output/backtest_results.json -# optional: start the Streamlit dashboard +# DISCLAIMER: OLD VERSION +# optional: start the Streamlit dashboard, if on main stream streamlit run src/quant_research_starter/dashboard/streamlit_app.py +# NEW VERSION: if streamlit is in legacy folder +streamlit run legacy/streamlit/streamlit_app.py ``` --- diff --git a/src/quant_research_starter/frontend/cauweb/src/pages/Dashboard.tsx b/src/quant_research_starter/frontend/cauweb/src/pages/Dashboard.tsx new file mode 100644 index 00000000..91757a3e --- /dev/null +++ b/src/quant_research_starter/frontend/cauweb/src/pages/Dashboard.tsx @@ -0,0 +1,95 @@ +import React from 'react'; +import { TrendingUp, TrendingDown, DollarSign, Target } from 'lucide-react'; + +export const Dashboard: React.FC = () => { + const metrics = [ + { title: 'Total Return', value: '+23.45%', change: '+2.1%', icon: TrendingUp, trend: 'up' }, + { title: 'Sharpe Ratio', value: '1.234', change: '+0.12', icon: TrendingUp, trend: 'up' }, + { title: 'Max Drawdown', value: '-12.34%', change: '-1.2%', icon: TrendingDown, trend: 'down' }, + { title: 'Win Rate', value: '64.50%', change: '+3.2%', icon: Target, trend: 'up' } + ]; + + return ( +
+
+

Dashboard

+

Welcome to your quantitative research workspace

+
+ + {/* Metrics Grid */} +
+ {metrics.map((metric, index) => { + const Icon = metric.icon; + return ( +
+
+
+ +
+ + {metric.change} + +
+

{metric.title}

+
+ {metric.value} +
+
+ ); + })} +
+ + {/* Recent Activity */} +
+
+

Recent Backtests

+
+ {[ + { name: 'Momentum Strategy', date: '2 hours ago', status: 'Completed' }, + { name: 'Mean Reversion', date: '5 hours ago', status: 'Completed' }, + { name: 'Sector Rotation', date: '1 day ago', status: 'Running' } + ].map((test, index) => ( +
+
+
{test.name}
+
{test.date}
+
+ + {test.status} + +
+ ))} +
+
+ +
+

Quick Actions

+
+ + + +
+
+
+
+ ); +}; \ No newline at end of file diff --git a/src/quant_research_starter/frontend/readme.md b/src/quant_research_starter/frontend/readme.md new file mode 100644 index 00000000..990ed999 --- /dev/null +++ b/src/quant_research_starter/frontend/readme.md @@ -0,0 +1,50 @@ +frontend/ +│ +├── core/ # Shared logic library +│ ├── src/ +│ │ ├── components/ # Shared React components +│ │ ├── hooks/ # Shared React hooks (fetch, state mgmt) +│ │ ├── utils/ # Reusable helper functions +│ │ ├── types/ # Shared TypeScript types +│ │ └── index.ts # Export all shared modules +│ ├── package.json +│ ├── tsconfig.json +│ └── README.md + +│ +├── cauweb/ # Main Web UI App +│ ├── src/ +│ │ ├── pages/ # UI Screens (Home, Dashboard, About) +│ │ ├── layouts/ # Shared layouts (Navbar, Sidebar) +│ │ ├── features/ # Domain features (Logs, Trading UI) +│ │ ├── assets/ # Images, icons, fonts +│ │ ├── styles/ # Global CSS/Tailwind configs +│ │ └── main.tsx # App entry point +│ ├── public/ +│ ├── package.json +│ ├── tsconfig.json +│ └── README.md + +│ +├── cli/ # Terminal UI (Node/React Ink CLI) +│ ├── src/ +│ │ └── index.ts +│ ├── package.json +│ └── tsconfig.json + +│ +├── metrics/ # Data visual charts + API metrics +│ ├── src/ +│ │ ├── charts/ +│ │ ├── analytics/ +│ │ └── index.ts +│ ├── package.json +│ └── tsconfig.json + +│ +├── node_modules/ # Shared dependencies root install +│ +├── package.json # root scripts + global deps +├── pnpm-workspace.yaml # defines workspace packages +├── tsconfig.base.json # shared TS config +└── README.md