Giter VIP home page Giter VIP logo

Comments (12)

eddelbuettel avatar eddelbuettel commented on August 30, 2024

If you could, something reproducible would be great.

Also, it is not quite clear which settings do, or do not, come 'down' from the Bbg terminal one connects to.

from rblpapi.

joel23888 avatar joel23888 commented on August 30, 2024

Basic reproduction steps:
Step 1. In BBG terminal, enter DPDF GO and uncheck all boxes, be sure to save settings
Step 2. Run:

library(lubridate)
library(xts)
library(Rblpapi)
con <- blpConnect() 
tz <- "Asia/Tokyo"
Sys.setenv(TZ=tz)
t7 <- ymd_hms("2015-03-26 14:00:00", tz = tz)
t8 <- ymd_hms("2015-03-27 10:00:00", tz = tz)
d <- getBars("4661 JT Equity", eventType = "TRADE", barInterval = 60,
               startTime = t7, endTime = t8,
               returnAs = "xts", tz = "Asia/Tokyo")
d

Which returns for me:
open high low close numEvents volume
2015-03-26 14:00:00 36089.7 36129.6 35930 35930 1170 216100
2015-03-27 09:00:00 9137.0 9400.0 9050 9395 9002 2576700

This is expected as DPDF settings dictate no corporate actions adjustments should be made, and given the stock split I referred to before when I raised the issue, the price should divide in 4 from one day to the next (approximately).

Step 3. In BBG terminal, enter DPDF GO and check all boxes, be sure to save settings
Step 4. Rerun getBars in step 2 (under new DPDF setting), which for me returns the same result as in step 2. However, this is unexpected because DPDF dictate corporate actions adjustments should be made. The adjustment should be that price on 3/26 is multiplied by 0.25 and volume by 4, which is what I get when I view the same data on BBG terminal using the GIT function (unrelated to "git").

Let me know if you need more details.

If you see http://www.bloomberglabs.com/api/content/uploads/sites/2/2014/07/blpapi-developers-guide-2.54.pdf around p176 there is an option "adjustmentFollowDPDF", which if passed over to BBG should return adjusted data if DPDF is set to apply adjustments.

from rblpapi.

joel23888 avatar joel23888 commented on August 30, 2024

eddelbuettel: Seemed easier to provide a potential solution for this than I had first thought (new to RCpp). Sent you a pull request.

from rblpapi.

eddelbuettel avatar eddelbuettel commented on August 30, 2024

Thanks, the PR looks fine.

But am wondering why we need the setting if the default (per page 176) is TRUE already?

from rblpapi.

joel23888 avatar joel23888 commented on August 30, 2024

It does say that, but on my system it was never adjusting for corporate actions even when my DPDF setting were dictating it should. As soon as I made the change, it worked. If anyone has a different behavior I would be interested to know.

Also, under the heading of corporate actions I should point out my approach is incomplete. It does not support the elements adjustmentNormal, adjustmentAbnormal, and adjustmentSplit. These may be useful for per-request control of corporate action adjustments. Expected behavior would be to override DPDF settings.

from rblpapi.

eddelbuettel avatar eddelbuettel commented on August 30, 2024

I know. I am wondering whether we should have a list, say, blpOptions(...), as opposed to individual toggles. No strong feelings either way, but a shorter argument list may be better.

Opinions on this, @armstrtw @johnlaing ?

from rblpapi.

johnlaing avatar johnlaing commented on August 30, 2024

Very much in favor of a list or ... instead of a long string of potentially esoteric options.

from rblpapi.

eddelbuettel avatar eddelbuettel commented on August 30, 2024

👍

I'll deal with it: first taking in the PR, then rearranging sligthly.

from rblpapi.

armstrtw avatar armstrtw commented on August 30, 2024

yeah, list sounds good.

I don't know how to put the fancy thumbs up here, so I'll just do +1.

from rblpapi.

eddelbuettel avatar eddelbuettel commented on August 30, 2024

:)

If you edit in the browser, start with a single : and you'll see ... (oh and you always look at other people's post by opening them for edits ...)

from rblpapi.

joel23888 avatar joel23888 commented on August 30, 2024

Many thanks!

from rblpapi.

eddelbuettel avatar eddelbuettel commented on August 30, 2024

Attempted to get closed by #48 which was not good and then #105 with was better (though not without issues itself 😃 )

from rblpapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.