question

Upvotes
Accepted
3 0 0 4

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

#contentderivativesotc
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @Moti.Konak ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS

Upvotes
Accepted
5.8k 21 2 6

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.df

1701093062926.png



1701093062926.png (11.9 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
3 0 0 4

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


icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

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(),
    ]
)

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:


https://developers.lseg.com/en/article-catalog/article/calculating-implied-volatilities-of-at-the-money-index-options#AllTradesDeliveryLayer

Upvotes
3 0 0 4

noted. Thanks Jonathan.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.