AlphaVantageClient
Package for loading data from Alpha Vantage into R objects.
Install / Use
npx skills add athompson1991/AlphaVantageClientInstalls into whichever agent you are using.
README
AlphaVantageClient
Introduction
Alpha Vantage is a free API which provides both real time and historical stock market data. It is easy to get an API key, intraday data is available, and many technical indicators are included in the service. This package is a simple wrapper client to get data from the API into easy-to-use R objects, namely xts.
Installation
This package is available on CRAN and can be installed with install.packages("AlphaVantageClient").
To install this Github version, use devtools::install_github("athompson1991/AlphaVantageClient").
Usage
Step One: Set API Key
First, set your API key (Note: this is a 100% fake API key. Get key here if you don't already have one):
setAPIKey("ABCD")
Step Two: Download data.
Here is how to get daily time series loaded directly into an xts object:
amzn <- fetchSeries(function_nm = "time_series_daily", symbol = "amzn", outputsize = "full", datatype = "json")
The function returns a list with two elements - the xts object that is interpreted from the response, and the response from the httr package request. Now the data can be plotted, analyzed, manipulated into returns, etc.:
head(amzn$xts_object)
plot(amzn$xts_object[ ,1])
amzn_returns <- diff(log(amzn$xts_object[ ,1]))
Similarly, the other Alpha Vantage data offerings are available using the same function:
amzn_sma <- fetchSeries(function_nm = "sma", symbol = "amzn", interval = "daily", time_period = 60, series_type = "close")
amzn_bbands <- fetchSeries(function_nm = "bbands", symbol = "amzn", interval = "daily", time_period = 60, series_type = "close")
Related Skills
valuecell
11.0kValueCell is a community-driven, multi-agent platform for financial applications.
QuantDinger
10.4kAI quantitative trading platform for crypto, stocks, and forex with backtesting, live trading, market data, and multi-agent research.vibe-trading ,trading-agents,ai-trader,ai-trading
beanquery-mcp
50Beancount MCP Server is an experimental implementation that utilizes the Model Context Protocol (MCP) to enable AI assistants to query and analyze Beancount ledger files using Beancount Query Language (BQL) and the beanquery tool.
finance-skills
3.1kA collection of skills for AI financial analysis.
