Skip to content

Commit eb15f94

Browse files
author
Web Editor
committed
Automated push from server made by Louis Szeto
1 parent 6750665 commit eb15f94

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

06 Introduction to Options[]/02 QuantConnect Options API/04 Select Contracts.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@
6565
<pre class="python">def OnData(self,slice):
6666
for i in slice.OptionChains:
6767
if i.Key != self.symbol: continue
68-
optionchain = i.Value
69-
self.Log("underlying price:" + str(optionchain.Underlying.Price))
70-
df = pd.DataFrame([[x.Right,float(x.Strike),x.Expiry,float(x.BidPrice),float(x.AskPrice)] for x in optionchain],
68+
optionchain = i.Value
69+
self.Log("underlying price:" + str(optionchain.Underlying.Price))
70+
df = pd.DataFrame([[x.Right,float(x.Strike),x.Expiry,float(x.BidPrice),float(x.AskPrice)] for x in optionchain],
7171
index=[x.Symbol.Value for x in optionchain],
7272
columns=['type(call 0, put 1)', 'strike', 'expiry', 'ask price', 'bid price'])
73-
self.Log(str(df))
73+
self.Log(str(df))
7474
</pre>
7575
</div>
7676
<table class="table qc-table">

0 commit comments

Comments
 (0)