I am looking for a backtest code in thinkscript to run on thinkorswim platform, kindly read below strategy and let me know if you can code exactly using thinkscript and make it works perfectly for thinkorswim.
Cover Call backtest strategy
On thinkorswim platform
Essentially, this is a calendar call: buying a longer-term option and selling a shorter-term option to start out. Then as the short option nears expiration, roll it to the next period. The long option could also be rolled to maintain adequate protection. Income is generated as theta decays on the short option.
Action:
1. Buy a calendar call for ticker SPX (user input) at the beginning, date and time are user input.. This consists of 2 legs:
a. Buying a six-months (user input) call with delta 90 (user input). Sometimes delta 90 is not available, then choose the next closest delta. If both higher and lower deltas are equal distance (e.g., 91 and 89), choose the higher delta, and
b. At the same time, selling a shorter term (user input) call with delta 50 (user input). Sometimes delta 50 is not available, then choose the next closest delta. If both higher and lower deltas are equal distance, (e.g, 49 and 51), choose the lower delta.
2. At 3pm EST (user input) on the day of expiration of the shorter term call, roll i.e., buy back the shorter term call and sell a new shorter term of the next available expiration with delta 50 (user input). The longer term call should also be rolled, same expiration, to maintain a 90 delta, if necessary.
3. Repeat step 2 every day, week, or month (user input) until the end of the backtest period (user input).
4. Generate a report showing a transaction log with results and export to a csv file.
Only reach out if you are a proficient coder and a skilled thinkscript programmer, hoping to get this soft out so quickly
As a seasoned programmer and engineer, my career has been built on the ability to deliver results. I have spent years perfecting my skills in algorithm development and software testing, which is exactly what your project entails. I understand the demanding nature of running a business, and that's why my priority would be to help you achieve your objectives in a timely and efficient manner.
In regards to your strategy on automatización de trades, specifically using thinkScript in thinkorswim platform, I am quite skilled and proficient at coding with thinkScript. My deep understanding of algorithm development perfectly aligns with your proposition of executing this covered call backtest strategy through buying and selling different options based on user inputs.
Moreover, my commitment to thoroughness extends beyond just writing functioning code. I am dedicated to producing quality outputs; that includes providing an extensively detailed transaction log report and even exporting it into a csv file for easy data analysis. To ensure complete satisfaction, I provide free revisions until you are 100% content with the results. With me, you can expect nothing less than excellent after sales service and smooth collaborations from inception