Skip to content

Commit 5c02209

Browse files
readme updated
rules and regulations explained on ai usage
1 parent fa22237 commit 5c02209

File tree

1 file changed

+152
-18
lines changed

1 file changed

+152
-18
lines changed

README.md

Lines changed: 152 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,42 @@
11
# QuantResearchStarter
22

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

9-
## Features
7+
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.
8+
9+
---
10+
11+
## Why this project
12+
13+
QuantResearchStarter aims to provide a clean, well-documented starting point for quantitative research and backtesting. It focuses on:
14+
15+
* **Readability**: idiomatic Python, type hints, and small modules you can read and change quickly.
16+
* **Testability**: deterministic vectorized backtests with unit tests and CI.
17+
* **Extensibility**: plug-in friendly factor & data adapters so you can try new ideas fast.
18+
19+
---
20+
21+
## Key features
1022

11-
- **Data Management**: Download real data or generate synthetic data for testing
12-
- **Factor Library**: Implement momentum, value, size, and volatility factors
13-
- **Backtesting Engine**: Vectorized backtester with transaction costs and constraints
14-
- **Risk Metrics**: Comprehensive performance and risk analytics
15-
- **Modular Design**: Easy to extend with new factors and strategies
16-
- **Production Ready**: Type hints, tests, CI/CD, and documentation
23+
* **Data management** — download market data or generate synthetic price series for experiments.
24+
* **Factor library** — example implementations of momentum, value, size, and volatility factors.
25+
* **Vectorized backtesting engine** — supports transaction costs, slippage, and portfolio constraints.
26+
* **Risk & performance analytics** — returns, drawdowns, Sharpe, turnover, and other risk metrics.
27+
* **CLI & scripts** — small tools to generate data, compute factors, and run backtests from the terminal.
28+
* **Production-ready utilities** — type hints, tests, continuous integration, and documentation scaffolding.
1729

18-
## Quick Start
30+
---
1931

20-
### Installation
32+
## Quick start
33+
34+
### Requirements
35+
36+
* Python 3.10+
37+
* pip
38+
39+
### Install locally
2140

2241
```bash
2342
# Clone the repository
@@ -27,26 +46,141 @@ cd QuantResearchStarter
2746
# Install package in development mode
2847
pip install -e .
2948

30-
# Install development dependencies
49+
# Install development dependencies (tests, linters, docs)
3150
pip install -e ".[dev]"
3251

33-
# Optional UI
52+
# Optional UI dependencies
3453
pip install streamlit plotly
3554
```
3655

37-
### Quick Demo
56+
### Demo (one-line)
3857

3958
```bash
4059
make demo
4160
```
4261

43-
Or step-by-step:
62+
### Step-by-step demo
4463

4564
```bash
65+
# generate synthetic sample price series
4666
qrs generate-data -o data_sample/sample_prices.csv -s 5 -d 365
67+
68+
# compute example factors
4769
qrs compute-factors -d data_sample/sample_prices.csv -f momentum -f value -o output/factors.csv
70+
71+
# run a backtest
4872
qrs backtest -d data_sample/sample_prices.csv -s output/factors.csv -o output/backtest_results.json
4973

50-
# Streamlit dashboard (optional)
74+
# optional: start the Streamlit dashboard
5175
streamlit run src/quant_research_starter/dashboard/streamlit_app.py
5276
```
77+
78+
---
79+
80+
## Example: small strategy (concept)
81+
82+
```python
83+
from quant_research_starter.backtest import Backtester
84+
from quant_research_starter.data import load_prices
85+
from quant_research_starter.factors import Momentum
86+
87+
prices = load_prices("data_sample/sample_prices.csv")
88+
factor = Momentum(window=63)
89+
scores = factor.compute(prices)
90+
91+
bt = Backtester(prices, signals=scores, capital=1_000_000)
92+
results = bt.run()
93+
print(results.performance.summary())
94+
```
95+
96+
> The code above is illustrative—see `examples/` for fully working notebooks and scripts.
97+
98+
---
99+
100+
## CLI reference
101+
102+
Run `qrs --help` or `qrs <command> --help` for full usage. Main commands include:
103+
104+
* `qrs generate-data` — create synthetic price series or download data from adapters
105+
* `qrs compute-factors` — calculate and export factor scores
106+
* `qrs backtest` — run the vectorized backtest and export results
107+
108+
---
109+
110+
## Project structure (overview)
111+
112+
```
113+
QuantResearchStarter/
114+
├─ src/quant_research_starter/
115+
│ ├─ data/ # data loaders & adapters
116+
│ ├─ factors/ # factor implementations
117+
│ ├─ backtest/ # backtester & portfolio logic
118+
│ ├─ analytics/ # performance and risk metrics
119+
│ ├─ cli/ # command line entry points
120+
│ └─ dashboard/ # optional Streamlit dashboard
121+
├─ examples/ # runnable notebooks & example strategies
122+
├─ tests/ # unit + integration tests
123+
└─ docs/ # documentation source
124+
```
125+
126+
---
127+
128+
## Tests & CI
129+
130+
We include unit tests and a CI workflow (GitHub Actions). Run tests locally with:
131+
132+
```bash
133+
pytest -q
134+
```
135+
136+
The CI pipeline runs linting, unit tests, and builds docs on push/PR.
137+
138+
---
139+
140+
## Contributing
141+
142+
Contributions are very welcome. Please follow these steps:
143+
144+
1. Fork the repository
145+
2. Create a feature branch
146+
3. Add tests for new behavior
147+
4. Open a pull request with a clear description and rationale
148+
149+
Please review `CONTRIBUTING.md` and the `CODE_OF_CONDUCT.md` before submitting.
150+
151+
---
152+
153+
## AI policy — short & practical
154+
155+
**Yes — you are allowed to use AI tools** (ChatGPT, Copilot, Codeium, etc.) to help develop, prototype, or document code in this repository.
156+
157+
A few friendly guidelines:
158+
159+
* **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>").
160+
* **Review and test** all AI-generated code. Treat it as a helpful draft, not final production-quality code.
161+
* **Follow licensing** and attribution rules for any external snippets the AI suggests. Don’t paste large verbatim copyrighted material.
162+
* **Security & correctness**: double-check numerical logic, data handling, and anything that affects trading decisions.
163+
164+
This policy is intentionally permissive: we want the community to move fast while keeping quality and safety in mind.
165+
166+
---
167+
168+
## License
169+
170+
This project is licensed under the MIT License — see the `LICENSE` file for details.
171+
172+
---
173+
174+
## Acknowledgements
175+
176+
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.
177+
178+
---
179+
180+
If you'd like, I can also:
181+
182+
* produce a shorter README for a GitHub landing page (one-screen summary),
183+
* create a `CONTRIBUTING.md` snippet for how to document AI-assisted PRs, or
184+
* generate example Jupyter notebooks that exercise the backtester.
185+
186+
Tell me which of those you'd like and I'll add them next.

0 commit comments

Comments
 (0)