Displayr can import daily historical closing stock prices, commodity prices, and currency exchange rates. Input symbols are as per Yahoo finance.
This article describes how to import daily Stock Price data...
... and chart it over time.
Requirements
- A Displayr document
Method
- Select Anything > Data > Miscellaneous> Stock Prices from the toolbar.
- Enter the desired stocks, currencies, or commodities using the Stock Symbol(s) field of the object inspector. These symbols are listed on Yahoo finance. In this example, we will enter "TSLA" to see Tesla's rise over time. If you have more than one item, separate them with a comma.
- Change the Period field to Last year. You can customize the date range as required.
- OPTIONAL: Change Data fields to specify any combination of Open, Close, High, Low, separated by commas. It defaults to Close.
- From the object inspector, go to Visualization > Line > Line.
Options
The options in the Object Inspector are organized into two tabs: Data and Appearance.
Data
Symbol(s) The symbols(s) of stocks, currencies or commodities. Where there is more than one symbol, they should be comma-separated. To search for symbols, please refer to the Yahoo finance website.
Period The time period for which the historical data is extracted. Either Custom range or a specific period.
Start date The start date of the Custom range in the format yyyy-mm-dd.
End date The end date of the Custom range in the format yyyy-mm-dd. Defaults to today if not specified.
Data fields A comma-separated list of any of Open, Close, High and Low. Defaults to Close if not specified.
Long format output If checked, the result is returned in long format i.e. with one row of data per symbol per day. Otherwise, it is returned in wide format i.e. with days along the rows and symbols along the columns.
Automatic updating Whether to regularly update the data.
Update period The time unit for regular updates.
Frequency The multiple of the Update period for regular updating.
Start date and time The date and time of the first update in the format dd-mm-yyyy hh:mm or mm-dd-yyyy hh:mm.
US date format Whether the Start date and time is expressed in US format i.e. mm-dd-yyyy hh:mm.
Time zone An optional time zone for the Start date and time, or else default of UTC applies. Format must be Continent/City, e.g. America/Los_Angeles. See Wikipedia for a list of time zones.
Update exported documents Whether exported documents that refer to the data should also be updated regularly.
Appearance
This tab contains options for formatting the size of the object, as well as the underlying R code used to create the visualization, and the JavaScript code used to customize the Object Inspector itself (see Object Inspector for more details about these options). Additional options are available by editing the code.