Returning only certain mnemonics in a different currency

My code:

mnemonic = ["TTOCOMP","S&PCOMP","MSEAFEL", "MSEMKFL"]
data_type = ["PI","RI"]
start_date = "2019-04-17"
end_date = "TODAY"
frequency = "D"


df = ds.get_data(tickers=mnemonic,
fields=data_type,
start=start_date,
end=end_date,
freq=frequency)

How should I modify the above to have the "RI" data return in Canadian dollars?

Thank you

Best Answer

  • James.Bright1
    Answer ✓

    A return index is available for a range of sector and market indices, including Datastream Global Indices. The return index represents the theoretical aggregate growth in value of the constituents of the index. The index constituents are deemed to return an aggregate daily dividend which is included as an incremental amount to the daily change in price index.

    The calculation is as follows:

    image\qbe06.gif

    Where:

    image\qbe02.gif = return index on day t

    image\qbe03.gif = return index on previous day

    image\qbe04.gif = price index on day t

    image\qbe05.gif = price index on previous day

    DY = dividend yield of the price index

    n = number of days in financial year (normally 260)

    Currency conversion can be used with ~

    eg.X(MV)~CAD

Answers