ClimberMel / SMF_Add-in

Stock Market Functions for Excel using VBA
https://climbermel.github.io/SMF_Add-in/
14 stars 5 forks source link

smfGetYahooHistory close / adjclose using wrong pItem codes #19

Closed ClimberMel closed 1 year ago

ClimberMel commented 1 year ago

From Marek: "A" isn't a valid parameter for the smfGetYahooHistory function. "C" is supposed to pull adjusted price. The documentation page from 2022: https://web.archive.org/web/20220706061313/http://ogres-crypt.com/SMF/Documentation/viewer.php?name=smfGetYahooHistory-Function.html

ClimberMel commented 1 year ago

Interesting mix up with the items list. Marek mentioned that the Adjusted/Unadjusted closes were mixed up. I was using A for adjusted and C for unadjusted close.

I went back through the original code and smfGetYahooHistory used pItems As String = "tdohlcvufgxs" "Ticker,Date,Open,High,Low,Close,Volume,Unadj,Div Adj,Split Adj,Dividend,Split" So Randy used Close (C) for adjusted close and (U) for Unadjusted Close in the smfGetYahooHistory.

What threw me off was that I started with RCHGetYahooHistory which accepts A for adjusted Close and C for unadjusted close but did a swap before calling smfGetYahooHistory.

The old smfGetYahooHistory didn't have a "A" item. But RCHGetYahooHistory did...

So I now have to figure out the best way to deal with this as I have tried to keep the original formulas working... so I will see about switching smfGetYahooHistory back to using C for adjClose and U for Close (unadjusted)

I'm not planning on trying to do the individual split adjusted and div adjusted calculations since yahoo provides the adjusted close now, I see no reason to attempt to try split them out. Especially since yahoo doesn't provide the splits and divs with the rest of the data.

I'll let everyone know when the new version gets posted and I will test to make sue it doesn't mess up what is already working...