joshuaulrich / joshuaulrich/quantmod

expose tiingo split and dividend data

Open
#289 8 comments 1 reaction 0 assignees View on GitHub
feature request
Dominant language
R
Stars
906
Forks
233
PR merge metrics
No merged PRs in 30d

Description

the current tiingo `getSymbols` implementation only returns an OHLCV result. It does allow for an adjusted or un-adjusted result, but it does not expose the `divCash` or `splitFactor` columns. I'd like to expose this data so that I can use it in other processes. Specifically, i have some other data sources that only expose unadjusted prices. These sources need to be adjusted for splits (not divs), so i need access to the split factor

There are a few considerations in how to go about this:
1. `getSymbols.yahoo` already includes an extra `.Adjusted` column, in addition to the standard OHLCV columns, so it would not be unreasonable to just add these 2 columns to the end of the existing output. This would probably be the least invasive and simplest to implement, but would also create a go forward support issue that might interfere with a more radical API redesign approach

2. Another option would be to include a .Adjusted column to make it similar to the yahoo output, and to add parameters to the `getSymbols` call to control which adjustment to include, similar to how `adjRatios` works. This would be a bit more complicated to implement, but could work across a number of sources. the biggest downside would be that it wouldn't allow use of split/divs/both in different situations

3. this brings up the larger question of the framework design as a whole and how `getSplits()`, `getDividends`, `adjRatios` should work for sources other than yahoo. I certainly don't want to break existing functionality and design patterns, but it would seems silly to me to extend the existing 3 round trip call patterns to tiingo, when the data is already coming back as part of the `getSymbols` call.

4. For reference, the alphavatange api does not expose div and split data directly, so it's not really a consideration here

any thoughts on the best way to go about this. I'm happy to do the lifting once a direction/approach is accepted

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the Tiingo getSymbols implementation and comparing it with getSymbols.yahoo, getSplits(), getDividends(), and adjRatios. Review the existing OHLCV and adjustment behavior before choosing an approach. Done means exposing divCash and splitFactor while preserving existing functionality and avoiding an unresolved API design.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.