Calculate IV Level where most days are less - ThinkOrSwim Programming | futures io social day trading
futures io futures trading


Calculate IV Level where most days are less
Updated: Views / Replies:673 / 3
Created: by HumbleViking Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Calculate IV Level where most days are less

  #1 (permalink)
Trading Apprentice
Cincinnati, OH
 
Futures Experience: Advanced
Platform: TOS
Favorite Futures: SPX
 
Posts: 2 since Mar 2014
Thanks: 0 given, 0 received

Calculate IV Level where most days are less

I want to find the lowest implied volatility level where some large percentage of days is less than. In other words, given a percentage P% for a given underlying, fill in the blank in the following statement: "P% of the time, implied volatility is less than BLANK." My difficulty is writing this functionality in thinkScript, which is why I am posting it here. I have written the logic two different ways in C programs and also written a stub "study" in thinkScript. futures.io (formerly BMT) won't let me post a link to my tarball here, so if interested look me up @tomstevelt and get it from my recent tweet. Or send me a message here.

Based on my observations, the IV level I am looking for is much lower than the percentage of high minus low. It looks to me that IV cruises along at a low to medium low level, with occasional spikes up and back down.


#
# Script: IV_Level ( Percent );
# Author: Tom Stevelt
# Date : March 9, 2014
# Result: Plot implied volatility AND
# answer the question:
# P% of the time, IV is below X.
# Twittr: @tomstevelt

declare lower;
input Percent = 90.0;
plot Data = imp_volatility();

# Need code here! Stub value reasonable for SPX
def Answer = 17.12;

plot Level = Answer / 100.0;
AddLabel ( yes, Concat(Concat ( Percent, "% of the time, IV is below " ), Concat ( Answer, "." )) );


Thanks for looking, please share success!

Reply With Quote
 
  #2 (permalink)
Elite Member
Trubchevsk
 
Futures Experience: Beginner
Platform: tos
Favorite Futures: stocks
 
Posts: 48 since May 2011
Thanks: 34 given, 64 received

Here it is

 
Code
                            
def iv impVolatility()*100;

input window 200;
input IVCut 12;
def count fold i 0 to window with n do if getvalue(iv,i,window) < IVCut then n+else n;
def percentage = (count window)*100;
Addlabel(yesconcat("p= ",percentage),color.violet); 
Settings :
window - full number of bars you want to calculate percentage of.
IVCut - lower implied volatility level...
for example by default this study will look how many times in last 200 bars the implied volatility was lower than 12%
Then it takes the calculated number and show it as a percent of 200.

Reply With Quote
The following user says Thank You to growex for this post:
 
  #3 (permalink)
Trading Apprentice
Cincinnati, OH
 
Futures Experience: Advanced
Platform: TOS
Favorite Futures: SPX
 
Posts: 2 since Mar 2014
Thanks: 0 given, 0 received

Cart before the horse


Thanks for your code, very nice example of the fold statement. Unfortunately, you calculated the percentage, with IV Level as an input. I am looking for the opposite: given a percentage, find the IV level that would "cut" the data set. If you look at my sample again, you'll see one input for Percentage. And then a stub to find and display the Answer.

I am starting to believe this can not be accomplished in thinkScript.

Reply With Quote
 
  #4 (permalink)
Elite Member
Trubchevsk
 
Futures Experience: Beginner
Platform: tos
Favorite Futures: stocks
 
Posts: 48 since May 2011
Thanks: 34 given, 64 received

I've seen your percentage input...and was thinking about realisation of this....but this task require to create the new, user defined array of IV data to search from. Thinkscript doent have such functionality yet
This piece of code at least helps a little..it may looks like ancient age style but IV is not that big number so you can find it manually by adjusting the IV setting and to look at percentage level until it reach the value you want.
To finetune it a little more we can change IV variable type to float... it will be

 
Code
                            
input IVCut 12.00
Hope it helps

Reply With Quote
The following user says Thank You to growex for this post:

Reply



futures io > > > > > Calculate IV Level where most days are less

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trading Psychology and How The Mind Works (IV) George Psychology and Money Management 111 October 5th, 2016 07:38 PM
Time and Sales - Level I - Level II - tick data trendisyourfriend Traders Hideout 4 August 28th, 2014 01:14 AM
IV RankLevels (Make them Dynamic?) DonStar ThinkOrSwim 1 February 23rd, 2014 05:12 PM
Need Level II and Level I realtime or historical data ptd26 Reviews of Brokers and Data Feeds 5 March 26th, 2010 04:27 PM
Just2Trade Level I and Level II Quote Quality? ptd26 Reviews of Brokers and Data Feeds 1 February 10th, 2010 08:15 PM


All times are GMT -4. The time now is 02:47 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-12 in 0.10 seconds with 19 queries on phoenix via your IP 54.90.207.75