How to retrieve Cboe Put/Call Ratio via LSEG Data Library?

HHYY
HHYY Newcomer

Hi all,

I’m using the latest lseg-data Python library (v1.x) with a Desktop session.For equities like SPY.P the usual Level-1 fields (TR.CLOSE, BID, ASK, etc.) work fine, but I can’t figure out the correct identifier / field for the Cboe Put/Call Ratio.

I’ve tried several combinations without success:

ld.get_history(".PCALL",  ["TR.CLOSE"], "1d", start, end)   # LDError: identifier not resolved
ld.get_history(".PCRATIO",["TR.CLOSE"], "1d", start, end)   # same
ld.get_history("SPY.P",   ["PUT_CALL"],  "1d", start, end)  # field not supported

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @HHYY

    Thank you for reaching out to us.

    This forum is dedicated to software developers using LSEG APIs. The moderators on this forum do not have deep expertise in every bit of content available through LSEG products, which is required to answer content questions such as this one.

    The best resource for content questions is the Helpdesk support team, which can be reached by submitting queries through the LSEG Support. The support team will either have the required content expertise ready available or can reach out to relevant content experts to get the answer for you.

    You need to ask for the Excel formula, such as =RDP.Data, that can be used to retrieve the required data. Then, we can help you converting that formula to Python code.

    Otherwise, you can use the Data Item Browser tool to search for fields and parameters.