Annualized ROI (Return on Investment) in Options Chain For ThinkOrSwim

TeFLoN

New member
Hello,
I've always been a lurker and never contributed and I figured some folks would really like this. I like to sell PUTS and CALLS. It just became too tedious to always determine what ROI my strike/options premium I was selling by punching it out on a calculator. So, I figured out a nice tidy custom script to add to your list on the options grid that immediately tells you in real time what your annualized ROI is going to be!

I shoot for 30% annualized on all of my trades. Therefore, the numbers turn red if below 30% (you can change it if you like). So for this example if you're thinking of selling the 17 Nov JPM Puts to get a 30% ROI you need to select the 134 strike with a .4 Delta. If that's too close for you then you need to move on! It's a beautiful way of seeing how much juice is in the options!!

Speaking of JUICE, look at the second example of PLTR! The ROI is INSANE at a .4sh Delta. Of course, its a week from ER, but you get the point!

I hope you guys like this. It was a sigh of relief to figure this out. Have fun!

For those of you less TOS savvy, select "layout" on the options grid and "customize". Then drag over a custom data line. Use the example below. You have to touch the little scroll "thingie" to copy and paste this code into:
Screen Shot 2023-10-29 at 5.51.41 PM.png

Code:
# Custom Annualized ROI Script for thinkorswim
# Define the necessary variables
def optionPrice = bid; # Using the bid price as the option price
def daysToExpiration = GetDaysToExpiration() - 1; # Subtracting 3 days
def strikePrice = GetStrike();

# Calculate ROI
def ROI = (optionPrice * 365) / (daysToExpiration * strikePrice);

# Display ROI in the custom quote column
AddLabel(yes, "ROI: " + AsPercent(ROI), (if ROI >= 0.30 then Color.GREEN else Color.RED));
 

Attachments

  • Screen Shot 2023-10-29 at 5.42.37 PM.png
    Screen Shot 2023-10-29 at 5.42.37 PM.png
    541.9 KB · Views: 665
  • Screen Shot 2023-10-29 at 5.46.32 PM.png
    Screen Shot 2023-10-29 at 5.46.32 PM.png
    527.4 KB · Views: 627
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

I copied this in and it looks great. Thank you.
Question...when I did it, I forgot to rename it. How can I rename it and edit the code?

thanks
 
I copied this in and it looks great. Thank you.
Question...when I did it, I forgot to rename it. How can I rename it and edit the code?

thanks

To rename a script:
1. right click on the study
2. select rename

To make a copy of a script
1. double click on the study
2. in the bottom right-hand corner, click on Save As
a6Ga2NL.png
 
is this similar to the "covered return" field that is present in the option hacker? can this be used to filter options there?
 
HELLO I'm not sure the calculation is correct : Let us say ABC is current price is $100; a month from today call bid price is $90 (deep in money) is $11; so we get this ABC 100 shares purchased for $8.900 (sell for $90) and month later its trading at $95;; as the strike is for 90; so trade gets closed/assigned for 9000; / so the profit is $100 ($9000 - $8.900 ) ; return on investment is $100/8900 * 100 = 1.12% (for consecutive 12 months it could be around 13.48 % ....

Best
Raj
 
Hello,
I've always been a lurker and never contributed and I figured some folks would really like this. I like to sell PUTS and CALLS. It just became too tedious to always determine what ROI my strike/options premium I was selling by punching it out on a calculator. So, I figured out a nice tidy custom script to add to your list on the options grid that immediately tells you in real time what your annualized ROI is going to be!

I shoot for 30% annualized on all of my trades. Therefore, the numbers turn red if below 30% (you can change it if you like). So for this example if you're thinking of selling the 17 Nov JPM Puts to get a 30% ROI you need to select the 134 strike with a .4 Delta. If that's too close for you then you need to move on! It's a beautiful way of seeing how much juice is in the options!!

Speaking of JUICE, look at the second example of PLTR! The ROI is INSANE at a .4sh Delta. Of course, its a week from ER, but you get the point!

I hope you guys like this. It was a sigh of relief to figure this out. Have fun!

For those of you less TOS savvy, select "layout" on the options grid and "customize". Then drag over a custom data line. Use the example below. You have to touch the little scroll "thingie" to copy and paste this code into:
View attachment 20038
Code:
# Custom Annualized ROI Script for thinkorswim
# Define the necessary variables
def optionPrice = bid; # Using the bid price as the option price
def daysToExpiration = GetDaysToExpiration() - 1; # Subtracting 3 days
def strikePrice = GetStrike();

# Calculate ROI
def ROI = (optionPrice * 365) / (daysToExpiration * strikePrice);

# Display ROI in the custom quote column
AddLabel(yes, "ROI: " + AsPercent(ROI), (if ROI >= 0.30 then Color.GREEN else Color.RED));
going to try it out
 
Thread starter Similar threads Forum Replies Date
3AMBH Percentage % Price Return Watchlist Column for ThinkorSwim Custom 0
justAnotherTrader Portfolio Return Analysis for ThinkorSwim Custom 1

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
430 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top