isoline 0.6.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.
- isoline-0.6.0/.gitignore +31 -0
- isoline-0.6.0/CHANGELOG.md +93 -0
- isoline-0.6.0/LICENSE +21 -0
- isoline-0.6.0/PKG-INFO +188 -0
- isoline-0.6.0/README.md +142 -0
- isoline-0.6.0/examples/README.md +8 -0
- isoline-0.6.0/isoline/__init__.py +32 -0
- isoline-0.6.0/isoline/__main__.py +4 -0
- isoline-0.6.0/isoline/branding.py +42 -0
- isoline-0.6.0/isoline/cli/app.py +816 -0
- isoline-0.6.0/isoline/core/brief.py +65 -0
- isoline-0.6.0/isoline/core/comparison.py +88 -0
- isoline-0.6.0/isoline/core/edgar.py +216 -0
- isoline-0.6.0/isoline/core/engines/flags.py +179 -0
- isoline-0.6.0/isoline/core/engines/growth.py +131 -0
- isoline-0.6.0/isoline/core/engines/health.py +237 -0
- isoline-0.6.0/isoline/core/engines/history.py +84 -0
- isoline-0.6.0/isoline/core/engines/quality.py +134 -0
- isoline-0.6.0/isoline/core/engines/valuation.py +111 -0
- isoline-0.6.0/isoline/core/errors.py +42 -0
- isoline-0.6.0/isoline/core/labels.py +182 -0
- isoline-0.6.0/isoline/core/loaders.py +243 -0
- isoline-0.6.0/isoline/core/result.py +135 -0
- isoline-0.6.0/isoline/core/scanner.py +83 -0
- isoline-0.6.0/isoline/core/screening.py +51 -0
- isoline-0.6.0/isoline/exporters/_safe.py +27 -0
- isoline-0.6.0/isoline/exporters/excel.py +1109 -0
- isoline-0.6.0/isoline/exporters/html_dashboard.py +30 -0
- isoline-0.6.0/isoline/exporters/powerbi.py +634 -0
- isoline-0.6.0/isoline/exporters/report.py +546 -0
- isoline-0.6.0/isoline/mcp/server.py +176 -0
- isoline-0.6.0/isoline/sdk/__init__.py +28 -0
- isoline-0.6.0/isoline/sdk/reconciler.py +57 -0
- isoline-0.6.0/legacy/telmus-shim/README.md +9 -0
- isoline-0.6.0/legacy/telmus-shim/pyproject.toml +23 -0
- isoline-0.6.0/pyproject.toml +87 -0
- isoline-0.6.0/tests/conftest.py +23 -0
- isoline-0.6.0/tests/fixtures/create_fixtures.py +27 -0
- isoline-0.6.0/tests/fixtures/infy_mock.py +103 -0
- isoline-0.6.0/tests/test_branding.py +20 -0
- isoline-0.6.0/tests/test_cli.py +57 -0
- isoline-0.6.0/tests/test_cli_commands.py +143 -0
- isoline-0.6.0/tests/test_edgar.py +109 -0
- isoline-0.6.0/tests/test_excel.py +122 -0
- isoline-0.6.0/tests/test_flags.py +59 -0
- isoline-0.6.0/tests/test_growth.py +38 -0
- isoline-0.6.0/tests/test_health.py +47 -0
- isoline-0.6.0/tests/test_loaders.py +159 -0
- isoline-0.6.0/tests/test_mcp_offline.py +62 -0
- isoline-0.6.0/tests/test_mcp_server.py +87 -0
- isoline-0.6.0/tests/test_powerbi.py +135 -0
- isoline-0.6.0/tests/test_robustness.py +287 -0
- isoline-0.6.0/tests/test_scores.py +411 -0
- isoline-0.6.0/tests/test_sdk.py +217 -0
- isoline-0.6.0/tests/test_valuation.py +43 -0
isoline-0.6.0/.gitignore
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.egg-info/
|
|
5
|
+
.venv/
|
|
6
|
+
venv/
|
|
7
|
+
build/
|
|
8
|
+
dist/
|
|
9
|
+
|
|
10
|
+
# Tooling caches
|
|
11
|
+
.pytest_cache/
|
|
12
|
+
.ruff_cache/
|
|
13
|
+
.mypy_cache/
|
|
14
|
+
.coverage
|
|
15
|
+
htmlcov/
|
|
16
|
+
site/
|
|
17
|
+
|
|
18
|
+
# Local environment and secrets
|
|
19
|
+
.env
|
|
20
|
+
.pypirc
|
|
21
|
+
|
|
22
|
+
# Generated reports and logs (the website page is tracked)
|
|
23
|
+
*.xlsx
|
|
24
|
+
*.html
|
|
25
|
+
!website/index.html
|
|
26
|
+
!docs/overrides/*.html
|
|
27
|
+
*.log
|
|
28
|
+
|
|
29
|
+
# OS
|
|
30
|
+
.DS_Store
|
|
31
|
+
Thumbs.db
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v0.6.0 (Isoline)
|
|
4
|
+
### Changed
|
|
5
|
+
- **Renamed from Telmus to Isoline.** New PyPI project `isoline`, command `isoline`, `import isoline`. Behaviour and formulas are unchanged. Environment variables are now `ISOLINE_*`; the old `TELMUS_*` names still work. The earlier `telmus` releases stay on PyPI; a final `telmus` release (see `legacy/telmus-shim`) installs `isoline` and keeps the old command and import working with a deprecation notice. Download counts of `telmus` do not transfer to `isoline`.
|
|
6
|
+
|
|
7
|
+
## v0.5.0
|
|
8
|
+
### Added
|
|
9
|
+
- **SEC EDGAR fallback.** When Yahoo Finance is rate-limited, unreachable or has no statements for a US ticker, Telmus now reads the official annual XBRL facts from SEC EDGAR (free, no key, polite rate limiting, declared User-Agent via `TELMUS_CONTACT`). Results are labelled with their source in the notes; there is no live price from this source, so valuation multiples are `n/a`. Non-US tickers do not fall back. `TELMUS_NO_FALLBACK=1` disables it. Tested offline against a fixture; not yet verified live.
|
|
10
|
+
- Data sources page rewritten with researched limits of the other free APIs (FMP, Alpha Vantage, Finnhub) and why they are not bundled.
|
|
11
|
+
|
|
12
|
+
## v0.4.4
|
|
13
|
+
### Fixed
|
|
14
|
+
- **`telmus compare` crashed** with `ValueError: I/O operation on closed file`. The two tickers are scanned concurrently and each scan silenced provider output with `contextlib.redirect_stdout`, which is process-wide; overlapping scans restored each other's streams in the wrong order and left `sys.stdout` closed. Output is now silenced by a ref-counted guard that restores the original streams exactly once. Regression test added.
|
|
15
|
+
- **compare**: the terminal table, CSV export and HTML report now share one definition (`telmus/core/comparison.py`). Valuation multiples are shown but never ranked; a missing value never wins; a real 0 is kept in CSV (only missing values are empty).
|
|
16
|
+
- The hidden `comp` alias now accepts `--export/--report/--no-report/--open/--no-open`; company names with spaces produce valid file names; `scan --json` prints raw JSON (no wrapping or markup).
|
|
17
|
+
- New end-to-end test file covering every command with a mocked provider.
|
|
18
|
+
|
|
19
|
+
## v0.4.3
|
|
20
|
+
### Changed
|
|
21
|
+
- **Repository layout.** The root now holds only standard files (README, LICENSE, CHANGELOG, CONTRIBUTING, CODE_OF_CONDUCT, SECURITY, pyproject, mkdocs.yml). Project docs moved to `docs/project/` (architecture, data sources, release process, roadmap, growth plan) and internal notes to `docs/internal/` (kept out of the published site). The Streamlit app moved from `dashboard/` to `examples/`. Removed `scripts/capture.py` (a one-off screenshot helper with hard-coded personal paths) and an unused logo file. `.gitignore` reorganised and now ignores `.pypirc`.
|
|
22
|
+
|
|
23
|
+
## v0.4.2
|
|
24
|
+
### Changed
|
|
25
|
+
- **Report fonts and charts.** Headings use Times New Roman and numbers use a lining, tabular sans-serif (Georgia's old-style digits made figures look uneven). Scan reports now include two inline-SVG charts built from up to four fiscal years of real statement data, matched by date: revenue and net income with operating margin, and net income vs operating cash flow vs free cash flow. A year that was not reported has no bar (never a zero bar). New `history` field in the JSON output.
|
|
26
|
+
- **Docs site.** New Reports page; Architecture, Data sources, Release process, Roadmap and Changelog are now published in the docs navigation (a test keeps the root files and their docs copies identical and checks that every page is in the nav). The docs workflow builds with `--strict` before deploying.
|
|
27
|
+
- Website and README text updated to describe the report accurately (no more "interactive dashboard with gauges, radar charts"; no CDN claim).
|
|
28
|
+
|
|
29
|
+
## v0.4.1
|
|
30
|
+
### Changed
|
|
31
|
+
- **Reports rebuilt.** The HTML scan, compare and screen reports are now formal, print-ready documents: light layout, serif headings, tables with "what it measures" columns, status words (Strong / Adequate / Weak / n/a) instead of colour alone, a Piotroski signal table, notes explaining every n/a, and a disclaimer. They are fully self-contained (no JavaScript, no Chart.js CDN, no web fonts, no logo lookups), so they look the same offline and print cleanly. This also fixes the misaligned, differently sized gauges.
|
|
32
|
+
- **Speed.** Statements are fetched concurrently (about the slowest request instead of the sum of four); `compare` scans both tickers at the same time; the unused `fast_info` request and the per-report logo lookup (an extra network call) are gone.
|
|
33
|
+
|
|
34
|
+
## v0.4.0
|
|
35
|
+
### Fixed (reports, docs, screening: found in a second, deeper audit)
|
|
36
|
+
- **HTML report** showed missing data as `0` (P/E 0.0, "HEALTH: WEAK", "GROWTH: DECLINING", "VALUATION: FAIR", "Beneish 0.00 = low manipulation risk") and unavailable Piotroski signals as failures. It now shows `n/a`, "N/A" badges and neutral signal markers. The header said v0.2.6 and the footer printed a literal `{telmus_version}`; both now show the real version.
|
|
37
|
+
- **Excel report** header said v0.1.0, used the old Altman thresholds (2.99/1.81) and showed "ok" for n/a rows; now correct, with the n/a reasons listed on the Summary sheet.
|
|
38
|
+
- **Power BI** radar scored a missing leverage as a perfect 10 and other gaps as 0; gaps are now blank.
|
|
39
|
+
- **screen**: an unknown sector silently screened IT; now exit code 2 with the valid sectors. Tickers that fail are reported as skipped with the reason instead of vanishing. The MCP `screen` tool scanned bare symbols (US listings) instead of NSE tickers; it now shares the CLI's universe.
|
|
40
|
+
- **MCP** `scan_ticker` ignored its `exchange` argument; it now applies it (`INFY` + `NSE` = `INFY.NS`).
|
|
41
|
+
- **CLI**: `telmus check` printed "n/a" for a legitimate score of 0; percentages now display as percentages; n/a rows show an n/a status, not "ok".
|
|
42
|
+
- Summary text no longer says "Suitable for DCF or comparable company analysis" (that read as a recommendation) and has correct capitalisation; "AI Analyst Brief" renamed "Summary (rule-based)" because it is not AI.
|
|
43
|
+
- Website showed real companies (INFY, AAPL, RELIANCE, MSFT) with numbers from the pre-fix formulas; replaced with clearly labelled synthetic samples. Removed the unverifiable "50,000+ tickers" claim and the wrong "Python 3.9+".
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
- `from telmus import scan, compare, TelmusScanner, ScanResult` now works as documented (lazy import). `telmus.sdk` exports the error classes.
|
|
47
|
+
- Docs rewritten from the actual behaviour: SDK, CLI, MCP (stdio, not a port), Quickstart, homepage. They previously described methods and options that did not exist and showed invented example numbers.
|
|
48
|
+
|
|
49
|
+
## v0.3.3
|
|
50
|
+
### Added
|
|
51
|
+
- **Quality metrics** (`ScanResult.quality`, CLI "Quality" table, HTML report section): DuPont ROE decomposition, ROIC, free-cash-flow margin and FCF/net income, accruals ratio, DSO/DIO/DPO, cash conversion cycle, share-count change. Formulas in `docs/methodology.md`; missing inputs give n/a with a note.
|
|
52
|
+
- Release safeguards: `RELEASES_DISABLED` kill switch, PyPI version-conflict check, post-release smoke test (see Release process).
|
|
53
|
+
- Project docs: ROADMAP, ARCHITECTURE, DATA_SOURCES, RELEASE_PROCESS, BUSINESS_STRATEGY, COMPETITOR_RESEARCH, PROJECT_STATUS.
|
|
54
|
+
|
|
55
|
+
## v0.3.2
|
|
56
|
+
First published release containing everything below (tags v0.3.0 and v0.3.1 were created but never published; the release workflow now supports PyPI Trusted Publishing).
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
- **Install:** `pip install telmus` produced a CLI that crashed on every command when pip picked `mcp` 2.x. `mcp` is now an optional extra (`pip install "telmus[mcp]"`, pinned `<2`); the CLI no longer imports it unless you run `telmus serve`.
|
|
60
|
+
- **Beneish M-score** was not Beneish's model (DSRI was a gross-margin ratio, LVGI used interest expense, TATA had the wrong sign and denominator) and returned nothing on current yfinance data. Rewritten per the paper, with hand-computed tests. **Reported M-scores change.**
|
|
61
|
+
- **Altman Z″** now uses book equity / total liabilities as in the paper (was market cap), and no longer falls back to total equity or zero when retained earnings are missing. **Reported Z-scores change.**
|
|
62
|
+
- **Piotroski F-score** follows the paper (beginning-of-year assets, long-term debt / average assets, share count instead of par value). A missing signal now withholds the score instead of counting as a fail. **Reported F-scores change.**
|
|
63
|
+
- yfinance row names: both legacy and current labels are supported (previously Beneish and D/E silently returned nothing).
|
|
64
|
+
- Free-cash-flow flag mis-added capex when yfinance reports it as a negative number.
|
|
65
|
+
- Valuation: `Series or Series` crash when a "Cash" row existed; invented peer comparison removed (`vs_sector` is now `n/a`).
|
|
66
|
+
- HTML reports escape company names and other third-party text.
|
|
67
|
+
- Interest coverage no longer substitutes EBITDA for EBIT; negative equity no longer yields a negative debt/equity.
|
|
68
|
+
|
|
69
|
+
### Added
|
|
70
|
+
- `telmus --version`, `--debug`; `scan`/`compare` accept `--no-report` and `--no-open`.
|
|
71
|
+
- Friendly errors with hints and exit codes (0 ok, 1 no data/error, 2 usage, 3 network); no tracebacks unless `--debug`.
|
|
72
|
+
- Ticker validation; automatic retry with backoff for network and rate-limit errors.
|
|
73
|
+
- `notes` in scan results explaining every `n/a`; disclaimer in CLI output.
|
|
74
|
+
- 40+ new tests (hand-computed formulas, errors, retries, escaping); tests run offline.
|
|
75
|
+
- CI on Windows, macOS and Linux for Python 3.10-3.13, with clean-wheel install checks; release workflow checks tag == version.
|
|
76
|
+
- docs/methodology.md, CONTRIBUTING, CODE_OF_CONDUCT, issue and PR templates.
|
|
77
|
+
|
|
78
|
+
### Changed
|
|
79
|
+
- Minimum Python is 3.10 (the previous 3.9 claim was untrue: `mcp` needs 3.10).
|
|
80
|
+
- Version has a single source: `telmus/__init__.py`.
|
|
81
|
+
- Removed one-off scripts from `scripts/` and a scratch network script from `tests/`.
|
|
82
|
+
|
|
83
|
+
## v0.2.6
|
|
84
|
+
- Metadata audit.
|
|
85
|
+
|
|
86
|
+
## v0.2.3
|
|
87
|
+
- MCP server stability improvements, sector screener, HTML dashboard print support.
|
|
88
|
+
|
|
89
|
+
## v0.2.0
|
|
90
|
+
- Beneish M-score engine, Excel report generation, HTML dashboard.
|
|
91
|
+
|
|
92
|
+
## v0.1.0
|
|
93
|
+
- Initial release: Piotroski F-score, Altman Z-score; CLI scan, compare, check, serve.
|
isoline-0.6.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Shubh Wade
|
|
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.
|
isoline-0.6.0/PKG-INFO
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: isoline
|
|
3
|
+
Version: 0.6.0
|
|
4
|
+
Summary: Financial statement analysis CLI: Piotroski F, Altman Z, Beneish M, ratios, Excel and HTML reports, optional MCP server
|
|
5
|
+
Project-URL: Homepage, https://shubhwade.github.io/isoline
|
|
6
|
+
Project-URL: Documentation, https://shubhwade.github.io/isoline
|
|
7
|
+
Project-URL: Repository, https://github.com/shubhwade/isoline
|
|
8
|
+
Project-URL: Changelog, https://shubhwade.github.io/isoline/changelog/
|
|
9
|
+
Author-email: Shubh Wade <shubhwade@gmail.com>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: ai,finance,financial-analysis,financial-modeling,python
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Topic :: Office/Business :: Financial
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Requires-Dist: numpy>=1.24
|
|
26
|
+
Requires-Dist: openpyxl>=3.0
|
|
27
|
+
Requires-Dist: pandas>=2.0.0
|
|
28
|
+
Requires-Dist: rich>=13.0.0
|
|
29
|
+
Requires-Dist: typer>=0.9.0
|
|
30
|
+
Requires-Dist: yfinance>=0.2.40
|
|
31
|
+
Provides-Extra: dev
|
|
32
|
+
Requires-Dist: bandit; extra == 'dev'
|
|
33
|
+
Requires-Dist: build; extra == 'dev'
|
|
34
|
+
Requires-Dist: mcp<2,>=1.20; extra == 'dev'
|
|
35
|
+
Requires-Dist: mkdocs-material; extra == 'dev'
|
|
36
|
+
Requires-Dist: mkdocstrings[python]; extra == 'dev'
|
|
37
|
+
Requires-Dist: mypy; extra == 'dev'
|
|
38
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
39
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
40
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
41
|
+
Requires-Dist: streamlit; extra == 'dev'
|
|
42
|
+
Requires-Dist: twine; extra == 'dev'
|
|
43
|
+
Provides-Extra: mcp
|
|
44
|
+
Requires-Dist: mcp<2,>=1.20; extra == 'mcp'
|
|
45
|
+
Description-Content-Type: text/markdown
|
|
46
|
+
|
|
47
|
+
# isoline
|
|
48
|
+
|
|
49
|
+
[](https://pypi.org/project/isoline/)
|
|
50
|
+
[](https://pepy.tech/projects/isoline)
|
|
51
|
+
[](https://pypi.org/project/isoline/)
|
|
52
|
+
[](https://github.com/shubhwade/isoline/actions/workflows/ci.yml)
|
|
53
|
+
[](LICENSE)
|
|
54
|
+
|
|
55
|
+
**Financial-statement analysis from your terminal.** One command gives you the Piotroski F-score,
|
|
56
|
+
Altman Z″-score, Beneish M-score, key ratios and red flags for a listed company, plus an Excel
|
|
57
|
+
workbook and a print-ready HTML report. An optional MCP server exposes the same analysis to AI coding tools.
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
pip install isoline
|
|
61
|
+
isoline scan AAPL
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Install
|
|
65
|
+
|
|
66
|
+
Works on Windows 10/11, macOS and Linux with **Python 3.10 or newer**.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install isoline # or, keeping it isolated: pipx install isoline
|
|
70
|
+
isoline --version
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Optional MCP server for Claude Desktop, Cursor, Windsurf and similar tools:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
pip install "isoline[mcp]"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
If `pip` is not found, use `python -m pip install isoline` (Windows: `py -m pip install isoline`).
|
|
80
|
+
Upgrade with `pip install -U isoline`.
|
|
81
|
+
|
|
82
|
+
## Quick start
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
isoline scan AAPL # tables in the terminal + Excel and HTML reports
|
|
86
|
+
isoline scan INFY.NS --no-report # terminal only: no files written, no browser opened
|
|
87
|
+
isoline scan MSFT --json # machine-readable output
|
|
88
|
+
isoline scan AAPL --export aapl.csv # .json, .csv or .xlsx
|
|
89
|
+
isoline compare AAPL MSFT # side by side
|
|
90
|
+
isoline check TSLA # just the health scores
|
|
91
|
+
isoline --help
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Tickers use Yahoo Finance symbols. Outside the US add the exchange suffix: `INFY.NS` (NSE),
|
|
95
|
+
`RELIANCE.BO` (BSE), `VOD.L` (London), `SAP.DE` (Xetra).
|
|
96
|
+
|
|
97
|
+
Sample output (a **synthetic** company with deliberately incomplete data, real formatting):
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
───────────────────── Acme Corp (synthetic) — ACME — DEMO ─────────────────────
|
|
101
|
+
┏━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━┓
|
|
102
|
+
┃ Engine ┃ Metric ┃ Value ┃ Status ┃
|
|
103
|
+
┡━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━┩
|
|
104
|
+
│ Health │ Piotroski F-score │ 8 │ ok │
|
|
105
|
+
│ Health │ Altman Z-score │ 4.65 │ ok │
|
|
106
|
+
│ Health │ Current ratio │ 2.00 │ ok │
|
|
107
|
+
└────────┴───────────────────┴───────┴────────┘
|
|
108
|
+
Note: ROIC not reported: effective tax rate unavailable (no rate is assumed).
|
|
109
|
+
Screening statistics from public data (Yahoo Finance); not investment advice.
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## What it computes
|
|
113
|
+
|
|
114
|
+
| Area | Metrics |
|
|
115
|
+
|---|---|
|
|
116
|
+
| Health | Piotroski F-score (9 signals), Altman Z″-score, liabilities/equity, current ratio, interest coverage |
|
|
117
|
+
| Earnings quality | Beneish M-score (8 variables), negative-equity and free-cash-flow flags |
|
|
118
|
+
| Valuation | P/E, P/B, EV/EBITDA |
|
|
119
|
+
| Growth | 3-year revenue and profit CAGR, operating-margin trend, FCF yield |
|
|
120
|
+
| Quality | DuPont ROE, ROIC, FCF margin, accruals ratio, cash conversion cycle, share dilution |
|
|
121
|
+
|
|
122
|
+
Formulas, sources and limits are in [docs/methodology.md](docs/methodology.md).
|
|
123
|
+
|
|
124
|
+
**Missing data is never turned into a zero.** If an input is not available the metric shows `n/a`
|
|
125
|
+
and a note says why. A score is only shown when everything it needs is present. Banks and insurers
|
|
126
|
+
get `n/a` for Altman and Beneish because those models do not apply to them.
|
|
127
|
+
|
|
128
|
+
## Exit codes
|
|
129
|
+
|
|
130
|
+
| Code | Meaning |
|
|
131
|
+
|---|---|
|
|
132
|
+
| 0 | Success |
|
|
133
|
+
| 1 | No data for that ticker, or an unexpected error (re-run with `--debug`) |
|
|
134
|
+
| 2 | Bad usage, e.g. an invalid ticker |
|
|
135
|
+
| 3 | Yahoo Finance unreachable or rate-limiting |
|
|
136
|
+
|
|
137
|
+
## Troubleshooting
|
|
138
|
+
|
|
139
|
+
| Problem | Fix |
|
|
140
|
+
|---|---|
|
|
141
|
+
| `isoline: command not found` | Open a new terminal; with pip use `python -m isoline`, or install with `pipx` |
|
|
142
|
+
| `No financial data available` | Check the symbol on finance.yahoo.com and add the exchange suffix |
|
|
143
|
+
| Rate limited / unreachable | Wait a few minutes; check proxy/VPN. Isoline retries 3 times automatically |
|
|
144
|
+
| `isoline serve` says it needs an extra | `pip install "isoline[mcp]"` |
|
|
145
|
+
| Anything else | `isoline --debug scan AAPL` and open an issue with the output |
|
|
146
|
+
|
|
147
|
+
The HTML report is fully self-contained (no scripts, fonts or CDN), so it opens and prints the same offline.
|
|
148
|
+
|
|
149
|
+
## MCP server (optional)
|
|
150
|
+
|
|
151
|
+
```json
|
|
152
|
+
{ "mcpServers": { "isoline": { "command": "isoline", "args": ["serve"] } } }
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Data and limitations
|
|
156
|
+
|
|
157
|
+
Data comes from Yahoo Finance through [yfinance](https://github.com/ranaroussi/yfinance), an
|
|
158
|
+
unofficial interface: coverage differs by company, figures can be restated or missing, and use is
|
|
159
|
+
subject to Yahoo's terms. Statements are annual, in the company's reporting currency. Sector peer
|
|
160
|
+
comparison is not implemented. Scores are screening statistics, **not investment advice**.
|
|
161
|
+
|
|
162
|
+
## Development
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
git clone https://github.com/shubhwade/isoline && cd isoline
|
|
166
|
+
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
|
|
167
|
+
pip install -e ".[dev]"
|
|
168
|
+
ruff check isoline tests && mypy && pytest
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Tests never use the live internet unless marked `network`.
|
|
172
|
+
|
|
173
|
+
### Repository layout
|
|
174
|
+
|
|
175
|
+
```text
|
|
176
|
+
isoline/ the package (cli/, core/ engines, exporters/, mcp/, sdk/)
|
|
177
|
+
tests/ offline test suite
|
|
178
|
+
docs/ documentation site (MkDocs): guides, methodology, project docs
|
|
179
|
+
examples/ runnable examples (Streamlit app)
|
|
180
|
+
website/ the landing page
|
|
181
|
+
.github/ CI, release and docs workflows, issue/PR templates
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Architecture, data sources, the release process and the roadmap are in [docs/project](docs/project/).
|
|
185
|
+
|
|
186
|
+
## License
|
|
187
|
+
|
|
188
|
+
MIT, see [LICENSE](LICENSE).
|
isoline-0.6.0/README.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# isoline
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/isoline/)
|
|
4
|
+
[](https://pepy.tech/projects/isoline)
|
|
5
|
+
[](https://pypi.org/project/isoline/)
|
|
6
|
+
[](https://github.com/shubhwade/isoline/actions/workflows/ci.yml)
|
|
7
|
+
[](LICENSE)
|
|
8
|
+
|
|
9
|
+
**Financial-statement analysis from your terminal.** One command gives you the Piotroski F-score,
|
|
10
|
+
Altman Z″-score, Beneish M-score, key ratios and red flags for a listed company, plus an Excel
|
|
11
|
+
workbook and a print-ready HTML report. An optional MCP server exposes the same analysis to AI coding tools.
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install isoline
|
|
15
|
+
isoline scan AAPL
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Install
|
|
19
|
+
|
|
20
|
+
Works on Windows 10/11, macOS and Linux with **Python 3.10 or newer**.
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install isoline # or, keeping it isolated: pipx install isoline
|
|
24
|
+
isoline --version
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Optional MCP server for Claude Desktop, Cursor, Windsurf and similar tools:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
pip install "isoline[mcp]"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
If `pip` is not found, use `python -m pip install isoline` (Windows: `py -m pip install isoline`).
|
|
34
|
+
Upgrade with `pip install -U isoline`.
|
|
35
|
+
|
|
36
|
+
## Quick start
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
isoline scan AAPL # tables in the terminal + Excel and HTML reports
|
|
40
|
+
isoline scan INFY.NS --no-report # terminal only: no files written, no browser opened
|
|
41
|
+
isoline scan MSFT --json # machine-readable output
|
|
42
|
+
isoline scan AAPL --export aapl.csv # .json, .csv or .xlsx
|
|
43
|
+
isoline compare AAPL MSFT # side by side
|
|
44
|
+
isoline check TSLA # just the health scores
|
|
45
|
+
isoline --help
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Tickers use Yahoo Finance symbols. Outside the US add the exchange suffix: `INFY.NS` (NSE),
|
|
49
|
+
`RELIANCE.BO` (BSE), `VOD.L` (London), `SAP.DE` (Xetra).
|
|
50
|
+
|
|
51
|
+
Sample output (a **synthetic** company with deliberately incomplete data, real formatting):
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
───────────────────── Acme Corp (synthetic) — ACME — DEMO ─────────────────────
|
|
55
|
+
┏━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━┓
|
|
56
|
+
┃ Engine ┃ Metric ┃ Value ┃ Status ┃
|
|
57
|
+
┡━━━━━━━━╇━━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━┩
|
|
58
|
+
│ Health │ Piotroski F-score │ 8 │ ok │
|
|
59
|
+
│ Health │ Altman Z-score │ 4.65 │ ok │
|
|
60
|
+
│ Health │ Current ratio │ 2.00 │ ok │
|
|
61
|
+
└────────┴───────────────────┴───────┴────────┘
|
|
62
|
+
Note: ROIC not reported: effective tax rate unavailable (no rate is assumed).
|
|
63
|
+
Screening statistics from public data (Yahoo Finance); not investment advice.
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## What it computes
|
|
67
|
+
|
|
68
|
+
| Area | Metrics |
|
|
69
|
+
|---|---|
|
|
70
|
+
| Health | Piotroski F-score (9 signals), Altman Z″-score, liabilities/equity, current ratio, interest coverage |
|
|
71
|
+
| Earnings quality | Beneish M-score (8 variables), negative-equity and free-cash-flow flags |
|
|
72
|
+
| Valuation | P/E, P/B, EV/EBITDA |
|
|
73
|
+
| Growth | 3-year revenue and profit CAGR, operating-margin trend, FCF yield |
|
|
74
|
+
| Quality | DuPont ROE, ROIC, FCF margin, accruals ratio, cash conversion cycle, share dilution |
|
|
75
|
+
|
|
76
|
+
Formulas, sources and limits are in [docs/methodology.md](docs/methodology.md).
|
|
77
|
+
|
|
78
|
+
**Missing data is never turned into a zero.** If an input is not available the metric shows `n/a`
|
|
79
|
+
and a note says why. A score is only shown when everything it needs is present. Banks and insurers
|
|
80
|
+
get `n/a` for Altman and Beneish because those models do not apply to them.
|
|
81
|
+
|
|
82
|
+
## Exit codes
|
|
83
|
+
|
|
84
|
+
| Code | Meaning |
|
|
85
|
+
|---|---|
|
|
86
|
+
| 0 | Success |
|
|
87
|
+
| 1 | No data for that ticker, or an unexpected error (re-run with `--debug`) |
|
|
88
|
+
| 2 | Bad usage, e.g. an invalid ticker |
|
|
89
|
+
| 3 | Yahoo Finance unreachable or rate-limiting |
|
|
90
|
+
|
|
91
|
+
## Troubleshooting
|
|
92
|
+
|
|
93
|
+
| Problem | Fix |
|
|
94
|
+
|---|---|
|
|
95
|
+
| `isoline: command not found` | Open a new terminal; with pip use `python -m isoline`, or install with `pipx` |
|
|
96
|
+
| `No financial data available` | Check the symbol on finance.yahoo.com and add the exchange suffix |
|
|
97
|
+
| Rate limited / unreachable | Wait a few minutes; check proxy/VPN. Isoline retries 3 times automatically |
|
|
98
|
+
| `isoline serve` says it needs an extra | `pip install "isoline[mcp]"` |
|
|
99
|
+
| Anything else | `isoline --debug scan AAPL` and open an issue with the output |
|
|
100
|
+
|
|
101
|
+
The HTML report is fully self-contained (no scripts, fonts or CDN), so it opens and prints the same offline.
|
|
102
|
+
|
|
103
|
+
## MCP server (optional)
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{ "mcpServers": { "isoline": { "command": "isoline", "args": ["serve"] } } }
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Data and limitations
|
|
110
|
+
|
|
111
|
+
Data comes from Yahoo Finance through [yfinance](https://github.com/ranaroussi/yfinance), an
|
|
112
|
+
unofficial interface: coverage differs by company, figures can be restated or missing, and use is
|
|
113
|
+
subject to Yahoo's terms. Statements are annual, in the company's reporting currency. Sector peer
|
|
114
|
+
comparison is not implemented. Scores are screening statistics, **not investment advice**.
|
|
115
|
+
|
|
116
|
+
## Development
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
git clone https://github.com/shubhwade/isoline && cd isoline
|
|
120
|
+
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
|
|
121
|
+
pip install -e ".[dev]"
|
|
122
|
+
ruff check isoline tests && mypy && pytest
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Tests never use the live internet unless marked `network`.
|
|
126
|
+
|
|
127
|
+
### Repository layout
|
|
128
|
+
|
|
129
|
+
```text
|
|
130
|
+
isoline/ the package (cli/, core/ engines, exporters/, mcp/, sdk/)
|
|
131
|
+
tests/ offline test suite
|
|
132
|
+
docs/ documentation site (MkDocs): guides, methodology, project docs
|
|
133
|
+
examples/ runnable examples (Streamlit app)
|
|
134
|
+
website/ the landing page
|
|
135
|
+
.github/ CI, release and docs workflows, issue/PR templates
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Architecture, data sources, the release process and the roadmap are in [docs/project](docs/project/).
|
|
139
|
+
|
|
140
|
+
## License
|
|
141
|
+
|
|
142
|
+
MIT, see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""isoline: financial statement analysis (Piotroski F, Altman Z'', Beneish M, quality ratios).
|
|
2
|
+
|
|
3
|
+
Public Python API (imported lazily so ``import isoline`` stays fast)::
|
|
4
|
+
|
|
5
|
+
from isoline import scan, compare, IsolineScanner, ScanResult
|
|
6
|
+
result = scan("AAPL")
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import typing
|
|
12
|
+
|
|
13
|
+
__version__ = "0.6.0"
|
|
14
|
+
|
|
15
|
+
__all__ = ["CompareResult", "ScanResult", "IsolineScanner", "__version__", "compare", "scan"]
|
|
16
|
+
|
|
17
|
+
_LAZY = {
|
|
18
|
+
"scan": ("isoline.sdk", "scan"),
|
|
19
|
+
"compare": ("isoline.sdk", "compare"),
|
|
20
|
+
"IsolineScanner": ("isoline.sdk", "IsolineScanner"),
|
|
21
|
+
"ScanResult": ("isoline.core.result", "ScanResult"),
|
|
22
|
+
"CompareResult": ("isoline.core.result", "CompareResult"),
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def __getattr__(name: str) -> typing.Any:
|
|
27
|
+
if name in _LAZY:
|
|
28
|
+
import importlib
|
|
29
|
+
|
|
30
|
+
module, attr = _LAZY[name]
|
|
31
|
+
return getattr(importlib.import_module(module), attr)
|
|
32
|
+
raise AttributeError(f"module 'isoline' has no attribute {name!r}")
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""Central brand configuration: the one place that names the product.
|
|
2
|
+
|
|
3
|
+
A rename is implemented by changing this file plus the items in
|
|
4
|
+
docs/project/brand-migration.md (package directory, pyproject, workflows, URLs).
|
|
5
|
+
Code that prints the product name reads it from here so strings cannot drift.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from dataclasses import dataclass
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@dataclass(frozen=True)
|
|
14
|
+
class Brand:
|
|
15
|
+
name: str # display name
|
|
16
|
+
package: str # PyPI distribution name
|
|
17
|
+
module: str # import name
|
|
18
|
+
command: str # console script
|
|
19
|
+
tagline: str
|
|
20
|
+
repo_url: str
|
|
21
|
+
docs_url: str
|
|
22
|
+
legacy_package: str | None = None # kept on PyPI; points users to the successor
|
|
23
|
+
successor_package: str | None = None
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
BRAND = Brand(
|
|
27
|
+
name="Isoline",
|
|
28
|
+
package="isoline",
|
|
29
|
+
module="isoline",
|
|
30
|
+
command="isoline",
|
|
31
|
+
tagline="Financial statements, measured precisely",
|
|
32
|
+
repo_url="https://github.com/shubhwade/isoline",
|
|
33
|
+
docs_url="https://shubhwade.github.io/isoline/",
|
|
34
|
+
legacy_package="telmus",
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def env(name: str, default: str = "") -> str:
|
|
39
|
+
"""Read ISOLINE_<name>, falling back to the legacy TELMUS_<name> variable."""
|
|
40
|
+
import os
|
|
41
|
+
|
|
42
|
+
return os.environ.get(f"ISOLINE_{name}") or os.environ.get(f"TELMUS_{name}") or default
|