lucifer7210 commited on
Commit
c6cc481
Β·
verified Β·
1 Parent(s): 6c96856

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +104 -0
README.md CHANGED
@@ -10,3 +10,107 @@ short_description: mutual fund agentic ai
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  ---
11
 
12
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
13
+ ---
14
+
15
+ # Mutual Fund Investment Decision Support System API
16
+
17
+ This is a FastAPI backend for the Mutual Fund Investment Decision Support System. It provides all the functionality of the original Streamlit app through a RESTful API.
18
+
19
+ ## Features
20
+
21
+ - Market data retrieval (Nifty 50, Sensex, etc.)
22
+ - Mutual fund data fetching and analysis
23
+ - SIP calculator with projections
24
+ - Goal-based investment planning
25
+ - Portfolio analysis and tracking
26
+ - AI-powered investment recommendations
27
+ - Portfolio rebalancing suggestions
28
+ - Performance reporting
29
+
30
+ ## Project Structure
31
+
32
+ mutual_fund_api/
33
+ β”œβ”€β”€ app/
34
+ β”‚ β”œβ”€β”€ init.py
35
+ β”‚ β”œβ”€β”€ main.py
36
+ β”‚ β”œβ”€β”€ config.py
37
+ β”‚ β”œβ”€β”€ models/
38
+ β”‚ β”‚ β”œβ”€β”€ init.py
39
+ β”‚ β”‚ β”œβ”€β”€ fund_models.py
40
+ β”‚ β”‚ β”œβ”€β”€ portfolio_models.py
41
+ β”‚ β”‚ β”œβ”€β”€ goal_models.py
42
+ β”‚ β”‚ └── ai_models.py
43
+ β”‚ β”œβ”€β”€ services/
44
+ β”‚ β”‚ β”œβ”€β”€ init.py
45
+ β”‚ β”‚ β”œβ”€β”€ data_fetcher.py
46
+ β”‚ β”‚ β”œβ”€β”€ sip_calculator.py
47
+ β”‚ β”‚ β”œβ”€β”€ portfolio_analyzer.py
48
+ β”‚ β”‚ └── ai_swarm.py
49
+ β”‚ β”œβ”€β”€ api/
50
+ β”‚ β”‚ β”œβ”€β”€ init.py
51
+ β”‚ β”‚ β”œβ”€β”€ endpoints/
52
+ β”‚ β”‚ β”‚ β”œβ”€β”€ init.py
53
+ β”‚ β”‚ β”‚ β”œβ”€β”€ market.py
54
+ β”‚ β”‚ β”‚ β”œβ”€β”€ funds.py
55
+ β”‚ β”‚ β”‚ β”œβ”€β”€ portfolio.py
56
+ β”‚ β”‚ β”‚ β”œβ”€β”€ goals.py
57
+ β”‚ β”‚ β”‚ └── ai.py
58
+ β”‚ └── utils/
59
+ β”‚ β”œβ”€β”€ init.py
60
+ β”‚ └── helpers.py
61
+ β”œβ”€β”€ requirements.txt
62
+ β”œβ”€β”€ .env
63
+ └── README.md
64
+
65
+
66
+ ## Setup
67
+
68
+ 1. Clone the repository
69
+ 2. Create a virtual environment: `python -m venv venv`
70
+ 3. Activate the virtual environment:
71
+ - Windows: `venv\Scripts\activate`
72
+ - Unix/macOS: `source venv/bin/activate`
73
+ 4. Install dependencies: `pip install -r requirements.txt`
74
+ 5. Create a `.env` file with your Swarms API key
75
+ 6. Run the API: `uvicorn app.main:app --reload`
76
+
77
+ ## API Documentation
78
+
79
+ Once the server is running, you can access the interactive API documentation at:
80
+ - Swagger UI: http://localhost:8000/docs
81
+ - ReDoc: http://localhost:8000/redoc
82
+
83
+ ## Key Endpoints
84
+
85
+ ### Market Data
86
+ - `GET /api/v1/market/indices` - Get market indices data
87
+
88
+ ### Funds
89
+ - `GET /api/v1/funds/schemes` - Get all mutual fund schemes
90
+ - `GET /api/v1/funds/nav/{scheme_code}` - Get NAV history for a fund
91
+ - `GET /api/v1/funds/popular` - Get popular funds by category
92
+ - `POST /api/v1/funds/sip-calculate` - Calculate SIP returns
93
+ - `POST /api/v1/funds/required-sip` - Calculate required SIP for a goal
94
+ - `POST /api/v1/funds/analyze` - Analyze fund performance
95
+
96
+ ### Portfolio
97
+ - `POST /api/v1/portfolio/metrics` - Calculate portfolio metrics
98
+ - `POST /api/v1/portfolio/rebalance` - Get rebalancing recommendations
99
+ - `POST /api/v1/portfolio/performance` - Generate performance report
100
+ - `GET /api/v1/portfolio/template/{template}` - Get portfolio template
101
+ - `GET /api/v1/portfolio/templates` - Get all portfolio templates
102
+
103
+ ### Goals
104
+ - `POST /api/v1/goals/dashboard` - Calculate goals dashboard metrics
105
+ - `POST /api/v1/goals/calculate-sip` - Calculate SIP returns
106
+ - `POST /api/v1/goals/required-sip` - Calculate required SIP for a goal
107
+ - `POST /api/v1/goals/inflation-adjusted` - Calculate inflation-adjusted amount
108
+
109
+ ### AI Recommendations
110
+ - `POST /api/v1/ai/analyze` - Get comprehensive AI recommendations
111
+ - `POST /api/v1/ai/fund-selection` - Get fund selection recommendations
112
+ - `POST /api/v1/ai/risk-assessment` - Get risk assessment
113
+ - `POST /api/v1/ai/goal-planning` - Get goal planning recommendations
114
+
115
+
116
+