Options Trading Python Script based on ThetaData API
Rozpočet: $20.0 - $40.0
HOURLY / PART_TIME
⭐ 0.00 (0)
United Kingdom
python, api, api-integration
Project Title
Build Robust Monthly ATM Straddle Momentum Screening Tool (Python + ThetaData)
Project Overview
I need a clean, reliable Python tool that analyses historical monthly ATM straddle performance across a universe of stocks and ranks them using time-series momentum (following the methodology from Heston, Jones, Khorram, Li & Mo (2023) – “Option Momentum”, Journal of Finance).
The goal is to identify which stocks have shown the strongest recent ATM straddle momentum and are therefore the best candidates to buy the next monthly straddle on.
Current Situation
I already have a working prototype using the official thetadata Python client. It can pull data and generate an Excel output, but it currently suffers from:
Frequent “No data found” errors on many monthly expirations
Inaccurate ATM strike selection
Occasional unrealistic returns caused by very low entry prices
Limited robustness and error handling
ThetaData support has confirmed that the correct approach is to validate expirations and strikes first before pulling EOD data.
Key Requirements
Use the official thetadata Python client while the Theta Terminal is running.
Follow a proper data validation workflow:
Get list of expirations for each symbol
For each expiration, get the list of available strikes
Only request option_history_eod for strikes that actually exist
Gracefully handle and log cases with no data
Use the correct monthly option expiration dates.
Note: While trading stops on the third Friday of the month, the official expiration date recorded by most data providers (including ThetaData) is the Saturday following that Friday. Please use the appropriate dates.
For each monthly expiration, calculate the true ATM straddle:
Retrieve the underlying stock price on the entry date (~35 days before expiration)
Select the strike closest to that price from the list of available strikes
Calculate straddle entry price, payoff at expiration, and percentage return
Calculate time-series momentum = average straddle return over lags t-2 to t-12 (skipping the most recent completed month)
Rank symbols by momentum strength and produce clear recommendations (“Strong Buy / Watch / Avoid”) for the next monthly expiry
Output a professional Excel file with two sheets:
Sheet 1: Detailed historical straddle data per symbol and month
Sheet 2: Momentum Rankings + recommendations
Technical Requirements
Python 3.10+
Must work reliably with ThetaData Standard / Pro subscriptions
Good logging, progress reporting, and error handling
Should accept a configurable list of symbols (ideally from a CSV file)
Clean, well-commented code
Deliverables
Complete, well-documented Python script(s)
requirements.txt
Short README.md with setup and usage instructions
Sample output Excel file
Skills & Experience Required
Strong Python skills, especially with pandas
Experience working with financial market data or option data
Comfortable handling incomplete/missing data and building robust validation flows
Experience creating clean, professional Excel reports using openpyxl
Bonus: Previous experience with ThetaData or similar option data providers
Otevřít na Upwork