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
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛