domokane / FinancePy

A Python Finance Library that focuses on the pricing and risk-management of Financial Derivatives, including fixed-income, equity, FX and credit derivatives.
GNU General Public License v3.0
2.16k stars 322 forks source link

G10 Calendars #65

Closed gulls-on-parade closed 3 years ago

gulls-on-parade commented 3 years ago

@domokane , awesome work with this package! Great to see everything written in Python.

One feature request - it would be great to get calendars added for the rest of the G10 markets. Could use QL calendars as a reference.

Thanks!

mwalkup55 commented 3 years ago

I would second this, perhaps could use QuantLib calendars to populate?

domokane commented 3 years ago

Hi - Reworking and extending FinCalendar is on my to-do list. I will look at completing G10 as soon as I can. Cheers D

domokane commented 3 years ago

I just added calendars for Germany, France, Canada, Switzerland, Italy and Sweden. If you have specific requests let me know. It does not take long if I have a gap. I am closing this for now.

If you wish to get involved and add calendars yourself then please do so and send your code to me or do a pull request. D

gulls-on-parade commented 3 years ago

That was super fast! If I understand correctly, TARGET would be appropriate for EUR vanilla IRS, right? If that's so, then only AUD, NZD and NOK would be outstanding from G10 - if you're at all able.

Many thanks

domokane commented 3 years ago

Done. I can't promise to be as fast in future. ;-)

gulls-on-parade commented 3 years ago

I think latest commit introduced a small bug in FinCalendar.isBusinessDay(): if dt.isWeekend(): became if self._dt.isWeekend():, however this method is sometimes called before self._dt is instantiated.

Cheers

domokane commented 3 years ago

Fixed.