question

Upvotes
Accepted

Beta Expression in R via Datastream API

Hi,

I am trying to run an expression in r using the DatasteamDSWS2R package. I have be able to get a more simple expression working, but for what ever reason the formula supplied is not generating any data.

mydsws$timeSeriesRequest(
     instrument = 'A:BHPX'
     expression = "REGB#(PCH#(CFM#(ASXAORD,VAL),1M),PCH#(CFM(XXXX,VAL),1M),60M)",
     startDate = "-0D",
     endDate = "-0D",
     frequency = "D")

I have tried saving the expression and call via timeseries and snapshot requests and get varying messages.

1697519597441.png

I have tested in excel and the value should be 0.8362 but from some reason it is not pulling the figure. Can anyone see what I am doing wrong?

Thanks
Adam

#technologydsws-apirdatastream
1697519597441.png (32.4 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.

Hello @ics-applicationsupport

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

1 Answer

· Write an Answer
Upvotes
Accepted
79.2k 251 52 74

@ics-applicationsupport

Thank you for reaching out to us.

The code should be like this:

mydsws$timeSeriesRequest(
     instrument = 'A:BHPX',
     expression = "REGB#(PCH#(CFM#(ASXAORD,VAL),1M),PCH#(CFM#(XXXX,VAL),1M),60M)",
     startDate = "-0D",
     endDate = "-0D",
     frequency = "M")

1697523486021.png



1697523486021.png (18.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.

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.