knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
The R package marketconf
reads data on U. S. Stock Market Confidence
Indexes 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
library(devtools) devtools::install_github("EnriquePH/marketconf")
The four U.S. Stock market confidence indexes are derived monthly from survey data on the investors' behevior. These indices are:
library(marketconf) library(knitr) kable(US_confidence_indices())
index_symbol <- "USBODI" get_index_description(index_symbol)
index_symbol <- "USBODI" get_index_info(index_symbol)
data.frame
index_df <- get_index(index_symbol) kable(head(index_df))
This is a basic example that plots the U.S. Valuation Confidence 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))
The markerconf
package is licensed 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. Please
refer to the TERMS OF
USE
on Yale University's web page for further information.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.