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:
-
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
-
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
-
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.
-
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
the current tiingo
getSymbolsimplementation only returns an OHLCV result. It does allow for an adjusted or un-adjusted result, but it does not expose thedivCashorsplitFactorcolumns. 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 factorThere are a few considerations in how to go about this:
getSymbols.yahooalready includes an extra.Adjustedcolumn, 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 approachAnother option would be to include a .Adjusted column to make it similar to the yahoo output, and to add parameters to the
getSymbolscall to control which adjustment to include, similar to howadjRatiosworks. 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 situationsthis brings up the larger question of the framework design as a whole and how
getSplits(),getDividends,adjRatiosshould 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 thegetSymbolscall.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