|
| 1 | +# Contributing to Capital Markets Intelligence Platform |
| 2 | + |
| 3 | +Thank you for your interest in contributing! This project is open to contributions from anyone with an interest in quantitative finance, data engineering, or Python development. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## 📋 Table of Contents |
| 8 | + |
| 9 | +- [Getting Started](#getting-started) |
| 10 | +- [Development Workflow](#development-workflow) |
| 11 | +- [Project Structure](#project-structure) |
| 12 | +- [Coding Style](#coding-style) |
| 13 | +- [How to Propose Changes](#how-to-propose-changes) |
| 14 | +- [Good First Issues](#good-first-issues) |
| 15 | +- [Need Help?](#need-help) |
| 16 | + |
| 17 | +--- |
| 18 | + |
| 19 | +## Getting Started |
| 20 | + |
| 21 | +### 1. Fork & Clone |
| 22 | + |
| 23 | +```bash |
| 24 | +git clone https://github.com/YOUR_USERNAME/capital-markets-intelligence.git |
| 25 | +cd capital-markets-intelligence |
| 26 | +``` |
| 27 | + |
| 28 | +### 2. Set Up Environment |
| 29 | + |
| 30 | +Requires **Python 3.10+** (developed on 3.13). |
| 31 | + |
| 32 | +```bash |
| 33 | +python -m venv venv |
| 34 | +source venv/bin/activate # Mac/Linux |
| 35 | +# venv\Scripts\activate # Windows |
| 36 | +pip install -r requirements.txt |
| 37 | +``` |
| 38 | + |
| 39 | +### 3. Run a Minimal Pipeline (Quick Validation) |
| 40 | + |
| 41 | +You don't need to run all 13 scripts to test your changes. A fast subset: |
| 42 | + |
| 43 | +```bash |
| 44 | +python scripts/01_fetch_ipo_data.py |
| 45 | +python scripts/05_fetch_sovereign_data.py |
| 46 | +python scripts/10_advanced_analysis.py |
| 47 | +python scripts/11_generate_plotly_dashboards.py |
| 48 | +``` |
| 49 | + |
| 50 | +### 4. Verify Outputs |
| 51 | + |
| 52 | +After running, check that: |
| 53 | +- `data/processed/` contains updated CSVs |
| 54 | +- `output/dashboards/` contains `.html` files you can open in a browser |
| 55 | + |
| 56 | +--- |
| 57 | + |
| 58 | +## Development Workflow |
| 59 | + |
| 60 | +1. **Find or open an issue** — check the [Issues](https://github.com/DogInfantry/capital-markets-intelligence/issues) tab. Look for `good first issue` or `help wanted` labels. |
| 61 | +2. **Comment on the issue** to say you're working on it (avoids duplicate work). |
| 62 | +3. **Create a branch** from `main`: |
| 63 | + ```bash |
| 64 | + git checkout -b feature/your-feature-name |
| 65 | + # or |
| 66 | + git checkout -b fix/your-bug-fix |
| 67 | + ``` |
| 68 | +4. **Make your changes**, commit with clear messages (see below). |
| 69 | +5. **Open a Pull Request** against `main` using the PR template. |
| 70 | +6. **Respond to review** — we aim to review PRs within 48–72 hours. |
| 71 | + |
| 72 | +### Commit Message Format |
| 73 | + |
| 74 | +We follow [Conventional Commits](https://www.conventionalcommits.org/): |
| 75 | + |
| 76 | +``` |
| 77 | +feat: add logistic regression to M&A deal screening |
| 78 | +fix: handle missing yield curve data for short-dated tenors |
| 79 | +docs: add Scenario Cookbook for IPO event study |
| 80 | +refactor: extract CSV loading helpers to utils module |
| 81 | +test: add golden-data test for sovereign risk index |
| 82 | +chore: update requirements.txt with yfinance and plotly |
| 83 | +``` |
| 84 | + |
| 85 | +--- |
| 86 | + |
| 87 | +## Project Structure |
| 88 | + |
| 89 | +``` |
| 90 | +capital-markets-intelligence/ |
| 91 | +├── scripts/ # Numbered 01–13 pipeline (data → analysis → outputs) |
| 92 | +├── analysis/ # Jupyter notebooks for exploratory work |
| 93 | +├── data/ |
| 94 | +│ ├── raw/ # Live API + curated source data |
| 95 | +│ ├── processed/ # Model output CSVs (generated, not tracked) |
| 96 | +│ └── cache/ # API response cache (not tracked) |
| 97 | +├── output/ |
| 98 | +│ ├── dashboards/ # Plotly HTML files |
| 99 | +│ ├── excel/ # openpyxl workbooks |
| 100 | +│ ├── pdf/ # fpdf reports |
| 101 | +│ └── memos/ # Text research memos |
| 102 | +├── docs/ # Extended documentation |
| 103 | +└── tests/ # (Planned) pytest test suite |
| 104 | +``` |
| 105 | + |
| 106 | +**Key principle:** Scripts are numbered in execution order. Each script reads from `data/` and writes back to `data/processed/` or `output/`. Avoid cross-script imports — each script should be independently runnable. |
| 107 | + |
| 108 | +--- |
| 109 | + |
| 110 | +## Coding Style |
| 111 | + |
| 112 | +- **Formatter:** `black` (line length 100) |
| 113 | +- **Linter:** `ruff` or `flake8` |
| 114 | +- **Docstrings:** Google-style |
| 115 | +- **Type hints:** Encouraged for new functions, required for any new shared utilities |
| 116 | +- **No hard-coded paths:** Use `pathlib.Path(__file__).parent` for relative paths |
| 117 | +- **No silent failures:** Raise meaningful exceptions or print a clear warning when data is unavailable |
| 118 | + |
| 119 | +To auto-format before committing: |
| 120 | +```bash |
| 121 | +pip install black ruff |
| 122 | +black scripts/ analysis/ |
| 123 | +ruff check scripts/ analysis/ |
| 124 | +``` |
| 125 | + |
| 126 | +--- |
| 127 | + |
| 128 | +## How to Propose Changes |
| 129 | + |
| 130 | +### Bug Reports |
| 131 | +Open an issue using the **Bug Report** template. Include: |
| 132 | +- Steps to reproduce |
| 133 | +- Expected vs actual behaviour |
| 134 | +- Python version, OS, and dependency versions (`pip freeze`) |
| 135 | +- Any relevant log output or tracebacks |
| 136 | + |
| 137 | +### Feature Requests |
| 138 | +Open an issue using the **Feature Request** template. Include: |
| 139 | +- Why this improves the platform (which use case / vertical does it help?) |
| 140 | +- What data sources it needs |
| 141 | +- Whether it requires new dependencies |
| 142 | + |
| 143 | +### Analytics / Model PRs |
| 144 | +If your PR changes an analytical model (e.g., event study methodology, sovereign risk weights): |
| 145 | +- Include a short write-up (in the PR body or a `docs/` file) explaining the methodology and its source |
| 146 | +- Show sample output before and after |
| 147 | +- Link to any academic papers or practitioner references used |
| 148 | + |
| 149 | +--- |
| 150 | + |
| 151 | +## Good First Issues |
| 152 | + |
| 153 | +Looking for somewhere to start? These are well-scoped entry points: |
| 154 | + |
| 155 | +- 🏷️ Filter by [`good first issue`](https://github.com/DogInfantry/capital-markets-intelligence/issues?q=is%3Aopen+label%3A%22good+first+issue%22) |
| 156 | +- 🏷️ Filter by [`help wanted`](https://github.com/DogInfantry/capital-markets-intelligence/issues?q=is%3Aopen+label%3A%22help+wanted%22) |
| 157 | + |
| 158 | +Examples of good first contributions: |
| 159 | +- Fix a typo or improve an explanation in the README |
| 160 | +- Add a missing dependency to `requirements.txt` |
| 161 | +- Add type hints to one script |
| 162 | +- Write a pytest test for a single model function |
| 163 | + |
| 164 | +--- |
| 165 | + |
| 166 | +## Need Help? |
| 167 | + |
| 168 | +Open a [Discussion](https://github.com/DogInfantry/capital-markets-intelligence/discussions) or tag `@DogInfantry` in an issue comment. We're happy to help you get oriented. |
| 169 | + |
| 170 | +--- |
| 171 | + |
| 172 | +*Built to institutional research standards — contributions held to the same bar.* |
0 commit comments