investormate 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- investormate-0.1.1/LICENSE +21 -0
- investormate-0.1.1/MANIFEST.in +5 -0
- investormate-0.1.1/PKG-INFO +256 -0
- investormate-0.1.1/README.md +206 -0
- investormate-0.1.1/docs/ai_providers.md +245 -0
- investormate-0.1.1/docs/api_reference.md +418 -0
- investormate-0.1.1/docs/index.md +89 -0
- investormate-0.1.1/docs/quickstart.md +133 -0
- investormate-0.1.1/examples/ai_analysis.py +57 -0
- investormate-0.1.1/examples/basic_usage.py +38 -0
- investormate-0.1.1/examples/multi_provider.py +55 -0
- investormate-0.1.1/examples/portfolio_analysis.py +44 -0
- investormate-0.1.1/examples/screening.py +45 -0
- investormate-0.1.1/examples/technical_analysis.py +46 -0
- investormate-0.1.1/investormate/__init__.py +49 -0
- investormate-0.1.1/investormate/ai/__init__.py +1 -0
- investormate-0.1.1/investormate/ai/anthropic_provider.py +91 -0
- investormate-0.1.1/investormate/ai/base_provider.py +57 -0
- investormate-0.1.1/investormate/ai/gemini_provider.py +90 -0
- investormate-0.1.1/investormate/ai/openai_provider.py +90 -0
- investormate-0.1.1/investormate/ai/prompts.py +155 -0
- investormate-0.1.1/investormate/ai/response_parser.py +146 -0
- investormate-0.1.1/investormate/analysis/__init__.py +1 -0
- investormate-0.1.1/investormate/analysis/indicators.py +200 -0
- investormate-0.1.1/investormate/analysis/ratios.py +283 -0
- investormate-0.1.1/investormate/analysis/scores.py +231 -0
- investormate-0.1.1/investormate/core/__init__.py +1 -0
- investormate-0.1.1/investormate/core/investor.py +271 -0
- investormate-0.1.1/investormate/core/market.py +84 -0
- investormate-0.1.1/investormate/core/portfolio.py +235 -0
- investormate-0.1.1/investormate/core/screener.py +203 -0
- investormate-0.1.1/investormate/core/stock.py +250 -0
- investormate-0.1.1/investormate/data/__init__.py +1 -0
- investormate-0.1.1/investormate/data/constants.py +100 -0
- investormate-0.1.1/investormate/data/fetchers.py +382 -0
- investormate-0.1.1/investormate/data/parsers.py +189 -0
- investormate-0.1.1/investormate/documents/__init__.py +1 -0
- investormate-0.1.1/investormate/documents/extractors.py +194 -0
- investormate-0.1.1/investormate/documents/processors.py +173 -0
- investormate-0.1.1/investormate/utils/__init__.py +1 -0
- investormate-0.1.1/investormate/utils/exceptions.py +38 -0
- investormate-0.1.1/investormate/utils/helpers.py +175 -0
- investormate-0.1.1/investormate/utils/validators.py +125 -0
- investormate-0.1.1/investormate/version.py +3 -0
- investormate-0.1.1/investormate.egg-info/PKG-INFO +256 -0
- investormate-0.1.1/investormate.egg-info/SOURCES.txt +52 -0
- investormate-0.1.1/investormate.egg-info/dependency_links.txt +1 -0
- investormate-0.1.1/investormate.egg-info/requires.txt +28 -0
- investormate-0.1.1/investormate.egg-info/top_level.txt +1 -0
- investormate-0.1.1/pyproject.toml +80 -0
- investormate-0.1.1/setup.cfg +4 -0
- investormate-0.1.1/setup.py +7 -0
- investormate-0.1.1/tests/test_helpers.py +42 -0
- investormate-0.1.1/tests/test_validators.py +57 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 InvestorMate Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: investormate
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: AI-powered stock analysis package combining data, technical indicators, and multi-provider AI analysis
|
|
5
|
+
Author: InvestorMate Contributors
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/siddartha19/investormate
|
|
8
|
+
Project-URL: Documentation, https://github.com/siddartha19/investormate#readme
|
|
9
|
+
Project-URL: Repository, https://github.com/siddartha19/investormate
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/siddartha19/investormate/issues
|
|
11
|
+
Keywords: finance,stocks,ai,analysis,yfinance,trading,investment,technical-analysis
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
22
|
+
Requires-Python: >=3.9
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: yfinance>=0.2.40
|
|
26
|
+
Requires-Dist: pandas>=2.0.0
|
|
27
|
+
Requires-Dist: numpy>=1.24.0
|
|
28
|
+
Requires-Dist: requests>=2.31.0
|
|
29
|
+
Requires-Dist: beautifulsoup4>=4.12.0
|
|
30
|
+
Requires-Dist: pypdf>=5.0.0
|
|
31
|
+
Requires-Dist: validators>=0.20.0
|
|
32
|
+
Provides-Extra: ai
|
|
33
|
+
Requires-Dist: openai>=1.0.0; extra == "ai"
|
|
34
|
+
Requires-Dist: anthropic>=0.30.0; extra == "ai"
|
|
35
|
+
Requires-Dist: google-genai>=0.1.0; extra == "ai"
|
|
36
|
+
Provides-Extra: ta
|
|
37
|
+
Requires-Dist: pandas-ta>=0.3.14b; extra == "ta"
|
|
38
|
+
Provides-Extra: all
|
|
39
|
+
Requires-Dist: openai>=1.0.0; extra == "all"
|
|
40
|
+
Requires-Dist: anthropic>=0.30.0; extra == "all"
|
|
41
|
+
Requires-Dist: google-genai>=0.1.0; extra == "all"
|
|
42
|
+
Requires-Dist: pandas-ta>=0.3.14b; extra == "all"
|
|
43
|
+
Provides-Extra: dev
|
|
44
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
45
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
46
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
47
|
+
Requires-Dist: flake8>=6.0.0; extra == "dev"
|
|
48
|
+
Requires-Dist: build>=1.0.0; extra == "dev"
|
|
49
|
+
Dynamic: license-file
|
|
50
|
+
|
|
51
|
+
<img width="920" height="290" alt="Screenshot 2025-06-25 at 7 43 49 PM" src="https://github.com/user-attachments/assets/9f9db564-9a4d-43c7-8bb6-38bc000894b2" />
|
|
52
|
+
|
|
53
|
+
# InvestorMate 🤖📈
|
|
54
|
+
|
|
55
|
+
[](https://badge.fury.io/py/investormate)
|
|
56
|
+
[](https://www.python.org/downloads/)
|
|
57
|
+
[](https://opensource.org/licenses/MIT)
|
|
58
|
+
|
|
59
|
+
**AI-Powered Stock Analysis in Python**
|
|
60
|
+
|
|
61
|
+
InvestorMate is the only Python package you need for comprehensive stock analysis - from data fetching to AI-powered insights.
|
|
62
|
+
|
|
63
|
+
> "Ask any question about any stock and get instant AI-powered insights"
|
|
64
|
+
|
|
65
|
+
## ✨ Features
|
|
66
|
+
|
|
67
|
+
- **AI-Powered Analysis** - Ask natural language questions about any stock using OpenAI, Claude, or Gemini
|
|
68
|
+
- **Comprehensive Stock Data** - Real-time prices, financials, news, and SEC filings via yfinance
|
|
69
|
+
- **60+ Technical Indicators** - SMA, EMA, RSI, MACD, Bollinger Bands, and more via pandas-ta
|
|
70
|
+
- **Financial Ratios** - Auto-calculated P/E, ROE, debt ratios, and profitability metrics
|
|
71
|
+
- **Stock Screening** - Find value stocks, growth stocks, or create custom screens
|
|
72
|
+
- **Portfolio Analysis** - Track performance, risk metrics, and allocation
|
|
73
|
+
- **Market Summaries** - Real-time data for US, Asian, European, crypto, and commodity markets
|
|
74
|
+
|
|
75
|
+
## 🚀 Quick Start
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
pip install investormate
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
from investormate import Investor, Stock
|
|
83
|
+
|
|
84
|
+
# AI-powered analysis
|
|
85
|
+
investor = Investor(openai_api_key="sk-...")
|
|
86
|
+
result = investor.ask("AAPL", "Is Apple undervalued compared to its peers?")
|
|
87
|
+
print(result)
|
|
88
|
+
|
|
89
|
+
# Stock data and analysis
|
|
90
|
+
stock = Stock("AAPL")
|
|
91
|
+
print(f"Price: ${stock.price}")
|
|
92
|
+
print(f"P/E Ratio: {stock.ratios.pe}")
|
|
93
|
+
print(f"RSI: {stock.indicators.rsi()}")
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## 📦 Installation
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# Basic installation
|
|
100
|
+
pip install investormate
|
|
101
|
+
|
|
102
|
+
# With development dependencies
|
|
103
|
+
pip install investormate[dev]
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## 🔑 API Keys
|
|
107
|
+
|
|
108
|
+
InvestorMate supports multiple AI providers:
|
|
109
|
+
|
|
110
|
+
- **OpenAI**: Get your API key at https://platform.openai.com/api-keys
|
|
111
|
+
- **Anthropic Claude**: Get your API key at https://console.anthropic.com/
|
|
112
|
+
- **Google Gemini**: Get your API key at https://ai.google.dev/
|
|
113
|
+
|
|
114
|
+
You only need one API key to use the AI features.
|
|
115
|
+
|
|
116
|
+
## 📚 Documentation
|
|
117
|
+
|
|
118
|
+
- [Quickstart Guide](docs/quickstart.md) - Get started in 5 minutes
|
|
119
|
+
- [API Reference](docs/api_reference.md) - Complete API documentation
|
|
120
|
+
- [AI Providers Guide](docs/ai_providers.md) - OpenAI, Claude, and Gemini setup
|
|
121
|
+
- [Examples](examples/) - Working code examples
|
|
122
|
+
|
|
123
|
+
## 🎯 Why InvestorMate?
|
|
124
|
+
|
|
125
|
+
| Feature | InvestorMate | Other Solutions |
|
|
126
|
+
|---------|--------------|-----------------|
|
|
127
|
+
| **Simplicity** | One package, simple API | Need 5+ packages |
|
|
128
|
+
| **AI-Powered** | Built-in AI analysis | Manual analysis only |
|
|
129
|
+
| **Provider Choice** | OpenAI, Claude, Gemini | Locked to one provider |
|
|
130
|
+
| **Setup Time** | 2 lines of code | Hours of configuration |
|
|
131
|
+
| **Data Format** | JSON-ready | Raw pandas DataFrames |
|
|
132
|
+
| **Target Users** | Everyone | Enterprise only |
|
|
133
|
+
|
|
134
|
+
## 💡 Examples
|
|
135
|
+
|
|
136
|
+
### Stock Analysis
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
from investormate import Stock
|
|
140
|
+
|
|
141
|
+
stock = Stock("TSLA")
|
|
142
|
+
|
|
143
|
+
# Basic info
|
|
144
|
+
print(stock.price)
|
|
145
|
+
print(stock.market_cap)
|
|
146
|
+
print(stock.sector)
|
|
147
|
+
|
|
148
|
+
# Financial statements
|
|
149
|
+
income_stmt = stock.income_statement
|
|
150
|
+
balance_sheet = stock.balance_sheet
|
|
151
|
+
cash_flow = stock.cash_flow
|
|
152
|
+
|
|
153
|
+
# Historical data
|
|
154
|
+
df = stock.history(period="1y", interval="1d")
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### AI-Powered Insights
|
|
158
|
+
|
|
159
|
+
```python
|
|
160
|
+
from investormate import Investor
|
|
161
|
+
|
|
162
|
+
investor = Investor(openai_api_key="sk-...")
|
|
163
|
+
|
|
164
|
+
# Ask questions
|
|
165
|
+
result = investor.ask("NVDA", "What are the key revenue drivers?")
|
|
166
|
+
|
|
167
|
+
# Compare stocks
|
|
168
|
+
comparison = investor.compare(
|
|
169
|
+
["AAPL", "GOOGL", "MSFT"],
|
|
170
|
+
"Which has the best growth prospects?"
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
# Analyze documents
|
|
174
|
+
result = investor.analyze_document(
|
|
175
|
+
ticker="TSLA",
|
|
176
|
+
url="https://example.com/earnings-report.pdf",
|
|
177
|
+
question="Summarize Q4 earnings highlights"
|
|
178
|
+
)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Technical Analysis
|
|
182
|
+
|
|
183
|
+
```python
|
|
184
|
+
from investormate import Stock
|
|
185
|
+
|
|
186
|
+
stock = Stock("AAPL")
|
|
187
|
+
df = stock.history(period="6mo")
|
|
188
|
+
|
|
189
|
+
# Add indicators
|
|
190
|
+
df = stock.add_indicators(df, [
|
|
191
|
+
"sma_20", "sma_50", "rsi_14", "macd", "bbands"
|
|
192
|
+
])
|
|
193
|
+
|
|
194
|
+
# Or use individual methods
|
|
195
|
+
sma_20 = stock.indicators.sma(20)
|
|
196
|
+
rsi = stock.indicators.rsi(14)
|
|
197
|
+
macd = stock.indicators.macd()
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Stock Screening
|
|
201
|
+
|
|
202
|
+
```python
|
|
203
|
+
from investormate import Screener
|
|
204
|
+
|
|
205
|
+
screener = Screener()
|
|
206
|
+
|
|
207
|
+
# Pre-built screens
|
|
208
|
+
value_stocks = screener.value_stocks(pe_max=15, pb_max=1.5)
|
|
209
|
+
growth_stocks = screener.growth_stocks(revenue_growth_min=20)
|
|
210
|
+
dividend_stocks = screener.dividend_stocks(yield_min=3.0)
|
|
211
|
+
|
|
212
|
+
# Custom screening
|
|
213
|
+
results = screener.filter(
|
|
214
|
+
market_cap_min=1_000_000_000,
|
|
215
|
+
pe_ratio=(10, 25),
|
|
216
|
+
roe_min=15,
|
|
217
|
+
sector="Technology"
|
|
218
|
+
)
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Portfolio Analysis
|
|
222
|
+
|
|
223
|
+
```python
|
|
224
|
+
from investormate import Portfolio
|
|
225
|
+
|
|
226
|
+
portfolio = Portfolio({
|
|
227
|
+
"AAPL": 10,
|
|
228
|
+
"GOOGL": 5,
|
|
229
|
+
"MSFT": 15,
|
|
230
|
+
"TSLA": 8
|
|
231
|
+
})
|
|
232
|
+
|
|
233
|
+
print(f"Total Value: ${portfolio.value:,.2f}")
|
|
234
|
+
print(f"Sharpe Ratio: {portfolio.sharpe_ratio:.2f}")
|
|
235
|
+
print(f"Allocation: {portfolio.allocation}")
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## 🤝 Contributing
|
|
239
|
+
|
|
240
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
241
|
+
|
|
242
|
+
## 📄 License
|
|
243
|
+
|
|
244
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
245
|
+
|
|
246
|
+
## ⚠️ Disclaimer
|
|
247
|
+
|
|
248
|
+
InvestorMate is for educational and research purposes only. It is not financial advice. AI-generated insights may contain errors or hallucinations. Always verify information and consult with a qualified financial advisor before making investment decisions.
|
|
249
|
+
|
|
250
|
+
## 🌟 Support
|
|
251
|
+
|
|
252
|
+
If you find InvestorMate useful, please give it a star on GitHub!
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
Made with ❤️ by the InvestorMate community
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
<img width="920" height="290" alt="Screenshot 2025-06-25 at 7 43 49 PM" src="https://github.com/user-attachments/assets/9f9db564-9a4d-43c7-8bb6-38bc000894b2" />
|
|
2
|
+
|
|
3
|
+
# InvestorMate 🤖📈
|
|
4
|
+
|
|
5
|
+
[](https://badge.fury.io/py/investormate)
|
|
6
|
+
[](https://www.python.org/downloads/)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
9
|
+
**AI-Powered Stock Analysis in Python**
|
|
10
|
+
|
|
11
|
+
InvestorMate is the only Python package you need for comprehensive stock analysis - from data fetching to AI-powered insights.
|
|
12
|
+
|
|
13
|
+
> "Ask any question about any stock and get instant AI-powered insights"
|
|
14
|
+
|
|
15
|
+
## ✨ Features
|
|
16
|
+
|
|
17
|
+
- **AI-Powered Analysis** - Ask natural language questions about any stock using OpenAI, Claude, or Gemini
|
|
18
|
+
- **Comprehensive Stock Data** - Real-time prices, financials, news, and SEC filings via yfinance
|
|
19
|
+
- **60+ Technical Indicators** - SMA, EMA, RSI, MACD, Bollinger Bands, and more via pandas-ta
|
|
20
|
+
- **Financial Ratios** - Auto-calculated P/E, ROE, debt ratios, and profitability metrics
|
|
21
|
+
- **Stock Screening** - Find value stocks, growth stocks, or create custom screens
|
|
22
|
+
- **Portfolio Analysis** - Track performance, risk metrics, and allocation
|
|
23
|
+
- **Market Summaries** - Real-time data for US, Asian, European, crypto, and commodity markets
|
|
24
|
+
|
|
25
|
+
## 🚀 Quick Start
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install investormate
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
from investormate import Investor, Stock
|
|
33
|
+
|
|
34
|
+
# AI-powered analysis
|
|
35
|
+
investor = Investor(openai_api_key="sk-...")
|
|
36
|
+
result = investor.ask("AAPL", "Is Apple undervalued compared to its peers?")
|
|
37
|
+
print(result)
|
|
38
|
+
|
|
39
|
+
# Stock data and analysis
|
|
40
|
+
stock = Stock("AAPL")
|
|
41
|
+
print(f"Price: ${stock.price}")
|
|
42
|
+
print(f"P/E Ratio: {stock.ratios.pe}")
|
|
43
|
+
print(f"RSI: {stock.indicators.rsi()}")
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 📦 Installation
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Basic installation
|
|
50
|
+
pip install investormate
|
|
51
|
+
|
|
52
|
+
# With development dependencies
|
|
53
|
+
pip install investormate[dev]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## 🔑 API Keys
|
|
57
|
+
|
|
58
|
+
InvestorMate supports multiple AI providers:
|
|
59
|
+
|
|
60
|
+
- **OpenAI**: Get your API key at https://platform.openai.com/api-keys
|
|
61
|
+
- **Anthropic Claude**: Get your API key at https://console.anthropic.com/
|
|
62
|
+
- **Google Gemini**: Get your API key at https://ai.google.dev/
|
|
63
|
+
|
|
64
|
+
You only need one API key to use the AI features.
|
|
65
|
+
|
|
66
|
+
## 📚 Documentation
|
|
67
|
+
|
|
68
|
+
- [Quickstart Guide](docs/quickstart.md) - Get started in 5 minutes
|
|
69
|
+
- [API Reference](docs/api_reference.md) - Complete API documentation
|
|
70
|
+
- [AI Providers Guide](docs/ai_providers.md) - OpenAI, Claude, and Gemini setup
|
|
71
|
+
- [Examples](examples/) - Working code examples
|
|
72
|
+
|
|
73
|
+
## 🎯 Why InvestorMate?
|
|
74
|
+
|
|
75
|
+
| Feature | InvestorMate | Other Solutions |
|
|
76
|
+
|---------|--------------|-----------------|
|
|
77
|
+
| **Simplicity** | One package, simple API | Need 5+ packages |
|
|
78
|
+
| **AI-Powered** | Built-in AI analysis | Manual analysis only |
|
|
79
|
+
| **Provider Choice** | OpenAI, Claude, Gemini | Locked to one provider |
|
|
80
|
+
| **Setup Time** | 2 lines of code | Hours of configuration |
|
|
81
|
+
| **Data Format** | JSON-ready | Raw pandas DataFrames |
|
|
82
|
+
| **Target Users** | Everyone | Enterprise only |
|
|
83
|
+
|
|
84
|
+
## 💡 Examples
|
|
85
|
+
|
|
86
|
+
### Stock Analysis
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
from investormate import Stock
|
|
90
|
+
|
|
91
|
+
stock = Stock("TSLA")
|
|
92
|
+
|
|
93
|
+
# Basic info
|
|
94
|
+
print(stock.price)
|
|
95
|
+
print(stock.market_cap)
|
|
96
|
+
print(stock.sector)
|
|
97
|
+
|
|
98
|
+
# Financial statements
|
|
99
|
+
income_stmt = stock.income_statement
|
|
100
|
+
balance_sheet = stock.balance_sheet
|
|
101
|
+
cash_flow = stock.cash_flow
|
|
102
|
+
|
|
103
|
+
# Historical data
|
|
104
|
+
df = stock.history(period="1y", interval="1d")
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### AI-Powered Insights
|
|
108
|
+
|
|
109
|
+
```python
|
|
110
|
+
from investormate import Investor
|
|
111
|
+
|
|
112
|
+
investor = Investor(openai_api_key="sk-...")
|
|
113
|
+
|
|
114
|
+
# Ask questions
|
|
115
|
+
result = investor.ask("NVDA", "What are the key revenue drivers?")
|
|
116
|
+
|
|
117
|
+
# Compare stocks
|
|
118
|
+
comparison = investor.compare(
|
|
119
|
+
["AAPL", "GOOGL", "MSFT"],
|
|
120
|
+
"Which has the best growth prospects?"
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
# Analyze documents
|
|
124
|
+
result = investor.analyze_document(
|
|
125
|
+
ticker="TSLA",
|
|
126
|
+
url="https://example.com/earnings-report.pdf",
|
|
127
|
+
question="Summarize Q4 earnings highlights"
|
|
128
|
+
)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Technical Analysis
|
|
132
|
+
|
|
133
|
+
```python
|
|
134
|
+
from investormate import Stock
|
|
135
|
+
|
|
136
|
+
stock = Stock("AAPL")
|
|
137
|
+
df = stock.history(period="6mo")
|
|
138
|
+
|
|
139
|
+
# Add indicators
|
|
140
|
+
df = stock.add_indicators(df, [
|
|
141
|
+
"sma_20", "sma_50", "rsi_14", "macd", "bbands"
|
|
142
|
+
])
|
|
143
|
+
|
|
144
|
+
# Or use individual methods
|
|
145
|
+
sma_20 = stock.indicators.sma(20)
|
|
146
|
+
rsi = stock.indicators.rsi(14)
|
|
147
|
+
macd = stock.indicators.macd()
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Stock Screening
|
|
151
|
+
|
|
152
|
+
```python
|
|
153
|
+
from investormate import Screener
|
|
154
|
+
|
|
155
|
+
screener = Screener()
|
|
156
|
+
|
|
157
|
+
# Pre-built screens
|
|
158
|
+
value_stocks = screener.value_stocks(pe_max=15, pb_max=1.5)
|
|
159
|
+
growth_stocks = screener.growth_stocks(revenue_growth_min=20)
|
|
160
|
+
dividend_stocks = screener.dividend_stocks(yield_min=3.0)
|
|
161
|
+
|
|
162
|
+
# Custom screening
|
|
163
|
+
results = screener.filter(
|
|
164
|
+
market_cap_min=1_000_000_000,
|
|
165
|
+
pe_ratio=(10, 25),
|
|
166
|
+
roe_min=15,
|
|
167
|
+
sector="Technology"
|
|
168
|
+
)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Portfolio Analysis
|
|
172
|
+
|
|
173
|
+
```python
|
|
174
|
+
from investormate import Portfolio
|
|
175
|
+
|
|
176
|
+
portfolio = Portfolio({
|
|
177
|
+
"AAPL": 10,
|
|
178
|
+
"GOOGL": 5,
|
|
179
|
+
"MSFT": 15,
|
|
180
|
+
"TSLA": 8
|
|
181
|
+
})
|
|
182
|
+
|
|
183
|
+
print(f"Total Value: ${portfolio.value:,.2f}")
|
|
184
|
+
print(f"Sharpe Ratio: {portfolio.sharpe_ratio:.2f}")
|
|
185
|
+
print(f"Allocation: {portfolio.allocation}")
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## 🤝 Contributing
|
|
189
|
+
|
|
190
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
191
|
+
|
|
192
|
+
## 📄 License
|
|
193
|
+
|
|
194
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
195
|
+
|
|
196
|
+
## ⚠️ Disclaimer
|
|
197
|
+
|
|
198
|
+
InvestorMate is for educational and research purposes only. It is not financial advice. AI-generated insights may contain errors or hallucinations. Always verify information and consult with a qualified financial advisor before making investment decisions.
|
|
199
|
+
|
|
200
|
+
## 🌟 Support
|
|
201
|
+
|
|
202
|
+
If you find InvestorMate useful, please give it a star on GitHub!
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
Made with ❤️ by the InvestorMate community
|