Backtester for a Momentum based Equity Strategy

Job ID: 36793050

Budget: $30 – $250 USD

About the project: Looking to hire a freelancer for creating a python based backtester for US equities traded on Nasdaq. The underlying hypothesis of the strategy is that recent momentum of an individual stock when considered along with baseline momentum (momentum of “similar stocks”) is able to generate a reliable trading signal. With regards to the momentum, it can be thought of as a way to describe an OHLC (Open High Low Close) time series with a single line. For instance the line can be a linear regression line plotted with the close price of (say) the last 100 5 min bars. The regression line can then be described by the angle of the regression line with the X-axis, the R2 (R-square). Alternately the OHLC data can be expressed in the form of a triangle – by capturing the length of the perpendicular and the area under the triangle.

The backtest will gather high level OHLC data over the past XX months for all US based stocks. Basis this, we will generate an exponential moving average of the momentum for each stock and the corresponding baseline group. For stocks that meet a certain criterion, for eg – stocks where the momentum was 2X of baseline momentum or for eg – stocks where the momentum was in the opposite direction of the baseline momentum, we will pull more granular OHLC data. Basis the more granular OHLC data, we will determine what was the actual return of the stock. We can look at the return either after a given amount of time (say 30 mins, 24 hours or 5 days) or from a traditional Stop Loss / Take Profit lens.

The backtester should take as parameters:
1. Market Cap category: we categorize all Nasdaq stocks based on their market cap in 6 distinct category. For example stocks with a market cap of below $ 10 M will be in a separate category to stocks with a market cap of greater than $ 10 B
2. Industry : Nasdaq provides 13 industries wo which all stocks are mapped
3. Baseline Momentum Timeframe : The backtest should be configurable to use the following timeframes as the Baseline Momentum – 30 mins, 1hour, 2 hours, 4 hours
4. Exact entry criterion : Post identification of the shortlist, entry into the stock can happen in multiple ways. For eg – one entry signal could be a moving average crossover, another could be a three bar shape (bullish engulfing or doji star)
5. Time in trade : As mentioned above, this can be one of the exit criterion (to stay in the trade for a specific amount of time)
6. Stop Loss / Take Profit levels : Self explanatory hopefully

Desired characteristics of the backtest :
While not restricted to Interactive Brokers, it is advisable that the Freelancer have experience in extracting and manipulating data from IB TWS. Further, the backtest user should be easily able to configurable different fees and slippage amounts. While the output should be presented in an aggregated manner, it should be possible to easily get to the details of the individual stock.

What is the most important characteristic is that the backtester should be fast to run. I have created my own backtester right now which takes about 4 – 6 hours to run a backtest for a 3 month time period (not including the time to download the data). I am looking for a high quality freelancer who can halve this time at least.

Desired characteristics of the freelancer:
While previous algo trading experience is a plus, it is not mandatory. However, you should be someone who thrives in a collaborative environment rather than someone who is a pure “lone wolf”. Also I am very wary of people spamming me without having read the whole requirement. Hence request you to quote the following number while messaging me 1739. This will help me weed out the spammers who are trying to play freelance Bingo.