knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Summary

The R package marketconf reads U. S. Stock Market Confidence Indexes data from Yale School of Management's International Center for Finance web page.

This package is for stock market prediction and risk valuation, and it can be used with other packages like quantmod, TTR or tidyquant

Package installation

library(devtools)
devtools::install_github("EnriquePH/marketconf")

List available indices

The four U.S. Stock market confidence indexes are derived, monthly, from survey data on the behavior of investors, these indexes are:

library(marketconf)
library(knitr)
kable(US_confidence_indices())

Search for index symbol description

index_symbol <- "USBODI"
get_index_description(index_symbol)

Search for index symbol information

index_symbol <- "USBODI"
get_index_info(index_symbol)

Load a given index into a data.frame

index_df <- get_index(index_symbol)
kable(head(index_df))

Plotting

This is a basic example which plots U.S. Valuation Index:

library(ggplot2)

index_symbol <- "USVI"
index_df <- get_index(index_symbol)

ggplot(index_df, aes(x = Date, y = USVI.Value, color = Investor)) +
  geom_line() +
  ggtitle(get_index_description(index_symbol))

License

The markerconf package is under the MIT License (MIT), but the Stock Market Confidence Indexes are produced and copyrighted by the International Center of Finance at the Yale School of Management. See TERMS OF USE at Yale University's web page.



EnriquePH/marketconf documentation built on May 8, 2019, 11:54 p.m.