OTC Equity option will not show option premium
All,
The option premium <marketValueInDealCcy> shows empty <NA>. The premium should be around ~$327. Please see below script.
Can you please let me know what is wrong?
Many Thanks,
session.open()
rd.session.set_default(session)
response = option.Definition(
underlying_type=option.UnderlyingType.ETI,
underlying_definition = option.EtiUnderlyingDefinition("MSFT.O"),
end_date="2024-01-26",
strike= 70.0,
call_put = "Call",
pricing_parameters=option.PricingParameters(
valuation_date = "2023-11-20T00:00:00Z",
volatility_type='SVISurface'),
fields=[
"ValuationDate",
"marketValueInDealCcy",
"OptionType",
"ExerciseType",
"ExerciseStyle",
"DividendType",
"OptionPrice",
"UnderlyingPrice",
"EndDate",
"StrikePrice",
"VolatilityPercent",
"DeltaPercent",
"GammaPercent"]
).get_data()
#rdp.get_last_status()
response.data.df
ValuationDate marketValueInDealCcy OptionType ExerciseType ExerciseStyle DividendType OptionPrice UnderlyingPrice EndDate StrikePrice VolatilityPercent DeltaPercent GammaPercent
2023-11-20 <NA> Vanilla CALL EURO HistoricalYield NaN 377.44 2024-01-26 70 80.205572 0.998571 0.0
Best Answer
-
Hi @Moti.Konak
In the request it should be "MarketValueInDealCcy" (capital M):# !pip install refinitiv-data
import refinitiv.data as rd
from refinitiv.data.content.ipa.financial_contracts import option
rd.open_session()
response = option.Definition(
underlying_type=option.UnderlyingType.ETI,
underlying_definition = option.EtiUnderlyingDefinition("MSFT.O"),
end_date="2024-01-26",
strike= 70.0,
call_put = "Call",
pricing_parameters=option.PricingParameters(
valuation_date = "2023-11-20T00:00:00Z",
volatility_type='SVISurface'),
fields=[
"ErrorMessage",
"ValuationDate",
"MarketValueInDealCcy",
"OptionType",
"ExerciseType",
"ExerciseStyle",
"DividendType",
"OptionPrice",
"UnderlyingPrice",
"EndDate",
"StrikePrice",
"VolatilityPercent",
"DeltaPercent",
"GammaPercent"]).get_data()
response.data.df0
Answers
-
Thanks so much Jonathan!!! this works!
Is there any mechanism to catch errors as this? Once I received your answer, I noticed case differences in <parameters> VS <output> but it will be nice to check for errors if output is not shown as expected.
Also, do I use the best API approach available to calculate bulk of OTC Equity Options? I will need to calculate about 2000 OTC Equity options twice a day; daily.
Any advise/documentations for bulk API calculations usage will be appreciated.
Thanks
Moti
0 -
Hi @Moti.Konak,
That I know of, there is no built-in way to check for these errors. I personally us the 'ErrorMessage' field to check for errors, but this wouldn't work here.
When it comes to optimally fetching this kind of data, note that you can ask for several pricing models at the same time as used in this article (note that the max per call is 100) :
definitions = rd.content.ipa.financial_contracts.Definitions(
[
option_definition_01(),
option_definition_02(),
]
)0 -
Hi @Moti.Konak,
For such large calls, I'd suggest using the delivery layer and batching your call into 100s, which is the max for such IPA calls.
You can find a function, `Fin_Contracts_Chunk_Calls_Delivery_Lay`, that I made for just such uses here:0 -
noted. Thanks Jonathan.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 251 ETA
- 556 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 648 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 916 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛