Getting started with Alpaca API and Zipline Reloaded

Hello everyone and thanks for looking at this!

I just finished Clenow’s books ‘Following the Trend’, ‘Stocks on the Move’, and ‘Trading Evolved’.

It has me interested in expanding from strictly TA to doing some Systematic/Quantitative Trading that would require me to standup a backtesting environment and stock selector/screener. These books are 5-10 yrs old, so I want to make sure I’m not going down an outdated path.

Here are the two goals:

  1. Weekly Stock Selector/Screener (may advance to Futures later, but for now US Equities)

Ingest individual price data for all tickers for a specific index (i.e. S&P 500)

  • Data needs to go back 100 days, Daily timeframe, cleaned for splits/dividends, etc.
  • Need to be able to filter based on common technicals, for example something like:
    • disqualify stocks trading below their 100-day moving average
    • disqualify stocks that made any single-day moves exceeding 15% in the past 90 days
    • Rank by Average True Range - to measure volatility

Question - Can Alpaca’s API provide this data? I also have an IBKR account if that API would work as well. I can then use R to run some other criteria

  1. Backtesting environment with historical price data
  • Is something like Python and Zipline-Reloaded using Alpaca still the best solution (as described in Clenow’s ‘Trading Evolved’ book?

Thanks!

Hi Nordy,

Recently started playing with a solution like this aswell, how has your progress been so far? I’ve been looking to see if Alpaca API provides certain data aswell. Have been integrating it with Ollama in the back-end running it on gpt3.5 and some of the answers or suggestions it can give is impressive already.