File size: 2,564 Bytes
bd2b4c7
55b6bb1
bd2b4c7
55b6bb1
 
bd2b4c7
 
55b6bb1
bd2b4c7
 
55b6bb1
bd2b4c7
55b6bb1
 
 
 
bd2b4c7
55b6bb1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: ECM Quant AI
emoji: πŸš€
colorFrom: gray
colorTo: yellow
sdk: docker
pinned: false
app_port: 7860
---

# ECM Quant AI | Analyst Dashboard

![Status](https://img.shields.io/badge/Status-Production-gold)
![Python](https://img.shields.io/badge/Python-3.9-blue)
![FastAPI](https://img.shields.io/badge/FastAPI-0.109-green)
![Jinja2](https://img.shields.io/badge/Jinja2-3.1-red)

**ECM Quant AI** is a professional-grade quantitative pricing engine. Originally prototyped in Streamlit, it has been re-architected as a high-performance **FastAPI** web application to meet production latency requirements.

It features a "Goldman Sachs" style analyst dashboard using server-side rendering (Jinja2) and lightweight vanilla JavaScript for interactive charting.

---

## πŸš€ Key Features

*   **FastAPI Backend**: High-performance asynchronous endpoints for market data processing.
*   **Production Dashboard**: Custom HTML/CSS/JS frontend (no heavyweight frameworks) for maximum speed and "Human-Written" quality.
*   **Real-Time Signals**: Calculates Momentum, Volatility, and Beta against the S&P 500 (^GSPC) using `yfinance`.
*   **Institutional Aesthetic**: Dark mode with Gold (#FFD700) accents.
*   **Zero-Keys**: Fully operational using public market data rails.

## πŸ› οΈ Usage

### Local Development
1.  **Install dependencies**:
    ```bash
    pip install -r requirements.txt
    ```

2.  **Run the server**:
    ```bash
    uvicorn main:app --reload
    ```

3.  **Access Dashboard**:
    Open `http://127.0.0.1:8000` in your browser.

### Docker Deployment
The project is containerized for Hugging Face Spaces (Docker SDK).

```bash
docker build -t ecm-quant-ai .
docker run -p 7860:7860 ecm-quant-ai
```

## πŸ“Š Methodology

The engine normalizes 6-month historical price data to derive pricing recommendations:
1.  **Momentum (30d)**: Rolling rate-of-change vs Benchmark.
2.  **Volatility**: Annualized standard deviation.
3.  **Pricing Recommendation**: Heuristic model `f(momentum, volatility)` -> `[Low, High]` range.

## πŸ“‚ Project Structure

```
β”œβ”€β”€ main.py                 # FastAPI Application (Entry Point)
β”œβ”€β”€ templates/
β”‚   └── index.html         # Jinja2 Dashboard Template
β”œβ”€β”€ static/
β”‚   β”œβ”€β”€ style.css          # CSS Variables & Theme
β”‚   └── script.js          # Client-side Charting (Plotly)
β”œβ”€β”€ requirements.txt       # Dependencies
β”œβ”€β”€ Dockerfile             # Uvicorn container
└── README.md              # Documentation
```

---
*Built for the Modern ECM Desk.*