equityiq 0.1.0__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.
equityiq-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Marcos Salguero Carrero
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,238 @@
1
+ Metadata-Version: 2.4
2
+ Name: equityiq
3
+ Version: 0.1.0
4
+ Summary: A Python library for quantitative analysis of stocks
5
+ License: MIT
6
+ Requires-Python: >=3.11
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: yfinance>=0.2.0
10
+ Requires-Dist: pandas>=2.0.0
11
+ Requires-Dist: numpy>=1.26.0
12
+ Requires-Dist: requests>=2.31.0
13
+ Provides-Extra: dev
14
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
15
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
16
+ Dynamic: license-file
17
+
18
+ # 📊 EquityIQ
19
+
20
+ **EquityIQ** is a Python library for quantitative stock analysis. It provides a clean,
21
+ data-driven framework to evaluate stocks based purely on numbers — no noise, no opinions,
22
+ just metrics.
23
+
24
+ Built for data scientists and quantitative investors who want to replicate professional
25
+ financial analysis (Income Statement, FCF, ROIC, Valuation) directly in Python, with
26
+ the same rigor as an institutional Excel model.
27
+
28
+ ---
29
+
30
+ ## Features
31
+
32
+ - **Fundamental Analysis** — Income statement metrics, margins, Y/Y growth, CAGR,
33
+ working capital, free cash flow, ROIC and red flags detection
34
+ - **Projections** — 5-year forward projections with flexible per-year assumptions
35
+ for revenue growth, EBIT margin and tax rate
36
+ - **Multiples Valuation** — Historical and projected PER, EV/FCF, EV/EBITDA and EV/EBIT,
37
+ target prices per year, implied CAGR and buy price for a target return
38
+ - **Quantitative Signals** — Momentum (MA, RSI, 52w high/low), quality and valuation
39
+ signals aggregated into a BUY / HOLD / SELL score
40
+ - **Financial Health** — Liquidity, debt, profitability and growth ratios
41
+ - **Reports** — Full console report combining all modules
42
+
43
+ ---
44
+
45
+ ## Installation
46
+
47
+ ```bash
48
+ pip install equityiq
49
+ ```
50
+
51
+ ---
52
+
53
+ ## Quick Start
54
+
55
+ ```python
56
+ from equityiq.fundamental import FundamentalAnalyzer
57
+ from equityiq.projection import Projector
58
+ from equityiq.multiples_valuation import MultiplesValuation
59
+
60
+ # Step 1 — Historical analysis
61
+ fa = FundamentalAnalyzer("META")
62
+ fa.summary()
63
+
64
+ # Step 2 — Project the next 5 years
65
+ p = Projector("META", revenue_growth=0.20, ebit_margin=0.40, tax_rate=0.15)
66
+ p.summary()
67
+
68
+ # Step 3 — Valuation
69
+ mv = MultiplesValuation("META", projector=p,
70
+ per_target=25, ev_fcf_target=25,
71
+ ev_ebitda_target=17, ev_ebit_target=20)
72
+ mv.summary()
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Usage
78
+
79
+ ### Fundamental Analysis
80
+
81
+ ```python
82
+ from equityiq.fundamental import FundamentalAnalyzer
83
+
84
+ fa = FundamentalAnalyzer("AAPL")
85
+
86
+ fa.income_statement() # Revenue, EBITDA, EBIT, Net Income, EPS + margins and Y/Y growth
87
+ fa.is_cagr() # CAGR for key metrics across full available history
88
+ fa.free_cash_flow() # FCF built from scratch: EBITDA - CapEx - Taxes - ΔWC
89
+ fa.fcf_efficiency() # CapEx/Revenue, WC/Revenue, FCF margin, cash conversion
90
+ fa.capital_allocation() # CapEx expansion, acquisitions, repurchases, dividends as % of FCF
91
+ fa.invested_capital() # Invested capital components, ROIC and ROE
92
+ fa.red_flags() # SBC/Revenue, years with FCF < 0, poor ROIC, high leverage
93
+ fa.summary() # Full analysis in one call
94
+ ```
95
+
96
+ ### Projections
97
+
98
+ ```python
99
+ from equityiq.projection import Projector
100
+
101
+ # Single assumption for all years
102
+ p = Projector("AAPL", revenue_growth=0.10, ebit_margin=0.30, tax_rate=0.16)
103
+
104
+ # Different assumption for year 1, same for the rest
105
+ p = Projector("AAPL", revenue_growth=[0.15, 0.10], ebit_margin=0.30, tax_rate=0.16)
106
+
107
+ # One assumption per year
108
+ p = Projector("AAPL",
109
+ revenue_growth=[0.15, 0.12, 0.10, 0.09, 0.08],
110
+ ebit_margin=[0.28, 0.29, 0.30, 0.30, 0.31],
111
+ tax_rate=0.16)
112
+
113
+ p.assumptions() # Shows assumptions used per year
114
+ p.income_statement() # Projected IS for next 5 years
115
+ p.free_cash_flow() # Projected FCF for next 5 years
116
+ p.combined_view() # Historical + projected side by side
117
+ p.summary() # Full projection in one call
118
+ ```
119
+
120
+ ### Multiples Valuation
121
+
122
+ ```python
123
+ from equityiq.multiples_valuation import MultiplesValuation
124
+
125
+ mv = MultiplesValuation(
126
+ "AAPL",
127
+ projector=p, # Optional: pass a custom Projector
128
+ per_target=22, # Optional: if None, uses historical median
129
+ ev_fcf_target=25,
130
+ ev_ebitda_target=15,
131
+ ev_ebit_target=18,
132
+ )
133
+
134
+ mv.historical_multiples() # PER, EV/FCF, EV/EBITDA, EV/EBIT with median
135
+ mv.valuation_summary() # Multiples across historical and projected years
136
+ mv.target_prices() # Target price per year per multiple + CAGR
137
+ mv.buy_price_for_return(0.15) # Max buy price to achieve 15% annual return
138
+ mv.summary() # Full valuation in one call
139
+ ```
140
+
141
+ ### Quantitative Signals
142
+
143
+ ```python
144
+ from equityiq.signals import SignalAnalyzer
145
+
146
+ signals = SignalAnalyzer("AAPL")
147
+ signals.momentum_signals() # Price vs MA50/MA200, RSI, 52w high/low
148
+ signals.quality_signals() # FCF quality, revenue/earnings growth, margins
149
+ signals.valuation_signals() # P/E, P/B, PEG signals
150
+ signals.overall_score() # Score 0-100 + BUY / HOLD / SELL recommendation
151
+ ```
152
+
153
+ ### Financial Health
154
+
155
+ ```python
156
+ from equityiq.health import HealthAnalyzer
157
+
158
+ health = HealthAnalyzer("AAPL")
159
+ health.liquidity_ratios() # Current ratio, quick ratio
160
+ health.debt_ratios() # Debt/equity, interest coverage
161
+ health.profitability_ratios() # ROE, ROA, gross/operating/net margin
162
+ health.growth_ratios() # Revenue and earnings growth
163
+ health.summary() # All metrics in one DataFrame
164
+ ```
165
+
166
+ ### Full Report
167
+
168
+ ```python
169
+ from equityiq.report import Report
170
+
171
+ report = Report("AAPL")
172
+ report.summary() # Console report with health, valuation and signals
173
+ report.to_dict() # All metrics as a dictionary
174
+ report.to_dataframe() # Flat DataFrame for multi-stock comparison
175
+ ```
176
+
177
+ ### Compare Multiple Stocks
178
+
179
+ ```python
180
+ import pandas as pd
181
+ from equityiq.report import Report
182
+
183
+ tickers = ["AAPL", "MSFT", "GOOGL"]
184
+ frames = []
185
+
186
+ for t in tickers:
187
+ df = Report(t).to_dataframe()
188
+ df["ticker"] = t
189
+ frames.append(df)
190
+
191
+ comparison = pd.concat(frames).pivot_table(
192
+ index="metric", columns="ticker", values="value", aggfunc="first"
193
+ )
194
+ print(comparison)
195
+ ```
196
+
197
+ ---
198
+
199
+ ## Data Sources
200
+
201
+ EquityIQ uses [yfinance](https://github.com/ranaroussi/yfinance) to retrieve financial
202
+ data from Yahoo Finance. Data availability depends on the ticker and may vary.
203
+ Free tier provides up to 4 years of annual financial statements.
204
+
205
+ ---
206
+
207
+ ## Project Structure
208
+
209
+ - `src/equityiq/`
210
+ - `__init__.py`
211
+ - `data/`
212
+ - `__init__.py`
213
+ - `fetcher.py` — Data retrieval and cleaning
214
+ - `fundamental.py` — IS, FCF, ROIC, red flags
215
+ - `projection.py` — 5-year forward projections
216
+ - `multiples_valuation.py` — Target prices and implied returns
217
+ - `health.py` — Financial health ratios
218
+ - `valuation.py` — DCF and market multiples
219
+ - `signals.py` — Quantitative signals and score
220
+ - `report.py` — Full console report
221
+ - `tests/`
222
+ - `notebooks/`
223
+ - `demo.ipynb`
224
+
225
+ ---
226
+
227
+ ## Disclaimer
228
+
229
+ EquityIQ is intended for **educational and research purposes only**. Nothing in this
230
+ library constitutes financial advice. All projections and valuations are based on
231
+ simplified models and historical data. Always do your own research before making
232
+ any investment decision.
233
+
234
+ ---
235
+
236
+ ## License
237
+
238
+ MIT License — see [LICENSE](LICENSE) for details.
@@ -0,0 +1,221 @@
1
+ # 📊 EquityIQ
2
+
3
+ **EquityIQ** is a Python library for quantitative stock analysis. It provides a clean,
4
+ data-driven framework to evaluate stocks based purely on numbers — no noise, no opinions,
5
+ just metrics.
6
+
7
+ Built for data scientists and quantitative investors who want to replicate professional
8
+ financial analysis (Income Statement, FCF, ROIC, Valuation) directly in Python, with
9
+ the same rigor as an institutional Excel model.
10
+
11
+ ---
12
+
13
+ ## Features
14
+
15
+ - **Fundamental Analysis** — Income statement metrics, margins, Y/Y growth, CAGR,
16
+ working capital, free cash flow, ROIC and red flags detection
17
+ - **Projections** — 5-year forward projections with flexible per-year assumptions
18
+ for revenue growth, EBIT margin and tax rate
19
+ - **Multiples Valuation** — Historical and projected PER, EV/FCF, EV/EBITDA and EV/EBIT,
20
+ target prices per year, implied CAGR and buy price for a target return
21
+ - **Quantitative Signals** — Momentum (MA, RSI, 52w high/low), quality and valuation
22
+ signals aggregated into a BUY / HOLD / SELL score
23
+ - **Financial Health** — Liquidity, debt, profitability and growth ratios
24
+ - **Reports** — Full console report combining all modules
25
+
26
+ ---
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ pip install equityiq
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Quick Start
37
+
38
+ ```python
39
+ from equityiq.fundamental import FundamentalAnalyzer
40
+ from equityiq.projection import Projector
41
+ from equityiq.multiples_valuation import MultiplesValuation
42
+
43
+ # Step 1 — Historical analysis
44
+ fa = FundamentalAnalyzer("META")
45
+ fa.summary()
46
+
47
+ # Step 2 — Project the next 5 years
48
+ p = Projector("META", revenue_growth=0.20, ebit_margin=0.40, tax_rate=0.15)
49
+ p.summary()
50
+
51
+ # Step 3 — Valuation
52
+ mv = MultiplesValuation("META", projector=p,
53
+ per_target=25, ev_fcf_target=25,
54
+ ev_ebitda_target=17, ev_ebit_target=20)
55
+ mv.summary()
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Usage
61
+
62
+ ### Fundamental Analysis
63
+
64
+ ```python
65
+ from equityiq.fundamental import FundamentalAnalyzer
66
+
67
+ fa = FundamentalAnalyzer("AAPL")
68
+
69
+ fa.income_statement() # Revenue, EBITDA, EBIT, Net Income, EPS + margins and Y/Y growth
70
+ fa.is_cagr() # CAGR for key metrics across full available history
71
+ fa.free_cash_flow() # FCF built from scratch: EBITDA - CapEx - Taxes - ΔWC
72
+ fa.fcf_efficiency() # CapEx/Revenue, WC/Revenue, FCF margin, cash conversion
73
+ fa.capital_allocation() # CapEx expansion, acquisitions, repurchases, dividends as % of FCF
74
+ fa.invested_capital() # Invested capital components, ROIC and ROE
75
+ fa.red_flags() # SBC/Revenue, years with FCF < 0, poor ROIC, high leverage
76
+ fa.summary() # Full analysis in one call
77
+ ```
78
+
79
+ ### Projections
80
+
81
+ ```python
82
+ from equityiq.projection import Projector
83
+
84
+ # Single assumption for all years
85
+ p = Projector("AAPL", revenue_growth=0.10, ebit_margin=0.30, tax_rate=0.16)
86
+
87
+ # Different assumption for year 1, same for the rest
88
+ p = Projector("AAPL", revenue_growth=[0.15, 0.10], ebit_margin=0.30, tax_rate=0.16)
89
+
90
+ # One assumption per year
91
+ p = Projector("AAPL",
92
+ revenue_growth=[0.15, 0.12, 0.10, 0.09, 0.08],
93
+ ebit_margin=[0.28, 0.29, 0.30, 0.30, 0.31],
94
+ tax_rate=0.16)
95
+
96
+ p.assumptions() # Shows assumptions used per year
97
+ p.income_statement() # Projected IS for next 5 years
98
+ p.free_cash_flow() # Projected FCF for next 5 years
99
+ p.combined_view() # Historical + projected side by side
100
+ p.summary() # Full projection in one call
101
+ ```
102
+
103
+ ### Multiples Valuation
104
+
105
+ ```python
106
+ from equityiq.multiples_valuation import MultiplesValuation
107
+
108
+ mv = MultiplesValuation(
109
+ "AAPL",
110
+ projector=p, # Optional: pass a custom Projector
111
+ per_target=22, # Optional: if None, uses historical median
112
+ ev_fcf_target=25,
113
+ ev_ebitda_target=15,
114
+ ev_ebit_target=18,
115
+ )
116
+
117
+ mv.historical_multiples() # PER, EV/FCF, EV/EBITDA, EV/EBIT with median
118
+ mv.valuation_summary() # Multiples across historical and projected years
119
+ mv.target_prices() # Target price per year per multiple + CAGR
120
+ mv.buy_price_for_return(0.15) # Max buy price to achieve 15% annual return
121
+ mv.summary() # Full valuation in one call
122
+ ```
123
+
124
+ ### Quantitative Signals
125
+
126
+ ```python
127
+ from equityiq.signals import SignalAnalyzer
128
+
129
+ signals = SignalAnalyzer("AAPL")
130
+ signals.momentum_signals() # Price vs MA50/MA200, RSI, 52w high/low
131
+ signals.quality_signals() # FCF quality, revenue/earnings growth, margins
132
+ signals.valuation_signals() # P/E, P/B, PEG signals
133
+ signals.overall_score() # Score 0-100 + BUY / HOLD / SELL recommendation
134
+ ```
135
+
136
+ ### Financial Health
137
+
138
+ ```python
139
+ from equityiq.health import HealthAnalyzer
140
+
141
+ health = HealthAnalyzer("AAPL")
142
+ health.liquidity_ratios() # Current ratio, quick ratio
143
+ health.debt_ratios() # Debt/equity, interest coverage
144
+ health.profitability_ratios() # ROE, ROA, gross/operating/net margin
145
+ health.growth_ratios() # Revenue and earnings growth
146
+ health.summary() # All metrics in one DataFrame
147
+ ```
148
+
149
+ ### Full Report
150
+
151
+ ```python
152
+ from equityiq.report import Report
153
+
154
+ report = Report("AAPL")
155
+ report.summary() # Console report with health, valuation and signals
156
+ report.to_dict() # All metrics as a dictionary
157
+ report.to_dataframe() # Flat DataFrame for multi-stock comparison
158
+ ```
159
+
160
+ ### Compare Multiple Stocks
161
+
162
+ ```python
163
+ import pandas as pd
164
+ from equityiq.report import Report
165
+
166
+ tickers = ["AAPL", "MSFT", "GOOGL"]
167
+ frames = []
168
+
169
+ for t in tickers:
170
+ df = Report(t).to_dataframe()
171
+ df["ticker"] = t
172
+ frames.append(df)
173
+
174
+ comparison = pd.concat(frames).pivot_table(
175
+ index="metric", columns="ticker", values="value", aggfunc="first"
176
+ )
177
+ print(comparison)
178
+ ```
179
+
180
+ ---
181
+
182
+ ## Data Sources
183
+
184
+ EquityIQ uses [yfinance](https://github.com/ranaroussi/yfinance) to retrieve financial
185
+ data from Yahoo Finance. Data availability depends on the ticker and may vary.
186
+ Free tier provides up to 4 years of annual financial statements.
187
+
188
+ ---
189
+
190
+ ## Project Structure
191
+
192
+ - `src/equityiq/`
193
+ - `__init__.py`
194
+ - `data/`
195
+ - `__init__.py`
196
+ - `fetcher.py` — Data retrieval and cleaning
197
+ - `fundamental.py` — IS, FCF, ROIC, red flags
198
+ - `projection.py` — 5-year forward projections
199
+ - `multiples_valuation.py` — Target prices and implied returns
200
+ - `health.py` — Financial health ratios
201
+ - `valuation.py` — DCF and market multiples
202
+ - `signals.py` — Quantitative signals and score
203
+ - `report.py` — Full console report
204
+ - `tests/`
205
+ - `notebooks/`
206
+ - `demo.ipynb`
207
+
208
+ ---
209
+
210
+ ## Disclaimer
211
+
212
+ EquityIQ is intended for **educational and research purposes only**. Nothing in this
213
+ library constitutes financial advice. All projections and valuations are based on
214
+ simplified models and historical data. Always do your own research before making
215
+ any investment decision.
216
+
217
+ ---
218
+
219
+ ## License
220
+
221
+ MIT License — see [LICENSE](LICENSE) for details.
@@ -0,0 +1,29 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "equityiq"
7
+ version = "0.1.0"
8
+ description = "A Python library for quantitative analysis of stocks"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.11"
12
+ dependencies = [
13
+ "yfinance>=0.2.0",
14
+ "pandas>=2.0.0",
15
+ "numpy>=1.26.0",
16
+ "requests>=2.31.0",
17
+ ]
18
+
19
+ [project.optional-dependencies]
20
+ dev = [
21
+ "pytest>=7.0.0",
22
+ "pytest-cov>=4.0.0",
23
+ ]
24
+
25
+ [tool.pytest.ini_options]
26
+ testpaths = ["tests"]
27
+
28
+ [tool.setuptools.packages.find]
29
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,10 @@
1
+ from .health import HealthAnalyzer
2
+ from .valuation import ValuationAnalyzer
3
+ from .signals import SignalAnalyzer
4
+ from .report import Report
5
+ from .fundamental import FundamentalAnalyzer
6
+ from .projection import Projector
7
+ from .multiples_valuation import MultiplesValuation
8
+
9
+ __version__ = "0.1.0"
10
+ __author__ = "Marcos Salguero"
@@ -0,0 +1,9 @@
1
+ from .fetcher import (
2
+ get_stock_info,
3
+ get_price_history,
4
+ get_income_statement,
5
+ get_balance_sheet,
6
+ get_cash_flow,
7
+ get_financials,
8
+ get_full_data,
9
+ )