Investment Portfolio Recommendation Web Application.
- Provide investment portfolio recommendations based on Yahoo Finance data.
- Portfolio comprised of ETFs, shares, and bonds.
- Friendly UX/UI with risk and horizon sliders.
- Historic portfolio performance graph (1, 3, and 5 years) with gain/loss indicators.
- Persist custom portfolio analyses in MongoDB for logged-in users.
- Next.js with TypeScript for frontend and backend (API routes).
- Yahoo Finance integration via
yahoo-finance2. - Recharts for data visualization.
- date-fns for date handling.
- Clerk for authentication and user management.
- Vercel Analytics for real-time traffic insights.
- MongoDB (via Vercel integration) for persisting custom portfolio data.
npm installPennywise requires Node.js v18.14.0, v20.x, v22.x, or v24.x and above. Node.js v23.x is currently not supported by our test tooling.
You can automatically switch to the LTS version (v22.x) with nvm:
nvm usenpm run devOpen http://localhost:3000 in your browser.
npm run buildnpm startnpm run instructions: Display usage instructions.npm run dev: Run in development mode.npm run build: Build for production.npm start: Start production server.npm test: Run unit and integration tests.
Run unit and integration tests via Vitest:
npm testThe app uses the following environment variables (create a .env.local file):
# Google Analytics (gtag.js)
NEXT_PUBLIC_GTAG_ID=AW-17250895076
# MongoDB connection string
MONGODB_URI=<your_mongodb_uri>- Query:
tickers(comma-separated symbols, defaultBND,VOO,AAPL),years(e.g.,1,3,5; default5). - Response: time-series per symbol using Yahoo Finance
chart.
Example:
{
"series": [
{
"symbol": "VOO",
"points": [
{ "date": "2023-01-01T00:00:00.000Z", "close": 377.45 },
{ "date": "2023-01-08T00:00:00.000Z", "close": 381.12 }
]
}
]
}Notes:
- Uses
chart(range, interval)withrange = <years>y; interval is1wkforyears >= 5, otherwise1d. - The app computes aggregate performance client-side using the selected tickers and current risk/horizon.