Skip to content

Stellin-15/FinOS

Repository files navigation

FinOS: Bloomberg Terminal + No-Code Trading Bot Builder

A full-stack financial platform built for the Alibaba Cloud Hackathon. Combines a Bloomberg-style market research terminal with a no-code AI-powered trading bot builder.


Features

Terminal (/terminal)

  • Live stock and crypto charts powered by TradingView Lightweight Charts
  • Real-time quotes, 52W high/low, market cap, volume
  • Fundamentals tab — P/E, EPS, revenue, margins, sector (via yfinance)
  • Macro dashboard — Fed rate, CPI, 10Y Treasury, Unemployment (via FRED API)
  • SEC Filings tab — latest 10-K, 10-Q, 8-K filings from EDGAR
  • AI Analysis tab — one-click bull/bear breakdown powered by Qwen
  • Timeframe selector: 1m / 5m / 15m / 1H / 4H / 1D / 1W
  • Indicator overlays: SMA 20, SMA 50, EMA 12, Volume
  • "Create Bot" button — carries the symbol directly into the bot builder

Bot Builder (/builder)

  • Plain English input — describe your strategy, AI auto-fills the rule cards
  • Visual rule card builder — entry and exit conditions using if/then logic
  • Supported indicators: RSI, SMA, EMA, MACD, Bollinger Bands, Price, Volume, ATR
  • Operators: crosses above/below, greater/less than, equals
  • Bot config: position size (fixed $, fixed shares, % of portfolio), check interval, stop loss %, take profit %
  • Paper mode (default) or Live mode via Alpaca

My Bots (/bots)

  • Live dashboard of all deployed bots with status badges
  • Real-time P&L, trade count, last triggered time
  • Expandable rows: trade log + live condition status panel
  • WebSocket-powered — trade notifications appear instantly without refresh
  • Pause / Resume / Delete controls
  • Live connection indicator in the navbar

AI Advisor (/advisor)

  • Streaming chat interface powered by Qwen (Alibaba DashScope)
  • Full markdown rendering for responses
  • Financial advisor system prompt with suggested questions

Tech Stack

Frontend

React 19 UI framework
React Router v7 Client-side routing
Vite 7 Dev server + bundler
Tailwind CSS Styling (dark theme)
TradingView Lightweight Charts Candlestick + overlay charts
Recharts Macro data line charts
socket.io-client Real-time WebSocket updates
lucide-react Icons

Backend

Flask API server
Flask-SocketIO WebSocket server
APScheduler Bot execution scheduler (in-process)
SQLite Database (zero setup)
yfinance Stock/ETF/crypto OHLCV + fundamentals
FRED API Macro economic data
SEC EDGAR API SEC filings
CoinGecko API Crypto prices
Qwen via DashScope AI (OpenAI-compatible)
alpaca-py Paper/live stock order execution
CCXT Crypto exchange order execution

Project Structure

my-financial-app/
├── src/
│   ├── components/
│   │   ├── layout/       Navbar
│   │   ├── terminal/     ChartWidget, QuotePanel, FundamentalsTab, MacroPanel, FilingsTab, AIAnalysisTab, SymbolSearch
│   │   ├── builder/      NLStrategyInput, RuleCard, ConditionRow, BotConfigPanel
│   │   └── dashboard/    BotRow, TradeLog, ConditionStatus
│   ├── pages/            TerminalPage, BotBuilderPage, BotDashboardPage, AdvisorPage
│   ├── hooks/            useMarketData, useBots, useSocket
│   ├── utils/            api, formatters, indicators, botSchema
│   └── constants/        symbols, indicators
│
└── backend/
    ├── app.py            Flask app + SocketIO + APScheduler
    ├── database.py       SQLite schema + helpers
    ├── scheduler.py      Bot job registration
    ├── routes/           market, macro, ai, bots
    ├── engine/           indicators, evaluator, bot_runner
    ├── data/             market_fetcher, fred_fetcher, edgar_fetcher
    └── trading/          alpaca_client, ccxt_client

Getting Started

Prerequisites

  • Node.js 18+
  • Python 3.10+

1. Clone and install

git clone <repo-url>
cd my-financial-app
npm install
cd backend
pip install -r requirements.txt

2. Configure environment

Copy the example env file and fill in your keys:

cp backend/.env.example backend/.env

Required:

OPENAI_API_KEY=your_dashscope_api_key_here

Optional (features degrade gracefully without these):

FRED_API_KEY=your_fred_api_key_here
ALPACA_API_KEY=your_alpaca_key_here
ALPACA_SECRET_KEY=your_alpaca_secret_here
ALPACA_PAPER=true

3. Run

Backend (terminal 1):

cd backend
python app.py

Runs on http://localhost:5000

Frontend (terminal 2):

npm run dev

Runs on http://localhost:5173


Free API Keys

API Sign Up Used For
Alibaba DashScope dashscope.aliyun.com Qwen AI (required)
FRED fred.stlouisfed.org/docs/api/api_key.html Macro data (free, instant)
Alpaca alpaca.markets Paper trading (free)

yfinance, CoinGecko, and SEC EDGAR require no API key.


Database

SQLite file auto-created at backend/finos.db on first run. Tables:

  • bots — bot configurations and status
  • bot_state — current position and last indicator values
  • trades — full trade history
  • price_cache — API response cache with TTL
  • backtest_results — stored backtest runs

Bot Strategy Example

Plain English input:

"Buy when RSI drops below 30 and price is above the 50-day SMA. Sell when RSI goes above 70 or I'm down 5%."

AI parses this into:

{
  "entry_rules": [{
    "logic": "AND",
    "conditions": [
      { "indicator": "RSI", "params": { "period": 14 }, "operator": "less_than", "compare_to": { "type": "value", "value": 30 } },
      { "indicator": "PRICE", "operator": "greater_than", "compare_to": { "type": "indicator", "indicator": "SMA", "params": { "period": 50 } } }
    ]
  }],
  "exit_rules": [{
    "logic": "OR",
    "conditions": [
      { "indicator": "RSI", "params": { "period": 14 }, "operator": "greater_than", "compare_to": { "type": "value", "value": 70 } },
      { "indicator": "PRICE_CHANGE_FROM_ENTRY", "operator": "less_than", "compare_to": { "type": "value", "value": -5 } }
    ]
  }],
  "stop_loss_pct": 5.0
}

About

FinOS: Bloomberg Terminal + No-Code Trading Bot Builder

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors