QuantRocket

Using get_prices how do I get a single closing price for a date and conid


#1

Our objective is to populate a standard Pandas DataFrame with the closing prices for a security over a range of trading days centred about a target date.

The DataFrame returned by the get_prices method is complex and it is difficult to understand how to achieve our objective.

Could you provide some guidance on using get_prices to get a single closing price for a date and conid as well.

I have attached a screen-shot of some code we are using to explore the data. It doesn’t achieve what we want at the moment.

Thank you for any assistance you can provide

Kind Regards
Michael Minto

HunterLabs


#2

Hi Michael,

Selecting a single value from a DataFrame is a pandas question, not QuantRocket-specific. QuantRocket assumes you have a basic working knowledge of Pandas or are willing to acquire it elsewhere. You can find many answers to your question on StackOverflow and elsewhere on the internet. Please take that route to get help for this one. The forum is really intended for bugs and other problems with the software that only we can address.

The reality of being a small company is that we want to be helpful but we want to do it in a scalable, viable way. Based on our prices, it’s not possible to wade into offering code review and general programming help unless it’s under a separate paid support agreement, but in this case you don’t need that as the answers are out there.


#3

Hi Brian

Thanks for the prompt response

Yes the question is in part a pandas question, and I am happy to pursue that aspect of the question using stack overflow etc.

What would be helpful is if you could provide some guidance as to the structure of the data that is returned by the quantrocket get_prices(…) method.

With that better understanding I can more confidently slice and dice the method response so as to achieve my objectives.

In the meantime I will continue to explore the response data.


#4

The documentation covers get_prices here.