Options Chain AFL Setups and Pre-requisites
Setup
1. Copy the AFL files in the appropriate directory
There are three files
- OptionsPricing.afl
- OptionSymbols.afl
- OptionsChainWithOI.afl
Copy the first two files (OptionsPricing.afl and OptionSymbols.afl) into the folder
<Amibroker directory>\Formulas\Include
Copy OptionsChainWithOI.afl to <Amibroker directory>\Formulas\Custom folder
The first two files are generic function which can be used in any AFL for Option Pricing and
generating options symbols. Since these functions are generic they are stored in a separate common
directory so that they can be access easily in the future.
2. Update Strike Multiple
Each Future contract has a different Strike Multiple. Bank Nifty has 100, Nifty is 50, TCS is 20
and so on. The following setup will help tell Amibroker what is the Strike multiple for a
symbol. Select a Symbol and then from AmiBroker Menu>Symbols>Information tab
In the Information Tab, Enter the Strike Multiple for that Symbol. Below I am enter the Strike
Multiple as 100 for BankNifty_I in the “Shares Out.” Field. This is a onetime setup so that
every time we don’t need to tell Amibroker the Strike Multiple.
Similarly for NIFTY_I, you enter the value of 50 in the “Shares Out.” Field.
Pre-requisites
Ensure that all the required Options Symbols are defined in our Amibroker Database. The Options
Chain is Dynamic AFL. It plots the options strikes around the ATM. i.e. +/- 10 to 15 Strikes around the
ATM. So lets say BNF is trading at 22400, the Chain will plot strikes from 23400 to 21400. These
symbols have to be present in the Amibroker database.
Using the AFL
Go to a Blank Sheet for futures Symbol, Say BankNIFTY_I. and Simply double Click on
“OptionChainWithOI” in the Custom folder in the charts tab
The Parameter will popup.
1. Choose the DataProvider- from the dropdown. Currently on Truedata, GDFL, BestRTNex,
AccelPix , Amifeed/AmiFeeder and are supported.
2. Choose the Number of Strikes to plot
3. Enter the Expiry Date.
4. Choose Monthly or Weekly Options. Note for Stock Future do not use “Weekly”
Click on OK and you are ready to go.
If you do not like something in the design or the way it works, please do not hesitate to DM me.