Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions sp500/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
AMOUNT ?= 100000
TOP ?= 500
MAX_STOCKS ?= 100
US_WEIGHT ?= 0.60

.PHONY: build run

build:
docker build --pull --rm . -t devbox:latest

run:
docker run --rm devbox:latest --amount $(AMOUNT) --top $(TOP)
docker run --rm devbox:latest --amount $(AMOUNT) --max-stocks $(MAX_STOCKS) --us-weight $(US_WEIGHT)
30 changes: 27 additions & 3 deletions sp500/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# About

Simple SP500 rebalancer takes the dollar amount to invest and stocks you want to exclude and produces how much of each SP500 stock to buy today.
Simplified blended rebalancer for **S&P 500 + FTSE Developed (ex-US)**.

Pulls live SPY (S&P 500) and VEA (FTSE Developed Markets ex-US) holdings,
applies your exclusion list, then caps the buy list to the top N names by
blended weight (default **100**) so the plan can actually be executed by a
single trader.

## Instructions

Expand All @@ -16,10 +21,29 @@ docker build --pull --rm . -t devbox:latest
docker run --rm devbox:latest --amount 100000
```

With a custom exclusion list and top-N preview:
Default behaviour: 60% S&P 500 / 40% FTSE Developed ex-US, capped at 100
holdings, with the built-in exclusion list (TSLA, MSFT, NVDA, INTC, AMD,
DELL, HPQ, ORCL, PLTR).

Custom exclusion and tighter cap:

```shell
docker run --rm devbox:latest --amount 100000 \
--exclude TSLA,MSFT,NVDA --max-stocks 50
```

Different US/International split, write a CSV:

```shell
docker run --rm devbox:latest --amount 100000 \
--us-weight 0.7 --csv plan.csv
```

US-only or International-only:

```shell
docker run --rm devbox:latest --amount 100000 --exclude TSLA,MSFT,NVDA --top 20
docker run --rm devbox:latest --amount 100000 --us-only
docker run --rm devbox:latest --amount 100000 --intl-only
```

### Debug in VSCode
Expand Down
Loading