get_statistics: Get Key Statistics

Description Usage Arguments Value Examples

View source: R/get_key_statistics.R

Description

This function get the information from the key statistics page from yahoo finance. For individual statistics or statistics to calculate with, it is better to use 'quantmod::getQuote' together with 'quantmod::yahooQF'.

Usage

1

Arguments

symbol

a stock symbol

Value

Returns a data.frame containing the key statistics from the statistics page from Yahoo Finance. Available fields are symbol, statistic_group, statistic and value. All values are character values are only as good as the data on Yahoo.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
library(dplyr)
# returns the statistics for AAPL
aapl_stats <- get_statistics("AAPL")

# get all the profitability stats
aapl_stat %>% 
  filter(statistic_group == "Profitability")
 
# returns the statistics for AAPL and FB
symbols <- c("AAPL", "FB")
symbol_stats <- get_statistics(symbols)

symbol_stats %>% 
  filter(statistic == "Forward Annual Dividend Rate")

## End(Not run)

pverspeelt/Quantfunctions documentation built on Oct. 10, 2021, 1:01 p.m.