Code Monkey home page Code Monkey logo

Comments (5)

domokane avatar domokane commented on August 24, 2024 1

I don't have access to Bloomberg static data. However the code can now handle these situations given the number of days and the correct calendar - NONE for calendar dates, WEEKEND for weekdays and a country name for business days in that country only.

from financepy.

domokane avatar domokane commented on August 24, 2024

OK. I will look at this. It should be a straightforward fix. Do you have a numerical example say from BBG I can tie out to ?

from financepy.

jonfreedman avatar jonfreedman commented on August 24, 2024

You should be able to get access to DMO closing prices which has dirty and clean prices, yield mod dur and int acc via https://www.dmo.gov.uk/data/treasury-bills/prices-and-yields/

from financepy.

domokane avatar domokane commented on August 24, 2024

I added ex-dividend dates to the FinBond class. When you calculate the accruedInterest it defaults to zero ex-div dates. But if you pass a non-zero number of days and a calendar it determines the ex-div date accordingly and then the accrued. There is a test in TestFinBond.py that ties out this example on page 16 of https://www.dmo.gov.uk/media/14702/pig201204.pdf . I find some sources like this give 7 BD for gilts and some that give 6 BD. I assume that 6 is now correct. This is something the user passes in. If you have a table of conventions then I can put them into the FinBondMarket DB.

from financepy.

jonfreedman avatar jonfreedman commented on August 24, 2024

If you read the ex-div settings from Bloomberg static data (EX_DIV_DAYS & EX_DIV_CALENDAR fields), that may be a source of the confusion as those field values are sometimes wrong (e.g. AUD bonds saying they have 7 days ex-div with a Sydney calendar) or confusing (GBP bond saying it has 8 days ex-div (6 business days + sat + sun) which will then be updated if a holiday falls in the period).

GBP (6bd) and AUD (7cd) are the only G10 issuers I'm aware of with ex-div periods, but a lot of JP corp bonds use it as well.

from financepy.

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.