This is a one time project, but I'm looking for someone I can work with long term on similar projects (usually ~5-15 hours/week). So please consider this project a trial to see if a longer term relationship makes sense. I plan on choosing several bidders and then working long term with one of them.
The project is to go to Quantopian.com and translate one trading system idea I have into code (trading idea is detailed below).
Quantopian is a free web app that allows you to input python scripts that create stock trading systems and then backtest them online using historical stock data (i.e., see how the system would have performed in the past). They provide the historical data. All you have to do is write the Python code. There is extensive documentation here: https://www.quantopian.com/help
Experience with backtesting or trading isn't necessary, but the max hours to spend on this project is 6 hours. In other words, I'm willing to pay for some time getting familiar with using Quantopian and backtesting, but not for more education than that. So the ideal person someone familiar with backtesting and Python and can hit the ground running.
A person familiar with Quantopian and Python should be able to do this in 1-2 hours at most, so if you can do it faster than 6 hours, great! All the more reason to work with you long term, since you already know what you're doing and you have proven you can work quickly!
For this project, the simple trading system idea to turn into Python code in Quantopian is this:
STRATEGY TO BUILD IN PYTHON
- The one security to buy/sell is USO (oil stock in USA).
- This will be traded as a weekly strategy, so you can think of it as a weekly bar chart chart of USO, meaning each bar on the chart is one week of data.
- The rules for buying and selling:
--- First, calculate the Average True Range indicator using the 9 weeks setting (ATR9).
---Each weekend, check if the ATR9 was up or down for the most recent week's completed bar vs. the ATR9 of 2 weeks ago's weekly bar. If the most recent ATR9 is up vs 2 week's ago, then enter a short position on USO. If down, then enter a long position of USO.
- When you decide to enter a position on the weekend, enter at the opening on the next day (i.e., Monday open).
--- There is one more entry condition: Calculate the 50 week moving average of USO, and only enter long positions when the the last bar's close > the 50 week moving average. Vice versa for short.
- Exit if ATR9 of 1 week vs 2 weeks ago ever reverses the entry conditions. I.e, for long, it is up 1 week ago vs 2 weeks ago, exit on the next Monday's open.
- Alternatively, for exit, there is also a stop loss condition, which is set when you enter the position and it doesn't change until you close the position. That stop loss is calculated as 3 multiplied by the ATR9 of the bar you used when deciding to enter the position, added or subtracted to that same bar's closing price (depending on long or short).
- Please note: The stop loss is checked daily each day at the end of the day, even though this is a weekly strategy. If the last day's high or low (daily bar) touched the stop loss number, then exit on the next day's open (doesn't matter what day of the week).
OTHER STRATEGY DETAILS
- Any capital not being used for USO for any reason should go into SHY instead. You can't short sell or otherwise trade SHY. It's used as a container for unused capital.
- Whenever you enter a position, use 100% of capital available.
- Use default settings for commission and slippage.
Final deliverable is a copy/paste of the python code that you've already tested and ensured works bug free in Quantopian (just create your own free account and use the online IDE to test the code. If you hit "Build algorithm" and your code executes without bugs, then it works).
For this project, and long term, I'd like to bill hourly. That way if midway we talk and the rules change or run into complexity, you're fairly compensated for the extra work.
Thanks for your bids!