Financetoolkit

Latest version: v1.9.9

Safety actively analyzes 688694 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 10 of 13

0.13

It is also possible to access Government Bond rates from 30+ countries. For example, using `get_government_bond_yields(short_term=False, period='monthly')`:

| | Australia | Austria | Belgium | Brazil | Bulgaria | Canada | Chile | China | Colombia | Costa Rica | Croatia | Czech Republic | Denmark | Estonia | Euro Area 19 | Finland | France | Germany | Greece | Hungary | Iceland | India | Indonesia | Ireland | Israel | Italy | Japan | Latvia | Lithuania | Luxembourg | Mexico | Netherlands | New Zealand | Norway | Poland | Portugal | Romania | Russia | Slovakia | Slovenia | South Africa | South Korea | Spain | Sweden | Switzerland | United Kingdom | United States |
|:--------|------------:|----------:|----------:|---------:|-----------:|---------:|--------:|---------:|-----------:|-------------:|----------:|-----------------:|----------:|----------:|---------------:|----------:|---------:|----------:|---------:|----------:|----------:|---------:|------------:|----------:|---------:|--------:|--------:|---------:|------------:|-------------:|---------:|--------------:|--------------:|---------:|---------:|-----------:|----------:|---------:|-----------:|-----------:|---------------:|--------------:|--------:|---------:|--------------:|-----------------:|----------------:|
| 2023-05 | 0.035 | 0.0303 | 0.0304 | 0.0728 | 0.0403 | 0.0305 | 0.0555 | 0.0269 | 0.1111 | nan | 0.0371 | 0.045 | 0.0254 | 0.0394 | 0.0321 | 0.0298 | 0.0294 | 0.0234 | 0.0398 | 0.0778 | nan | 0.0701 | 0.0636 | 0.0279 | 0.0379 | 0.0431 | 0.0043 | 0.0383 | 0.0288 | 0.0295 | 0.0876 | 0.0273 | 0.0423 | 0.0323 | 0.0593 | 0.0316 | 0.063 | nan | 0.0359 | 0.0315 | 0.1194 | 0.034 | 0.0341 | 0.0232 | 0.0085 | 0.0396 | 0.0357 |
| 2023-06 | 0.0392 | 0.0305 | 0.0305 | 0.0728 | 0.0403 | 0.0334 | 0.0531 | 0.0264 | 0.1015 | nan | 0.0373 | 0.0435 | 0.0257 | 0.0394 | 0.0316 | 0.03 | 0.0293 | 0.0238 | 0.037 | 0.072 | nan | 0.0705 | 0.0622 | 0.0278 | 0.0374 | 0.0407 | 0.004 | 0.0379 | 0.0288 | 0.0295 | 0.0857 | 0.0275 | 0.0448 | 0.0348 | 0.0591 | 0.0309 | 0.0611 | nan | 0.0362 | 0.0338 | 0.1194 | 0.0361 | 0.034 | 0.0246 | 0.0097 | 0.0437 | 0.0375 |
| 2023-07 | 0.0403 | 0.0312 | 0.0314 | 0.07 | 0.0403 | 0.0345 | 0.0533 | 0.0266 | 0.1022 | nan | 0.0374 | 0.0415 | 0.027 | 0.0409 | 0.0327 | 0.0307 | 0.0304 | 0.0246 | 0.0385 | 0.071 | nan | 0.0711 | 0.0633 | 0.029 | 0.0377 | 0.0416 | 0.0059 | 0.0381 | 0.0288 | 0.0303 | nan | 0.0284 | 0.0465 | 0.0364 | 0.0556 | 0.0323 | 0.062 | nan | 0.0369 | 0.034 | 0.1172 | 0.0368 | 0.035 | 0.0252 | 0.0098 | 0.0444 | 0.039 |
| 2023-08 | 0.0413 | 0.0318 | 0.0322 | 0.07 | 0.0403 | 0.0365 | 0.0563 | 0.0256 | 0.107 | nan | 0.0393 | 0.0426 | 0.0277 | 0.0415 | 0.0334 | 0.0315 | 0.0311 | 0.0255 | 0.0388 | 0.074 | nan | 0.0719 | 0.0636 | 0.0296 | 0.0391 | 0.0422 | 0.0064 | 0.0385 | 0.0288 | 0.0308 | 0.091 | 0.0292 | 0.049 | 0.0381 | 0.0559 | 0.0331 | 0.0634 | nan | 0.038 | 0.0348 | 0.1172 | 0.0386 | 0.0359 | 0.0275 | 0.0095 | 0.0453 | 0.0417 |
| 2023-09 | 0.0421 | 0.0329 | 0.0332 | 0.07 | 0.0403 | 0.0382 | 0.0597 | 0.0268 | 0.1187 | nan | 0.0395 | 0.0449 | 0.0283 | 0.0425 | 0.0351 | 0.0325 | 0.0324 | 0.0266 | 0.0408 | 0.0708 | nan | 0.0717 | 0.0691 | 0.0309 | 0.04 | 0.0451 | 0.0076 | 0.0388 | 0.0288 | 0.0316 | 0.0968 | 0.0304 | 0.0505 | 0.0382 | 0.0568 | 0.0345 | 0.0748 | nan | 0.0391 | 0.0347 | 0.1206 | 0.0395 | 0.0372 | 0.0289 | 0.0109 | 0.0442 | 0.0438 |
| 2023-10 | 0.0463 | 0.0349 | 0.0352 | 0.0655 | 0.0403 | 0.0406 | 0.0653 | 0.0269 | 0.1181 | nan | 0.0418 | 0.0472 | 0.0305 | 0.0409 | 0.0372 | 0.0347 | 0.0345 | 0.0282 | 0.043 | 0.0753 | nan | 0.0735 | 0.0705 | 0.0327 | 0.0438 | 0.0488 | 0.0095 | 0.0414 | 0.0288 | 0.0332 | nan | 0.0321 | 0.0546 | 0.0395 | 0.0584 | 0.0359 | 0.0681 | nan | 0.0412 | 0.0367 | 0.1236 | 0.0427 | 0.0395 | 0.0302 | 0.0105 | 0.0457 | 0.048 |
| 2023-11 | 0.0458 | 0.0321 | 0.0323 | 0.0655 | 0.0403 | 0.0371 | 0.0598 | nan | 0.1089 | nan | 0.0393 | 0.0443 | 0.0279 | 0.0367 | 0.0342 | 0.032 | 0.0319 | 0.026 | 0.0388 | 0.0701 | nan | nan | nan | 0.0301 | 0.0427 | 0.0443 | 0.0066 | 0.0398 | 0.0288 | 0.0303 | 0.1023 | 0.0295 | 0.051 | 0.0368 | 0.0554 | nan | 0.0675 | nan | 0.0386 | 0.0353 | 0.1179 | 0.0389 | 0.0366 | 0.0276 | 0.0082 | 0.0427 | 0.045 |


Next to that, the well-known Corporate Bond indices from ICE BofA are also available. For example this shows the Corporate Bond Yield and Option-Adjust Spread (OAS) for a variety of maturities. You can access this data with `get_ice_bofa_effective_yield` and `get_ice_bofa_option_adjusted_spread`.

![Fixed Income](https://github.com/JerBouma/FinanceToolkit/assets/46355364/74eaa407-c178-4710-890d-8318dffce577)

Central Bank Rates such as the EURIBOR and SOFR rates can be accessed that serve as the reference (or benchmark) rate of a large variety of derivative contracts such as swaps and futures. For example:

python
from financetoolkit import FixedIncome

fixedincome = FixedIncome(start_date='2023-12-01')

euribor_rates = fixedincome.get_euribor_rates()


Which returns:

| | 1-Month | 3-Month | 6-Month | 12-Month |
|:--------|----------:|----------:|----------:|-----------:|
| 2023-12 | 0.0386 | 0.0393 | 0.0392 | 0.0367 |
| 2024-01 | 0.0387 | 0.0393 | 0.0389 | 0.0361 |
| 2024-02 | 0.0387 | 0.0392 | 0.039 | 0.0367 |

Next to that, I've added in the European Central Banks which include:

- The main refinancing operations (MRO) rate is the interest rate banks pay when they borrow money from the ECB for one week. When they do this, they have to provide collateral to guarantee that the money will be paid back.
- The marginal lending facility rate is the interest rate banks pay when they borrow from the ECB overnight. When they do this, they have to provide collateral, for example securities, to guarantee that the money will be paid back.
- The deposit facility rate which is one of the three interest rates the ECB sets every six weeks as part of its monetary policy. The rate defines the interest banks receive for depositing money with the central bank overnight.

These can be shown by using:

python
from financetoolkit import FixedIncome

fixedincome = FixedIncome(start_date='2000-01-01')

fixedincome.get_european_central_bank_rates()


Which returns (when plotted):

![image](https://github.com/JerBouma/FinanceToolkit/assets/46355364/faf9318e-ed12-4b81-a211-2982a067c0e3)

I've also added in the Federal Funds rates which include:

- The effective federal funds rate (EFFR) which is calculated as a volume-weighted median of overnight federal funds transactions reported in the FR 2420 Report of Selected Money Market Rates.
- The overnight bank funding rate (OBFR) which is calculated as a volume-weighted median of overnight federal funds transactions, Eurodollar transactions, and the domestic deposits reported as “Selected Deposits” in the FR 2420 Report.
- The TGCR which is calculated as a volume-weighted median of transaction-level tri-party repo data collected from the Bank of New York Mellon.
- The BGCR which is calculated as a volume-weighted median of transaction-level tri-party repo data collected from the Bank of New York Mellon as well as GCF Repo transaction data obtained from the U.S. Department of the Treasury’s Office of Financial Research (OFR).
- The SOFR which is calculated as a volume-weighted median of transaction-level tri-party repo data collected from the Bank of New York Mellon as well as GCF Repo transaction data and data on bilateral Treasury repo transactions cleared through FICC's DVP service, which are obtained from the U.S. Department of the Treasury’s Office of Financial Research (OFR).

These can be shown by using (and defining the rate):

python
from financetoolkit import FixedIncome

fixedincome = FixedIncome(start_date='2016-01-01')

Effective Federal Funds Rate
fixedincome.get_federal_reserve_rates(rate='EFFR')

Secured Overnight Financing Rate
fixedincome.get_federal_reserve_rates(rate='SOFR')


Which returns (when plotted):

![image](https://github.com/JerBouma/FinanceToolkit/assets/46355364/cdac837e-89bb-4261-aac9-afa4cc617e75)

![image](https://github.com/JerBouma/FinanceToolkit/assets/46355364/0f820fcb-2f0f-40c4-a7a9-c1fa33f0ebc2)

0.12

0.0012

0.11

0.09

0.08

Page 10 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.