Skip to content

Commit 50f717d

Browse files
chore: updated gitignore
1 parent 83f8e31 commit 50f717d

File tree

2 files changed

+30
-5
lines changed

2 files changed

+30
-5
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ node_modules
33
.coverage
44
__pycache__/
55
*.py[cod]
6-
*$py.class
6+
*$py.class
7+
src/quant_research_starter.egg-info/PKG-INFO

README.md

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ QuantResearchStarter aims to provide a clean, well-documented starting point for
2222

2323
* **Data management** — download market data or generate synthetic price series for experiments.
2424
* **Factor library** — example implementations of momentum, value, size, and volatility factors.
25-
* **Vectorized backtesting engine** — supports transaction costs, slippage, and portfolio constraints.
25+
* **Vectorized backtesting engine** — supports transaction costs, slippage, portfolio constraints, and configurable rebalancing frequencies (daily, weekly, monthly).
2626
* **Risk & performance analytics** — returns, drawdowns, Sharpe, turnover, and other risk metrics.
2727
* **CLI & scripts** — small tools to generate data, compute factors, and run backtests from the terminal.
2828
* **Production-ready utilities** — type hints, tests, continuous integration, and documentation scaffolding.
@@ -60,8 +60,8 @@ After installation, you can use the CLI in two ways:
6060
**Option 1: Direct command (if PATH is configured)**
6161
```bash
6262
qrs --help
63-
qrs generate-data -o data/sample.csv -s 5 -d 365
64-
qrs compute-factors -d data/sample.csv -f momentum -f value
63+
python -m quant_research_starter.cli generate-data -o data_sample/sample_prices.csv -s 5 -d 365
64+
python -m quant_research_starter.cli compute-factors -d data_sample/sample_prices.csv -f momentum -f value -o output/factors.csv
6565
qrs backtest -d data/sample.csv -s output/factors.csv
6666
```
6767

@@ -70,7 +70,7 @@ qrs backtest -d data/sample.csv -s output/factors.csv
7070
python -m quant_research_starter.cli --help
7171
python -m quant_research_starter.cli generate-data -o data/sample.csv -s 5 -d 365
7272
python -m quant_research_starter.cli compute-factors -d data/sample.csv -f momentum -f value
73-
python -m quant_research_starter.cli backtest -d data/sample.csv -s output/factors.csv
73+
python -m quant_research_starter.cli backtest -d data_sample/sample_prices.csv -s output/factors.csv -o output/backtest_results.json
7474
```
7575

7676
### Demo (one-line)
@@ -113,6 +113,30 @@ results = bt.run()
113113
print(results.performance.summary())
114114
```
115115

116+
### Rebalancing Frequency
117+
118+
The backtester supports different rebalancing frequencies to match your strategy needs:
119+
120+
```python
121+
from quant_research_starter.backtest import VectorizedBacktest
122+
123+
# Daily rebalancing (default)
124+
bt_daily = VectorizedBacktest(prices, signals, rebalance_freq="D")
125+
126+
# Weekly rebalancing (reduces turnover and transaction costs)
127+
bt_weekly = VectorizedBacktest(prices, signals, rebalance_freq="W")
128+
129+
# Monthly rebalancing (lowest turnover)
130+
bt_monthly = VectorizedBacktest(prices, signals, rebalance_freq="M")
131+
132+
results = bt_monthly.run()
133+
```
134+
135+
Supported frequencies:
136+
- `"D"`: Daily rebalancing (default)
137+
- `"W"`: Weekly rebalancing (rebalances when the week changes)
138+
- `"M"`: Monthly rebalancing (rebalances when the month changes)
139+
116140
> The code above is illustrative—see `examples/` for fully working notebooks and scripts.
117141
118142
---

0 commit comments

Comments
 (0)