Skip to content

Commit 8dfe291

Browse files
authored
feat: add work flow ci
feat: add work flow ci
2 parents e45cc13 + b817df7 commit 8dfe291

File tree

3 files changed

+110
-3
lines changed

3 files changed

+110
-3
lines changed

.github/workflows/ci.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, develop]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [3.11, 3.12]
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -e ".[dev]"
28+
29+
- name: Lint with ruff
30+
run: |
31+
ruff check src/ tests/
32+
33+
- name: Check formatting with black
34+
run: |
35+
black --check src/ tests/
36+
37+
- name: Run tests
38+
run: |
39+
pytest --cov=src/quant_research_starter --cov-report=xml
40+
41+
- name: Upload coverage to Codecov
42+
uses: codecov/codecov-action@v3
43+
with:
44+
file: ./coverage.xml
45+
flags: unittests
46+
name: codecov-umbrella
47+
48+
build-docker:
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v4
52+
53+
- name: Build Docker image
54+
run: |
55+
docker build -t quant-research-starter:latest .

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
node_modules
1+
node_modules
2+
.vscode
3+
.coverage

README.md

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,52 @@
1-
# template
2-
A Template Repository for OpenSpringFest (OSF)
1+
# QuantResearchStarter
2+
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)
7+
[![CI](https://github.com/username/QuantResearchStarter/actions/workflows/ci.yml/badge.svg)](https://github.com/username/QuantResearchStarter/actions)
8+
9+
## Features
10+
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
17+
18+
## Quick Start
19+
20+
### Installation
21+
22+
```bash
23+
# Clone the repository
24+
git clone https://github.com/username/QuantResearchStarter.git
25+
cd QuantResearchStarter
26+
27+
# Install package in development mode
28+
pip install -e .
29+
30+
# Install development dependencies
31+
pip install -e ".[dev]"
32+
33+
# Optional UI
34+
pip install streamlit plotly
35+
```
36+
37+
### Quick Demo
38+
39+
```bash
40+
make demo
41+
```
42+
43+
Or step-by-step:
44+
45+
```bash
46+
qrs generate-data -o data_sample/sample_prices.csv -s 5 -d 365
47+
qrs compute-factors -d data_sample/sample_prices.csv -f momentum -f value -o output/factors.csv
48+
qrs backtest -d data_sample/sample_prices.csv -s output/factors.csv -o output/backtest_results.json
49+
50+
# Streamlit dashboard (optional)
51+
streamlit run src/quant_research_starter/dashboard/streamlit_app.py
52+
```

0 commit comments

Comments
 (0)