demo_returns | R Documentation |
demo_returns
is a sample of daily total returns, i.e. including dividends, for the german electric utility companies E.ON AG (ISIN: DE000ENAG999) and RWE AG (ISIN: DE0007037129). The return series for the Frankfurt stock exchange starts at 2015-01-01 with end at 2017-12-31 and has 760 daily return observations which are denoted in Euro. date
is the trading-day, for which return observations are available ind the format "yyyy-mm-dd". EON
denotes the return series for E.ON AG and RWE
denotes the return series for RWE AG.
data(demo_returns)
## load demo_returns data(demo_returns) ## calculate the mean total return E.ON AG in the year 2016. ## get the appropriate rows for the whole year 2016 dates <- which("2016-01-01" <= demo_returns$date & demo_returns$date <= "2016-12-31") ## calculate mean return mean(demo_returns$EON[dates])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.