Algorithmic Trading & Indicators
Intermediate
Larry Williams VIX Fix Synthetic Panic Bottom Indicator in Python
Calculate Larry Williams' VIX Fix indicator in Python Pandas to detect panic selling climaxes and high-probability swing bottoms on any individual stock or crypto.
#pandas#numpy
Problem Statement
Individual stocks and crypto tokens don't have their own implied volatility index like the S&P 500 VIX or India VIX. Williams VIX Fix synthesizes implied volatility from 22-day rolling highs and current lows.
Formula / Core Logic
WVF = 100 * (Highest(Close, 22) - Low) / Highest(Close, 22)
Panic Bottom Signal when WVF > Upper_Bollinger_Band(WVF, 20, 2.0)
Installation
pip install pandas numpy
williams-vix-fix-market-bottom-detector-python.py
import pandas as pd
import numpy as np
def williams_vix_fix(df, lookback=22, bb_len=20, bb_mult=2.0):
df = df.copy()
highest_close = df['Close'].rolling(lookback).max()
df['WVF'] = ((highest_close - df['Low']) / highest_close) * 100
wvf_sma = df['WVF'].rolling(bb_len).mean()
wvf_std = df['WVF'].rolling(bb_len).std()
df['WVF_Upper_BB'] = wvf_sma + (bb_mult * wvf_std)
df['Panic_Bottom_Buy'] = np.where(df['WVF'] >= df['WVF_Upper_BB'], 1, 0)
return df
Get the Complete 100+ Python Quant & Automation Bundle
Instant lifetime access to all production-ready scripts, valuation models, and trading bots ($19).
Buy Full Bundle on Gumroad ($19) →Frequently Asked Questions
Q: Does Williams VIX Fix work on weekly charts?
Yes, on daily and weekly timeframes it accurately highlights major capitulation wicks for long-term accumulation.