Skip to content

Commit 34917f8

Browse files
committed
chore: update build artifacts and coverage data
1 parent f2211fb commit 34917f8

File tree

3 files changed

+185
-14
lines changed

3 files changed

+185
-14
lines changed

.coverage

0 Bytes
Binary file not shown.

src/quant_research_starter.egg-info/PKG-INFO

Lines changed: 183 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,43 @@ Dynamic: license-file
4343

4444
# QuantResearchStarter
4545

46-
A modular, open-source quantitative research and backtesting framework designed for clarity and extensibility. Perfect for researchers, students, and developers interested in quantitative finance.
47-
48-
![Python Version](https://img.shields.io/badge/python-3.10%2B-blue)
49-
![License](https://img.shields.io/badge/license-MIT-green)
46+
[![Python Version](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/)
47+
[![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
5048
[![CI](https://github.com/username/QuantResearchStarter/actions/workflows/ci.yml/badge.svg)](https://github.com/username/QuantResearchStarter/actions)
5149

52-
## Features
50+
A modular, open-source quantitative research and backtesting framework built for clarity, reproducibility, and extensibility. Ideal for researchers, students, and engineers building and testing systematic strategies.
51+
52+
---
53+
54+
## Why this project
55+
56+
QuantResearchStarter aims to provide a clean, well-documented starting point for quantitative research and backtesting. It focuses on:
57+
58+
* **Readability**: idiomatic Python, type hints, and small modules you can read and change quickly.
59+
* **Testability**: deterministic vectorized backtests with unit tests and CI.
60+
* **Extensibility**: plug-in friendly factor & data adapters so you can try new ideas fast.
61+
62+
---
63+
64+
## Key features
65+
66+
* **Data management** — download market data or generate synthetic price series for experiments.
67+
* **Factor library** — example implementations of momentum, value, size, and volatility factors.
68+
* **Vectorized backtesting engine** — supports transaction costs, slippage, portfolio constraints, and configurable rebalancing frequencies (daily, weekly, monthly).
69+
* **Risk & performance analytics** — returns, drawdowns, Sharpe, turnover, and other risk metrics.
70+
* **CLI & scripts** — small tools to generate data, compute factors, and run backtests from the terminal.
71+
* **Production-ready utilities** — type hints, tests, continuous integration, and documentation scaffolding.
5372

54-
- **Data Management**: Download real data or generate synthetic data for testing
55-
- **Factor Library**: Implement momentum, value, size, and volatility factors
56-
- **Backtesting Engine**: Vectorized backtester with transaction costs and constraints
57-
- **Risk Metrics**: Comprehensive performance and risk analytics
58-
- **Modular Design**: Easy to extend with new factors and strategies
59-
- **Production Ready**: Type hints, tests, CI/CD, and documentation
73+
---
6074

61-
## Quick Start
75+
## Quick start
6276

63-
### Installation
77+
### Requirements
78+
79+
* Python 3.10+
80+
* pip
81+
82+
### Install locally
6483

6584
```bash
6685
# Clone the repository
@@ -70,5 +89,155 @@ cd QuantResearchStarter
7089
# Install package in development mode
7190
pip install -e .
7291

73-
# Install development dependencies
92+
# Install development dependencies (tests, linters, docs)
7493
pip install -e ".[dev]"
94+
95+
# Optional UI dependencies
96+
pip install streamlit plotly
97+
```
98+
99+
### Demo (one-line)
100+
101+
```bash
102+
make demo
103+
```
104+
105+
### Step-by-step demo
106+
107+
```bash
108+
# generate synthetic sample price series
109+
qrs generate-data -o data_sample/sample_prices.csv -s 5 -d 365
110+
111+
# compute example factors
112+
qrs compute-factors -d data_sample/sample_prices.csv -f momentum -f value -o output/factors.csv
113+
114+
# run a backtest
115+
qrs backtest -d data_sample/sample_prices.csv -s output/factors.csv -o output/backtest_results.json
116+
117+
# optional: start the Streamlit dashboard
118+
streamlit run src/quant_research_starter/dashboard/streamlit_app.py
119+
```
120+
121+
---
122+
123+
## Example: small strategy (concept)
124+
125+
```python
126+
from quant_research_starter.backtest import Backtester
127+
from quant_research_starter.data import load_prices
128+
from quant_research_starter.factors import Momentum
129+
130+
prices = load_prices("data_sample/sample_prices.csv")
131+
factor = Momentum(window=63)
132+
scores = factor.compute(prices)
133+
134+
bt = Backtester(prices, signals=scores, capital=1_000_000)
135+
results = bt.run()
136+
print(results.performance.summary())
137+
```
138+
139+
### Rebalancing Frequency
140+
141+
The backtester supports different rebalancing frequencies to match your strategy needs:
142+
143+
```python
144+
from quant_research_starter.backtest import VectorizedBacktest
145+
146+
# Daily rebalancing (default)
147+
bt_daily = VectorizedBacktest(prices, signals, rebalance_freq="D")
148+
149+
# Weekly rebalancing (reduces turnover and transaction costs)
150+
bt_weekly = VectorizedBacktest(prices, signals, rebalance_freq="W")
151+
152+
# Monthly rebalancing (lowest turnover)
153+
bt_monthly = VectorizedBacktest(prices, signals, rebalance_freq="M")
154+
155+
results = bt_monthly.run()
156+
```
157+
158+
Supported frequencies:
159+
- `"D"`: Daily rebalancing (default)
160+
- `"W"`: Weekly rebalancing (rebalances when the week changes)
161+
- `"M"`: Monthly rebalancing (rebalances when the month changes)
162+
163+
> The code above is illustrative—see `examples/` for fully working notebooks and scripts.
164+
165+
---
166+
167+
## CLI reference
168+
169+
Run `qrs --help` or `qrs <command> --help` for full usage. Main commands include:
170+
171+
* `qrs generate-data` — create synthetic price series or download data from adapters
172+
* `qrs compute-factors` — calculate and export factor scores
173+
* `qrs backtest` — run the vectorized backtest and export results
174+
175+
---
176+
177+
## Project structure (overview)
178+
179+
```
180+
QuantResearchStarter/
181+
├─ src/quant_research_starter/
182+
│ ├─ data/ # data loaders & adapters
183+
│ ├─ factors/ # factor implementations
184+
│ ├─ backtest/ # backtester & portfolio logic
185+
│ ├─ analytics/ # performance and risk metrics
186+
│ ├─ cli/ # command line entry points
187+
│ └─ dashboard/ # optional Streamlit dashboard
188+
├─ examples/ # runnable notebooks & example strategies
189+
├─ tests/ # unit + integration tests
190+
└─ docs/ # documentation source
191+
```
192+
193+
---
194+
195+
## Tests & CI
196+
197+
We include unit tests and a CI workflow (GitHub Actions). Run tests locally with:
198+
199+
```bash
200+
pytest -q
201+
```
202+
203+
The CI pipeline runs linting, unit tests, and builds docs on push/PR.
204+
205+
---
206+
207+
## Contributing
208+
209+
Contributions are very welcome. Please follow these steps:
210+
211+
1. Fork the repository
212+
2. Create a feature branch
213+
3. Add tests for new behavior
214+
4. Open a pull request with a clear description and rationale
215+
216+
Please review `CONTRIBUTING.md` and the `CODE_OF_CONDUCT.md` before submitting.
217+
218+
---
219+
220+
## AI policy — short & practical
221+
222+
**Yes — you are allowed to use AI tools** (ChatGPT, Copilot, Codeium, etc.) to help develop, prototype, or document code in this repository.
223+
224+
A few friendly guidelines:
225+
226+
* **Be transparent** when a contribution is substantially generated by an AI assistant — add a short note in the PR or commit message (e.g., "Generated with ChatGPT; reviewed and adapted by <your-name>").
227+
* **Review and test** all AI-generated code. Treat it as a helpful draft, not final production-quality code.
228+
* **Follow licensing** and attribution rules for any external snippets the AI suggests. Don’t paste large verbatim copyrighted material.
229+
* **Security & correctness**: double-check numerical logic, data handling, and anything that affects trading decisions.
230+
231+
This policy is intentionally permissive: we want the community to move fast while keeping quality and safety in mind.
232+
233+
---
234+
235+
## License
236+
237+
This project is licensed under the MIT License — see the `LICENSE` file for details.
238+
239+
---
240+
241+
## Acknowledgements
242+
243+
Built with inspiration from open-source quant libraries and the research community. If you use this project in papers or public work, a short citation or mention is appreciated.

src/quant_research_starter.egg-info/SOURCES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ src/quant_research_starter.egg-info/requires.txt
1212
src/quant_research_starter.egg-info/top_level.txt
1313
src/quant_research_starter/backtest/__init__.py
1414
src/quant_research_starter/backtest/vectorized.py
15+
src/quant_research_starter/dashboard/streamlit_app.py
1516
src/quant_research_starter/data/__init__.py
1617
src/quant_research_starter/data/downloaders.py
1718
src/quant_research_starter/data/init.py
1819
src/quant_research_starter/data/sample_loader.py
1920
src/quant_research_starter/data/synthetic.py
2021
src/quant_research_starter/factors/__init__.py
2122
src/quant_research_starter/factors/base.py
23+
src/quant_research_starter/factors/bollinger.py
2224
src/quant_research_starter/factors/init.py
2325
src/quant_research_starter/factors/momentum.py
2426
src/quant_research_starter/factors/size.py

0 commit comments

Comments
 (0)