View source: R/PlotFunctions.R
StockData | R Documentation |
Create stock data for plotting using StockPlot()
StockData(
PolyOut = NULL,
Symbol = "TSLA",
CompanyName = "Tesla Inc. Common Stock",
Metric = "Stock Price",
TimeAgg = "days",
StartDate = "2022-01-01",
EndDate = "2022-01-01",
APIKey = NULL
)
PolyOut |
NULL. If NULL, data is pulled. If supplied, data is not pulled. |
Symbol |
ticker symbol string |
CompanyName |
company name if you have it. ends up in title, that is all |
Metric |
Stock Price, Percent Returns (use symbol for percent), Percent Log Returns (use symbol for percent), Index, Quadratic Variation |
TimeAgg |
= 'days', 'weeks', 'months' |
StartDate |
Supply a start date. E.g. '2022-01-01' |
EndDate |
Supply an end date. E.g. 'Sys.Date()' |
APIKey |
Supply your polygon API key |
Type |
'candlestick', 'ohlc' |
Adrian Antico
Other Graphics:
AddFacet()
,
BarPlot()
,
BoxPlot()
,
ChartTheme()
,
CorrMatrixPlot()
,
DensityPlot()
,
HeatMapPlot()
,
HistPlot()
,
PlotlyConversion()
,
StockPlot()
,
ViolinPlot()
,
multiplot()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.