question

Upvotes
Accepted
11 3 4 5

Workspace codebook to get historical data of PB PE and PS

客户用workspace code book取nasdap股票的历史数据PE PB和PS,sample aapl.o

客户找不到合适的API example,麻烦可不可以协助提供sample code

workspace-data-api
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.

1 Answer

Upvotes
Accepted
62.1k 174 45 65

@Hao.Tang

Thanks for reaching out to us.

You can use the get_history method in the RD library to retrieve historical data of PB, PE, and PS.

The code looks like this:

rd.get_history(universe="AAPL.O", 
               fields=["TR.PE","TR.PriceToBVPerShare","TR.PriceToSalesPerShare"], 
               interval="1D", 
               start="2020-01-01", 
               end="2020-02-01")

The output is:

1664357745694.png

You can also refer to the Access__Get_History.ipynb example in 01.01. Refinitiv Data Library.

1664357822263.png

Please feel free to reach out if you have any further questions.


1664357745694.png (35.4 KiB)
1664357822263.png (10.0 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.