Impulse & SecurityThe logic of the indicator is simple. We have a large candle for the period N. In its range there are candles with the same extremums in the direction of the trend → Alert.
Important: It is not suitable for all coins and not for all TF
Options
Market HackThis indicator is intended to only be used in any timeframe between the 1 minute and the 15 minute. If greater than 15 minute, or less than 1 minute, then the table will disappear!
Furthermore, this is a very simple table containing 4 varying emojis:
🔱- This is a gold crossing, indicative of bullish momentum.
💀 - This is a death crossing, indicative of bearish momentum.
🟩 - This represents a bullish cycle, which reinforces the currently active bullish momentum.
🟥 - This represents a bearish cycle, which supports an active bearish momentum.
In summary, 🔱🟩 is perfect confirmation for CALL entry, but even better when at minimum the 1m and 3m care confirmed. Similarly, 💀🟥 confirms an upcoming entry for a PUT. Bear in mind, this indicator is not meant for any financial advice and is only meant to present market direction, or at least a few specific tickers' direction with the market.
Lal OnlineI made this indicator to help my friend to see the market direction and finding strike price. Regards. Lal Adidasan
ALL Ticker ID informationAn example and overview of the syminfo and tickerid functions to be able to access different tools.
Here is an example of accessing the Bitfinex exchange (and requesting "instrument name") when another exchange is open (BINANCE:BTCUSDT)
There is a difference in name between BINANCE:BTCUSDT and BITFINEX:BTCUSD exchanges
Try swapping //
T = "BITFINEX:"+str.tostring(syminfo.basecurrency)+"USDT"
//T = "BITFINEX:"+str.tostring(syminfo.basecurrency)+"USD"
The script will show that this instrument does not exist "Error in the value of the instrument. There is no such currency!"
Implemented Resolve error handling with the ignore_invalid_symbol=true parameter, this gives further processing of the script without errors.
----------------------------------------------------------
Пример и обзор функций syminfo и tickerid для возможности доступа к разным инструментам.
Здесь реализован пример доступа к бирже Bitfinex(и запрос "названия инструмента"), когда открыта другая биржа (BINANCE:BTCUSDT)
Существует разница в названии между биржами BINANCE:BTCUSDT и BITFINEX:BTCUSD
Попробуйте поменять // местами
T = "BITFINEX:"+str.tostring(syminfo.basecurrency)+"USDT"
//T = "BITFINEX:"+str.tostring(syminfo.basecurrency)+"USD"
Скрипт выдаст, что данного инструмента нет "Ошибка в значении инструмента. Такой валюты нет!"
Реализована Обработка ошибки Resolve error с помощью параметра ignore_invalid_symbol=true это дает дальнейшую обработку скрипта без ошибок.
Rangebar timeThis indicator determines the time (in minutes) for which a bar of the Range Bar type was formed.
In order to avoid errors in the calculations, a weekend check is immediately carried out (one day if it is a holiday or two days if it is a weekend).
If there are more days off, then the information on the first bar after the weekend may be incorrect.
Индикатор определяет время (в минутах), за которое образовался бар типа RangeBar.
Cразу идет проверка на выходные дни (один день, если праздник или два дня, если выходные).
Если выходных больше, то информация на 1-ом баре, после выходных может быть некорректна.
VIX FixSistema de trading hecho por Larry Williams, basado en VIX, optimizado para cualquier activo.
Formula:
(Highest (Close, 20) - Low) / (Highest (Close, 20)) * 100
Donde “Highest (Close, 20)” representa el cierre mas alto de los ultimos 20 periodos
Larry Williams Mechanical Trading System based on VIX.
The VIX Fix applies the same general formula that is used to calculate the stochastic indicator, so can be used for any asset:
(Highest (Close, 20) - Low) / (Highest (Close, 20)) * 100
Where “Highest (Close, 20)” means the highest closing value in the past 20 periods and the low refers
to the current period’s low. The formula can be applied to any timeframe.
Sentimental Cycles with CrossingsThis indicator provides the following options, where you can choose to display:
DEMA TEMA cycles, filtered by default with sentiment.
Sentiment cloud, based on the 200ema area between the 1 minute and 1 hour lines.
One or both ema crossings with their respective timeframes (independent from current chart timeframe) and optional line display.
One or two tickers and their respective crossings based on selected timeframes.
Additional EMA lines supplied with their very own timeframe.
This indicator is intended to be used any way suitable to the user, nearly every aspect is customizable, and the defaults are just enough to get you started on deciding whether it's time to enter calls or puts.
TIPS for optimal results:
- Try using 2 charts: the 1 minute and the 1 hour per symbol. Under the 1 minute chart, use the 3 minute and 5 minute timeframe for crossings.
- Try to start a position when a sentimental DEMA TEMA cloud is beginning to form. The first bar usually pays thicc.
- Tickers SPY and VXX can be of good reference for market direction. If all crossings coincide, it's because there's a strong momentum in a certain direction for the market.
Future TimevalueThis indicator plots a chart of future timevalue for all NSE index and NSE FNO Stock. It plots the difference of future and spot's 1min candle close price.
Just open any index or stock spot chart in 1 min timeframe(works with higher tf also) and add the indicator.
FDAX Impulse TimesThis little scrip is used to automatically draw the most important time periods of the DAX Futures into your chart. You can use the configuration gear to adjust the position of the rectangles based on the current price level.
Artharjan INDIA VIX v/s Nifty Volatility DashboardHi,
I have created Artharjan INDIA VIX v/s Nifty Volatility Dashboard to forecast the Annual, Quarterly, Monthly, Weekly, Daily and Hourly Volatility of NIFTY Benchmark Index based on current value of INDIA VIX. This will help Index Options Sellers to decide the range of Nifty for the given period based on current level of volatility indicated by INDIA VIX.
Options Sellers may make use of the Min Range and Max Range values for the Strike Price Selection.
Regards
Rahul Desai
@Artharjan
Auto Support & Resistance From Option Strike Price + PercentagesAUTO SUPPORT AND RESISTANCE FROM OPTIONS STRIKE PRICES WITH PERCENTAGE GAPS
This is an auto support and resistance level indicator that uses options strike prices or psychological numbers as the relevant levels. Set your starting level or strike price and input the options strike price gaps for that ticker and 15 lines in either direction will automatically populate on the chart. It also has a table in the bottom right corner that tells you how far the current price is from the next closest support and resistance levels.
Everything is easily customizable in the indicator input settings including turning the lines on/off, turning the percentage gaps table on/off, setting the options strike price gaps, setting the starting level, setting the position of the percentage gaps table, changing support and resistance line colors all at once and updating the linewidth of all of the support and resistance lines at once.
***HOW TO USE***
First, go into the indicator settings and set the starting level to use. If you are trading SPY and it is near 450, then set your starting level at 450. If you are trading SQQQ and it is near 38, set your starting level to 38. If you are trading crypto, set your levels to the nearest psychological or round number such as 40,000 for BTC or 2,500 for ETH or 16.50 for LINK.
Second, set your options strike price gaps. If you are trading SPY, this will be 2.5. If you are trading SQQQ this number would be 1. If you are trading crypto, try using psychological price levels instead of strike prices, such as 500, 1000 or 5000 for BTC and 100, 250 or 500 for ETH. For small priced cryptos, use decimals such as .25, .50, etc.
Once these inputs are filled in, 15 levels in each direction will automatically populate on the chart for you.
If price is above a level, it will paint green. If price is below a level it will paint red. These colors represent support and resistance visually for you on the chart and will change dynamically as price moves above or below these levels. These colors can be customized in the indicator input settings to change all lines by only updating one color.
There is a table of percentage gap updates that will tell you in real time how far away the price is from the nearest support and resistance lines so you always know your risk to reward ratios. Each label will also be colored the same as the corresponding support or resistance line as a visual aid.
***MARKETS***
This indicator can be used as a signal on all markets, including stocks, crypto, futures and forex.
***TIMEFRAMES***
This support and resistance indicator can be used on all timeframes.
***TIPS***
Try using numerous indicators of ours on your chart so you can instantly see the bullish or bearish trend of multiple indicators in real time without having to analyze the data. Some of our favorites are our Auto Fibonacci, Directional Movement Index, Volume Profile, Momentum and Money Flow Index in combination with this auto support and resistance indicator. They all have real time Bullish and Bearish labels as well so you can immediately understand each indicator's trend.
Weighted Standard Deviation BandsLinearly weighted standard deviations over linearly weighted mean.
The rationale of the study can be deduced from my latest publications where I go deeper into explaining the benefits of linear weighting, but in short, I can remind that by using linear weighting we are able to increase the information gain by communicating the sequential nature of time series to the calculations via linear weighting.
Note, that multiplier parameters can take both negative and positive values resulting in ability to have, for example, 1st and 6th weighted standard deviations higher than the weighted mean.
Despite the modification of the classic standard deviation formula, I assume that mathematical qualities of standard deviation will hold due to the fact we can alternately weight the window itself, and then apply the classic standard deviation over the weighted window. In both cases, the results will be the same.
Aight that was too formal, but your short strangles should be happy
Here is it, for you
Top 40 High Low Strategy for SPY, 5minThis strategy is developed based on my High Low Index SPY Top 40 indicator
Notes:
- this strategy is only developed for SPY on the 5 min chart . It seems to work with QQQ as well, but it isn't optimized for it
- P/L shown is based on 10 SPY option contracts, call or put, with strike price closest to the entry SPY price and expiry of 0 to 1 day. This includes commissions (can be changed). This is only an estimate calculated using an arbitrary multiplier factor, this can be changed in the setting
- P/L is based on $5000 initial capital
- Works with both regular / extended trading session turned on/off. However, max drawdown is 1/2 with extended trading session ON
- there is still a bug that doesn't allow alert to be created due to calculation error, will update once fixed
This strategy combines signals from the following indicators to determine entry signals:
- High Low Index SPY Top 40
- MACD
- Linear Regression Slope
Entry signal is triggered when:
- High Low Index line crosses the EMA line
- MACD trending in the same direction
- Linear Regression slope is accelerating above a threshold in the same direction, indicating a strong trend
Profit target(PT) and stop loss(SL) are determined using ATR value, with 2:1 Reward to Risk ratio as default.
Exit signal may be triggered prior to PT or SL trigger when:
- High Low Index SPY Top 40 shows a reversal after overbought or oversold conditions (optional)
- Opposite entry signal is triggered
There are a number of optional settings:
- Turn on/off "option trading", P/L will be calculated using share price only without multiplication factor for trading option contracts
- # of options per trade, default to 10
- Reinvest with profit made
- Trade with trailing SL after PT hit
- Take profit early based on Top 40 overbought/oversold
- Trade 0/1 day expiry. This will signal exit by the end of the day on Mon/Wed/Fri, and only exits 1/2 of positions (if in profit) on Tues/Thurs
- Can reduce the SL level without impacting PT
- No entry between 10:05 - 10:20 (don't ask me why, but statistically it performs better)
Consider donating me some of your profit if you make $$$ hahaha~ ;)
Enjoy~~
Technimentals RobotThis robot includes multiple trade signal algorithms and technical overlays. With tools for all markets and trading styles, access original and beautiful charting tools that work for you.
Flexible and robust trend detection & confirmation
Maverick mean reversion signals
Immensely customizable settings for all markets
Indicator prediction zones, perfect for options traders
The most beautiful bands in the world
As of this update, Technimentals Robot includes:
Queen Mary - A powerful mean reversion algorithm which compares the performance of the chart against the performance of a user-chosen benchmark. She uses short term mean reversion optionally combined with longer term trend following logic to detect possible deviations and thus unique pivot points which may lead to short term reversals or continuations of trend.
Brian - An agile and fully customizable trend following algorithm which uses various filtering systems to hone signals.
Prediction Zones - Projections of future price levels and indicator levels, currently featuring RSI and MFI.
Volume Weighted Filtered Bands - The most beautiful bands in the world.
...and much more! Check the change log below for new features.
Technimentals Robot is an all-in-one suite of indicators designed to be used as a standalone trading system. The backbone of this indicator is the trade signal generation. However, blindly following trade signals without context is unwise and that's where the supplementary bands and Prediction Zones come in. The signals are designed to be used primarily for entry signals; the bands can be used to determine whether or not a chart is overextended (and worth stopping out or profit taking) or not. The Prediction Zones are built in particular for those wishing to trade these signals via options due to the quantifiable nature of their predictions, but they too can be used to add an extra data point for knowing which areas of support & resistance to use when determining take profit and stop loss locations.
Sub-Component Descriptions:
Queen Mary
Queen Mary is a versatile trading signal generator which uses another symbol as a benchmark to build trading signals for your chart.
Queen Mary works by detecting whether or not there are sustained divergences and alerts the user via trade signals for when reversions to the mean are expected.
A typical use case for Queen Mary would be to set her to run on a technology stock with a technology ETF as the benchmark, but you use any pair of your choice.
Buy signals on the chart simultaneously indicate sell signals in the benchmark.
This can be used for pairs trading and long/short portfolio strategies.
Suppose the following; you’ve applied Queen Mary to a chart of AAPL and are using XLK as the benchmark. A buy signal for AAPL would also indicate a sell signal for the XLK. The user could then long AAPL and short XLK the same dollar amount, expecting a reversion to the mean.
Brian
Brian is a flexible trend following algorithm which uses multiple filtering techniques to hone entries and exits.
Brian has been designed to catch every major trend without fail. The inevitable problem all breakout or trend following algorithms face is their propensity to get chopped up during sideways market action. Brian addresses this problem via the ‘Risk’ setting which allows the user to determine the market conditions via a risk/reward standpoint.
During periods of sideways action, the risk setting should be increased. This will reduce the number of signals Brian gives and increase the odds of the breakout leading to a continuation.
Brian signals profit taking signals via blue flags. These always occur at a user defined risk to reward ratio. Partial profits should always be taken as soon as these flags occur. It is advised to use a user-defined trailing stop loss on the remaining position which suits the user’s own risk preferences.
Prediction Zones
Prediction Zones predict zones of indicator and price levels into the future.
Currently featuring the Relative Strength Index and the Money Flow Index, Prediction Zones will display at what future prices these indicators will reach user defined outputs.
A classic use-case example of this would be for options traders as these zones can be used as support and resistance areas. For example, if you believe the daily RSI won’t reach below 30 before the end of the week, you can use this zone as another data point for deciding where to put your short strike.
The zones can be shown into the past too so you can see how they behaved on historical data.
Volume Weighted Filtered Bands
These bands are built by firstly using a volatility and short term range detection algorithm and plugging this into three different lengths of smoothing filters. The output is then combined and filtered one last time before being coloured and plotted as multiple bands.
They can be customized to suit any trading style, but were built with scalp traders particularly in mind. It’s rare for prices to deviate from these bands for long.
A typical use case for these bands would be to trade with the trend while price is trading cleanly inside and in the same direction as the bands. Profit taking should typically be considered when price exceeds the bands, although this will depend on the settings chosen by the user.
The bands can also be used to gauge volatility (with an unusual increase in width) and volume (increased brightness).
The brightness of the bands are determined by volume, the brighter the bands are, the greater the volume.
Queen Mary
Brian
Most of the above images were carefully chosen, others were not. No indicator or strategy is perfect. Trend following algorithms will inevitably experience chop. Mean reversion algorithms will inevitably miss out on the big moves. Our tools aim to give you the data to help you determine which signals to act upon.
You are responsible for your own trading decisions. Trading signals are worthless if you do not have a clear plan, including exit targets and risk management. If you do not have these, you should study them seriously before considering fancy indicators. This indicator is probably unsuitable for beginners.
VIX RangeThis indicator shows the daily expected trading range of the instrument.
An upper and lower line denotes the range. It is calulated based on the volatility index selected (NSE:India VIX is used by default). Also it shows developing upper and lower line for the next trading day.
Non-directional option strategies (like straddle, strangle) can be performed based on the expected trading range.
EMA Options Clouds With SignalsEMA Clouds for Options!
This indicator can help you confidently open and close options positions. Note that you should set stop a little below midline EMA . Risk reward for good signals is fairly consistent in profit. Most of the simulations I ran got between 1:2 and 1:4 profits. The losers usually can be avoided by making sure you are not in a choppy trading channel. Wait for EMAs to start separating and don't blindly follow every buy/sell.
3 wave EMA + Clouds:
Defaults:
EMA 8/32/64
Signals (off by default - turn on in settings):
Buy Call/Sell Call (open/exit call positions)
Buy Put/Sell Put (open/exit put positions)
Enter signals bullish:
Close over Middle EMA AND Short EMA > Middle EMA > Long EMA
Exit signals bullish:
Close under Middle EMA OR trend turns bearish (Short EMA < Middle EMA < Long EMA )
Enter signals bearish:
Close under Middle EMA AND Short EMA < Middle EMA < Long EMA
Exit signals bearish:
Close over Middle EMA OR Short EMA > Middle EMA > Long EMA
Cloud Colors (Default)
Green: Bullish
Red: Bearish
White: Chop/Transition
boonam17_ALERT이용 관련 문의는 이메일 boonam17@naver.com 통해 해주시기 바랍니다.
백테스트 결과와 실제 투자 결과는 개인 블로그를 통해 업데이트할 계획입니다.
OpenMarketLondon Open Market to New York Open Market.
Only weekday is visible.
Summer -- 1500-2000
Winter -- 1600-2100
CPR Option Selling StrategyGood afternoon traders,
This is a script I built for option selling, in attempt to have a high success rate.
The gist of how it works:
It uses the opening or close of the current chart's timeframe opening bar when referenced against a designated (higher) timeframe's central pivot range (CPR).
Using that comparison, this script calculates an option to sell: put, call, or iron condor. It will calculate a call value using an average of the CPR central pivot and the max value of the prior higher timeframe's high or R1 (whichever is higher.)
It does the same for the put side, but uses the higher timeframe's low or S1 (whichever is lower.)
It will use the option on the other side of the source (open or close) of the CPR as the "option in play."
Settings:
There are many settings, most are simply "viewable" settings, and probably self explanatory, others, not so much:
"Source for Trigger" - this is the value used on the "opening bar," such as the close. This value is the one compared to the Central Pivot Range in determining whether to sell a call (if the source is lower,) sell a put (if the source is higher,) or an iron condor if it's in the CPR.
"Show Historical Win/Loss Percentages" - this shows a table in the bottom right of the W/L percentages for the current ticker and settings. Used for a quick glance at historical success rates.
"Extend Developing Levels Into the Future" - This will extend the developing values for CPR values, call and put values into the future (good for trying to trade early or setting up pre-market trades, assuming there will not be huge gap in one direction or another.)
"Select Higher Timeframe" - "Auto" will choose the higher timeframe for you. "Manual" will use the next field...
"If Manual, Timeframe for Pivots" - allows you to choose a different higher timeframe.
The next two sections are simply whether to show the plots for different levels of traditional and/or camarilla pivot points.
The last section will allow you to just filter on certain days. Really only useful for "backtesting" certain 0DTE trades on some daily options during the hourly chart.
Example use:
An example use (which I completed last week) on the chart referenced in this share: I sold a put-spread for $0.90, selling a 590 and buying a 570 strike in the middle of the week. I was looking at an hourly timeframe chart with a weekly pivot timeframe for the strategy.
Obviously, making only $0.90 on a $20 spread, there is a lot more to lose than to make, but I did some other analysis to go with it, so I felt safe, and I had a stop set for $1.50. So it worked, along with 3 other plays I did, very similar, and if that "Historical Win/Loss Percentage" is accurate, which I am fairly certain it is, I felt good about it.
The key all comes down to what you sell it for, right? That piece only you can determine. :)
Happy trading and enjoy,
Deuce
Binance Futures/Spot PriceShows the last price of either the spot or futures market on Binance, for the current coin.
It shows futures if you are in a spot market, and spot if you are in futures.
Currently this only works for USD stable coin pairs (BUSD, USDT, USDC, ...).
I don't plan to add COIN future pairs, it's not useful to me.
Additionally, it allows you to show the lowest and highest traded price (in the opposite market you are currently on: spot/futures) for a given period, and the respective chart, if you are into that sort of thing.
Bye :D
Trading Made Easy Pressure OscillatorAs always, this is not financial advice and use at your own risk. Trading is risky and can cost you significant sums of money if you are not careful. Make sure you always have a proper entry and exit plan that includes defining your risk before you enter a trade.
Those who have looked at my other indicators know that I am a big fan of Dr. Alexander Elder and John Carter. This is relevant to my trading style and to this indicator in general. While I understand it goes against TradingView rules generally to display other indicators while describing a new one, I need the Bollinger Bands, Bollinger Bands Width, and a secondary directional indicator to explain the full power of this indicator. In short, if this is strongly against the rules, I will edit the post as needed.
Those of you who are aware of John Carter are going to know this already, but for those who don’t, an explanation is necessary. John Carter is a relatively famous retail-turned-institutional (sort of) trader. He is the founder of TradetheMarkets, that later turned into SimplerTrading. Him and his company have a series of YouTube videos, he has made appearances on the MoneyShow, TastyTrade, and has authored a couple of books about trading. However, he is probably most famous for his “Squeeze” indicator that was originally launched on Thinkorswim and through his website but has now been incorporated into several trading platforms and even has a few open-source versions available here. In short, the Squeeze indicator looks to identify periods of consolidation and marry that with a momentum oscillator so you can position yourself in a quiet period before a large move. This in my opinion, is one of the best indicators an option trader can have, since options are priced both on time and volatility. To do this, the Squeeze identifies when the Bollinger Bands, a measure of price standard deviation, have contracted inside the Keltner Channels (a measure of the average range of a stock). This highlights something known as “the Squeeze”, when the 2x standard deviations (95% of all likely price movement using data from the past 20 periods) is less than the 1.5x average true range (ATR) of the stock over the same number of periods. These periods are when a stock is resting and in a period of consolidation and is generally followed by another large move once it has rested long enough. The momentum oscillator is used to determine the direction of this next move.
While I think this is one of the best indicators ever made, it is not without its pitfalls. I find that the “Squeeze” periods sometimes take too long to setup (something that was addressed by John and released in a new indicator, the Squeeze Pro, but even that is still slowish) and that the momentum oscillator was also a bit slow. They used a linear regression formula to track momentum, which can lag considerably at times. Collectively, this meant that getting into moves a few candles late was not uncommon or someone solely trading squeeze setups could have missed very good trade opportunities.
To improve on this, I present, the Trading Made Easy Pressure Oscillator. This more accurately identifies when volatility is reducing and the trading range is likely to contract, increasing the “pressure” on the price. This is often marked several candles before a “Squeeze” has started. To identify these ranges, I applied a 21-period exponential moving average to the Bollinger Bands Width indicator (BBW). As mentioned above, the Bollinger Bands measure the 2x standard deviation of price, typically based on a 20-period SMA. When the BBs expand, it marks periods of high volatility, when they contract, conversely, periods of low volatility. Therefore, applying an EMA to the BBW indicator allows us to confidently mark when volatility has slowed down earlier than traditional methods. The second improvement I made was using the Absolute Price oscillator instead of a linear regression-style oscillator. The APO is very similar to a MACD, it measures the difference between two exponential moving averages, here the 8 and 21 (Fibonacci EMAs). However, I find the APO to be smoother than the MACD, yet more reactive than the linear regression-style oscillators to get you into moves earlier.
Uses:
1) Buying before a bigger than expected move. This is especially relevant for options traders since theta decay will often eat away much of our profits while we wait for a large enough price move to offset the time decay. Here, we buy a call option/shares when the momentum oscillator matches the longer-term trend (i.e. the APO crosses over the zero line when price is above the 200-day EMA, and vice versa for puts/shorting the stock). This coincides with Dr. Elder’s Triple Screen Trading System, that we are aligning ourselves with the path of least resistance. We want to do this when price is currently in an increasing pressure situation (i.e. volatility is contracting) to make sure we are buying an option when premium and Implied Volatility is low so we can get a better price and have a better risk to reward ratio. Low volatility is denoted by a purple dot, high volatility a blue dot along the midline of the indicator. A scalper or short-term swing trader may look to exit when the blue dots turn purple signalling a likely end to a move. A longer-term trend trader can look to other exit scenarios, such as a cross of the oscillator below the zero line, signalling to go short, or using a moving average as a trailing stop.
2) Sell premium after a larger than expected move has finished. After a larger than expected move has completed (a series of blue dots is followed by a purple dot), use this time to sell theta-driven options strategies such as straddles, strangles, iron condors, calendar spreads, or iron butterflies, anything that benefits from contracting volatility and stagnating prices. This is useful here since reducing volatility typically means a contraction of prices and the reduced likelihood of a move outside of the normal range.
3) Divergences. This indicator is sensitive enough to highlight divergences. I personally don’t use it as such as I prefer to trend trade vs. reversion trade. Use at your own risk, but they are there.
In summary, this indicator improves upon the famous Squeeze indicator by increasing the speed at which periods of consolidation are marked and trend identification. I hope you enjoy it.
FunctionBlackScholesLibrary "FunctionBlackScholes"
Some methods for the Black Scholes Options Model, which demonstrates several approaches to the valuation of a European call.
// reference:
// people.math.sc.edu
// people.math.sc.edu
asset_path(s0, mu, sigma, t1, n) Simulates the behavior of an asset price over time.
Parameters:
s0 : float, asset price at time 0.
mu : float, growth rate.
sigma : float, volatility.
t1 : float, time to expiry date.
n : int, time steps to expiry date.
Returns: option values at each equal timed step (0 -> t1)
binomial(s0, e, r, sigma, t1, m) Uses the binomial method for a European call.
Parameters:
s0 : float, asset price at time 0.
e : float, exercise price.
r : float, interest rate.
sigma : float, volatility.
t1 : float, time to expiry date.
m : int, time steps to expiry date.
Returns: option value at time 0.
bsf(s0, t0, e, r, sigma, t1) Evaluates the Black-Scholes formula for a European call.
Parameters:
s0 : float, asset price at time 0.
t0 : float, time at which the price is known.
e : float, exercise price.
r : float, interest rate.
sigma : float, volatility.
t1 : float, time to expiry date.
Returns: option value at time 0.
forward(e, r, sigma, t1, nx, nt, smax) Forward difference method to value a European call option.
Parameters:
e : float, exercise price.
r : float, interest rate.
sigma : float, volatility.
t1 : float, time to expiry date.
nx : int, number of space steps in interval (0, L).
nt : int, number of time steps.
smax : float, maximum value of S to consider.
Returns: option values for the european call, float array of size ((nx-1) * (nt+1)).
mc(s0, e, r, sigma, t1, m) Uses Monte Carlo valuation on a European call.
Parameters:
s0 : float, asset price at time 0.
e : float, exercise price.
r : float, interest rate.
sigma : float, volatility.
t1 : float, time to expiry date.
m : int, time steps to expiry date.
Returns: confidence interval for the estimated range of valuation.
[TTI] Option expiration Lines––––History & Credit ––––––––––––––––––––––––––––––––––––––––––
While doing my yearly trade reviews, I wanted to see where I exited and entered compared to my position expiration (given I am an options trader).
–––––What it does ––––––––––––––––––––––––––––––––––––––––––
Input a date and the script will draw two vertical lines.
One the date you input and second 5 days back.
Additionally, it will highlight the 30day high and 30day low within those lines as a box.
–––––How to use it ––––––––––––––––––––––––––––––––––––––––––
You can use the script for trade reviews (as I have).
Additionally, you could set trading rules based on time. For example:
Do not hold trades past 2days to expiration
Or have tigher target and loss parameters for Opex week