Skip to content

Commit 3e9b95e

Browse files
committed
fix library
1 parent aadbd82 commit 3e9b95e

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

absbox/library.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
from dataclasses import dataclass
32
from datetime import datetime
43
import pickle
@@ -9,11 +8,13 @@
98
import pandas as pd
109
from .exception import *
1110
import requests
11+
import toolz as tz
1212

1313
from requests.exceptions import ReadTimeout
1414
from json import JSONDecodeError
1515

1616
from .client import VERSION_NUM
17+
from .local.generic import Generic
1718

1819
console = Console()
1920

absbox/local/component.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,8 @@ def mkBondRate(x:dict)->dict:
671671
return mkTag(("FloorRate", [mkBondRate(br), vNum(floor)]))
672672
case ("罚息", pRateInfo,bRateInfo) | ("withIntOverInt", pRateInfo, bRateInfo):
673673
return mkTag(("WithIoI", [mkBondRate(bRateInfo), mkBondIoItype(pRateInfo)]))
674+
case None :
675+
return mkTag(("Fix",[0, DC.DC_ACT_365F]))
674676
case _:
675677
raise RuntimeError(f"Failed to match bond rate type:{x}")
676678

docs/source/library.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ Connect to the ``Deal Library``
3535
library = LIBRARY("http://localhost:8082/api")
3636
3737
38+
.. note::
39+
40+
User can setup his/her own library in-house or use the public one hosted on the cloud.
41+
The public one is available at ``LibraryPath``
42+
43+
.. code-block:: python
44+
45+
from absbox import LibraryPath
46+
47+
3848
Confirm the connection
3949
""""""""""""""""""""""""
4050

0 commit comments

Comments
 (0)