Skip to content

Commit 425e54f

Browse files
committed
Fix lint
1 parent 91f3d6d commit 425e54f

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

docs/examples/rates_kalman.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import asyncio
22
from datetime import timedelta
3+
from decimal import Decimal
34

45
import numpy as np
56
import pandas as pd
@@ -46,9 +47,9 @@ async def fetch() -> pd.DataFrame:
4647
va_model = np.zeros((len(va_short), len(ttm)))
4748
cir_model = np.zeros((len(cir_short), len(ttm)))
4849
for t in range(len(va_short)):
49-
vasicek.rate = float(va_short[t])
50+
vasicek.rate = Decimal(str(float(va_short[t])))
5051
va_model[t] = np.asarray(vasicek.rates(ttm), dtype=float)
51-
cir.rate = float(cir_short[t])
52+
cir.rate = Decimal(str(float(cir_short[t])))
5253
cir_model[t] = np.asarray(cir.rates(ttm), dtype=float)
5354

5455
# observed (par -> continuous) and both model yields per tenor, over time

quantflow/rates/yield_curve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def continuously_compounded_rate(
109109
)
110110
return maybe_float(result)
111111

112-
def rate(
112+
def rates(
113113
self,
114114
ttm: Annotated[ArrayLike, Doc("Time to maturity in years")],
115115
frequency: Annotated[

0 commit comments

Comments
 (0)