Premium Decay in nifty

lemondew

Well-Known Member
#21
vagar,

All the best. I vent put more time in this one and hence sharing this raw files. these 3 scripts will get ATM strike prices realtime from now.


Code:
Dim strexpd As String

Public Sub mainsub()
Dim price As Double
Dim i1, i2, strikeGap, i As Integer
Dim strpr
For i = 1 To 22
price = ThisWorkbook.Sheets("premium").Cells(i, 2).Value
strikeGap = ThisWorkbook.Sheets("premium").Cells(i, 3).Value
i1 = CInt(price / strikeGap)
i2 = i1 * strikeGap
ThisWorkbook.Sheets("premium").Cells(i, 4).Value = i2
Next i
End Sub

Public Sub getPrice()
Dim i As Integer
Dim strpr, strsym As String
strexpd = "16JUN"
i = 1
For i = 1 To 22
strsym = ThisWorkbook.Sheets("premium").Cells(i, 1).Value
strpr = "=RTD(""now.scriprtd"",,""MktWatch"",""nse_fo|" + strsym + strexpd + "FUT"",""Last Traded Price"")"
ThisWorkbook.Sheets("premium").Cells(i, 2).Value = strpr
Next i
End Sub

Public Sub getOptions()
Dim i As Integer
Dim strpr, strsym, strstrikes, strCE, strPE As String
i = 1
For i = 1 To 22
strsym = ThisWorkbook.Sheets("premium").Cells(i, 1).Value
strstrikes = CStr(ThisWorkbook.Sheets("premium").Cells(i, 4).Value)
strCE = "=RTD(""now.scriprtd"",,""MktWatch"",""nse_fo|" + strsym + strexpd + strstrikes + "CE"",""Last Traded Price"")"
strPE = "=RTD(""now.scriprtd"",,""MktWatch"",""nse_fo|" + strsym + strexpd + strstrikes + "PE"",""Last Traded Price"")"
ThisWorkbook.Sheets("premium").Cells(i, 6).Value = strCE
ThisWorkbook.Sheets("premium").Cells(i, 7).Value = strPE
Next i
End Sub
 

lemondew

Well-Known Member
#22
getPrice()

This gets future prices for the scripts in the excel sheet

mainsub()

This gets the ATM strike prices

getoptions()
This gets the option prices.

Run them in this order. Code in VBA.....
 

vagar11

Well-Known Member
#28
How can we play this combination of call and put please explain
I haven't found myself any edge in option trading myself. I will share if I found something useful. You can look at Lemondew thread, he has shared some good stuff. Not having all the data is an issue.


By the above u can see blindly playing short straddle is also risky. Let me share the chart.
 
Last edited:

Similar threads