Getting Data From An Illiquid Asset

StoneMan

Member
Plus
I'm working with options data which can be quite illiquid. On certain instruments you may get only a few ticks per day or even zero. Because of this bars based look back strategy will not work due to the chart being incomplete.

My workaround to this is using the time of day to get the data at the right time. I'm reaching out because I am not sure if thinkscript is capable of returning a bar based on the time.

The logic looks something like this:

If data is present in the time slot 1 on the current session get data, if not set relevant values to zero.

If data is present in the time slot 2 ob the current sesaion get data, if not set relevant values to zero.

.
.
.

I also want to know what time slot is currently active in a given session. The trade day is from 930 am to 4pm. That is 13 30 minute sessions over 6.5 hours. This is how I am planning on discritizing the trading day. I need a variable that can return 1-13 corresponding with the proper time slot. That way averages can be calculated no matter when you run the code. After the market closes that value would return 13.

Any insight would be greatly appreciated!
 
Solution
As I play around with calcuting theoretical options price something I have noticed is that from time to time the theoretical price is way off the price the option is actually transacting at. Because we know the theoretical price and the real price I believe we have the opportunity to implement some error correcting to hammer down those outliers.

This is my theory for a very rough and dirty way to implement some error correcting of theoretical options calculations based on the real data we have:

-We definitively "know" all the inputs that go into calcuting theoretical option price. Two of them are weak however and they are:

1.)The use of implied volitility of the underlying. This is a generalization across all options and could be...
I'm working with options data which can be quite illiquid. On certain instruments you may get only a few ticks per day or even zero. Because of this bars based look back strategy will not work due to the chart being incomplete.

My workaround to this is using the time of day to get the data at the right time. I'm reaching out because I am not sure if thinkscript is capable of returning a bar based on the time.

The logic looks something like this:

If data is present in the time slot 1 on the current session get data, if not set relevant values to zero.

If data is present in the time slot 2 ob the current sesaion get data, if not set relevant values to zero.

.
.
.

I also want to know what time slot is currently active in a given session. The trade day is from 930 am to 4pm. That is 13 30 minute sessions over 6.5 hours. This is how I am planning on discritizing the trading day. I need a variable that can return 1-13 corresponding with the proper time slot. That way averages can be calculated no matter when you run the code. After the market closes that value would return 13.

Any insight would be greatly appreciated!
Consider incorporating additional filters or conditions: You may want to introduce additional filters or conditions to further refine the unusual options activity. For example, you could add criteria such as minimum volume thresholds, specific expiration dates, or strike price ranges to focus on specific trading scenarios. Implement parameterization: Instead of hard-coding specific values or thresholds in the script, consider parameterizing them. This allows you to easily adjust and experiment with different values without modifying the code itself. You can define input variables at the beginning of the script and adjust them as needed. Consider incorporating risk management features: While the script focuses on identifying unusual options activity, it's also crucial to consider risk management aspects. You could explore incorporating features such as stop-loss levels, position sizing based on risk tolerance, or risk-reward analysis to enhance the overall trading strategy. Optimize efficiency: Depending on the scale of your data or the platform you're using, you may want to optimize the script for efficiency. This could involve minimizing redundant calculations, using built-in functions or data structures for better performance, or leveraging parallel processing techniques if applicable. Something similar to what the program OptionStrats offers.
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
494 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