Paper trading · Alpaca API

Momentum,
systematized.

Quant-Tech-Rotator ranks ten mega-cap tech stocks by momentum every month, keeps the top three, and steps into cash when the market turns. Five rounds of research went into it before a single trade went live.

1.21 Sharpe Ratio Backtested, S&P 500
+40% Annual Return 2024 backtest
3 / 10 Stocks Held Equal-weighted
Monthly Rebalance Stateless execution
The research

Five phases to a live signal.

01 / Awareness

Retail indicators lag by design.

RSI and MACD react to price action that has already happened — useful for reading a chart, not for building an edge.

02 / Adaptive volatility

Markets don't hold still.

They shift between regimes, and a static strategy tuned for one regime tends to break in the next.

03 / Alpha decay

Public formulas get arbitraged away.

Institutional multi-factor models — like the GTJA191 dataset — lose their edge over time as high-frequency trading prices them in.

04 / Multi-asset architecture

A custom cross-sectional model.

Backtested on the S&P 500: a 1.21 Sharpe ratio and +40% annual return in 2024, with minimal drawdown.

05 / Paper tradingCurrent

Live data, simulated funds.

Real-time market data through the Alpaca API — testing execution, slippage, and latency before any real capital is involved.

How it decides

The logic, monthly.

01

Universe

Ten mega-cap tech tickers, scanned every month.

AAPLMSFTNVDAGOOGLAMZNMETATSLANFLXAVGOTSM
02

Rank

Sorted by 60-day rate of change — strongest momentum first.

03

Filter

Negative-momentum names are dropped. If all ten are negative, the bot holds 100% cash.

04

Select & allocate

The top 3 survivors split the portfolio equally — about 33.3% each, via fractional shares.

See it run

A real rebalance.

Actual output from a monthly run.

python monthly_executor.py
Starting market scan (Direct REST Method)...
[####################] 10 of 10 completed
Top 3 selected for this month: ['MSFT', 'TSM', 'AMZN']
Closing existing positions...
Total equity: $100000.00 — buying $33333.33 per position
✅ BOUGHT MSFT
✅ BOUGHT TSM
✅ BOUGHT AMZN
Monthly rebalancing completed successfully!
Get started

Run it yourself.

01

Clone the repository

git clone https://github.com/mirconegri/Quant-Tech-Rotator.git
02

Set up the environment

python -m venv venv then pip install -r requirements.txt

03

Add your Alpaca keys

Set ALPACA_API_KEY and ALPACA_SECRET_KEY as environment variables. Never commit them.

04

Run it

python monthly_executor.py — once a month, ideally an hour before market close.

This is paper trading — simulated funds, not real capital. The script is also stateless: every run closes existing positions and rebuys from scratch, so running it more than once a day will bleed money to spread and slippage. Once a month, by design.

Built in the open, tested in public.

Look at the code, check the math, or fork it and run your own universe.