Skip to content

Commit

Permalink
Docstring updates
Browse files Browse the repository at this point in the history
  • Loading branch information
JerBouma committed Apr 27, 2024
1 parent 5de30c4 commit 773361f
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions financetoolkit/fixedincome/fixedincome_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(
end_date='2024-01-15',
)
fixedincome.get_effective_yield(maturity=False)
fixedincome.get_ice_bofa_effective_yield(maturity=False)
```
Which returns:
Expand Down Expand Up @@ -234,7 +234,7 @@ def get_present_value(
future cash flows, which includes the coupon payments and the par value of the bond at maturity. The bond price is calculated
using the following formula:
- Bond Price = (C / r) * (1 - (1 + r)^-n) + F / (1 + r)^n
- Bond Price = (C / r) * (1 (1 + r)^-n) + F / (1 + r)^n
where:
Expand Down Expand Up @@ -445,7 +445,7 @@ def get_yield_to_maturity(
The yield to maturity is calculated using the following formula:
- Bond Price = (C / r) * (1 - (1 + r)^-n) + F / (1 + r)^n
- Bond Price = (C / r) * (1 (1 + r)^-n) + F / (1 + r)^n
where:
Expand Down Expand Up @@ -1050,6 +1050,25 @@ def get_euribor_rates(
Returns:
pandas.DataFrame: DataFrame containing the Euribor rates for the specified maturities.
As an 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 |
| 2024-03 | 0.0385 | 0.0392 | 0.0389 | 0.0372 |
"""
if isinstance(maturities, str):
maturities = [maturities]
Expand Down

0 comments on commit 773361f

Please sign in to comment.