Skip to content

Instantly share code, notes, and snippets.

@emgram769
Created December 9, 2015 03:19
Show Gist options
  • Select an option

  • Save emgram769/441caf315ec739a06e9d to your computer and use it in GitHub Desktop.

Select an option

Save emgram769/441caf315ec739a06e9d to your computer and use it in GitHub Desktop.
zipline Makefile
STOCKS=$(shell cat portfolio.txt)
ALGODIR=algos
PERFDIR=perf
ALGOS=$(wildcard $(ALGODIR)/*.py)
PERFS=$(patsubst $(ALGODIR)/%.py,$(PERFDIR)/%.perf,$(ALGOS))
CAPITAL=1000
START_DATE=2011-1-1
END_DATE=2012-1-1
all: $(PERFS)
./performance.py $(PERFS)
$(PERFS): | $(PERFDIR)
$(PERFDIR):
mkdir -p $@
$(PERFDIR)/%.perf: $(ALGODIR)/%.py
run_algo.py -f $< --symbols $(STOCKS) --start $(START_DATE) --end $(END_DATE) -o $@ --capital_base $(CAPITAL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment