Skip to content

Commit 56968b3

Browse files
committed
24-May release
1 parent 62850e0 commit 56968b3

File tree

3 files changed

+19
-6
lines changed

3 files changed

+19
-6
lines changed

absbox/local/component.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ def mkDs(x):
178178
return mkTag("CurrentBondBalance")
179179
case ("债券余额", *bnds) | ("bondBalance", *bnds):
180180
return mkTag(("CurrentBondBalanceOf", vList(bnds, str)))
181-
case ("初始债券余额",) | ("originalBondBalance",):
181+
case ("初始债券余额",*bnds) | ("originalBondBalance",*bnds):
182+
if bnds:
183+
return mkTag("OriginalBondBalanceOf", vList(bnds, str))
182184
return mkTag("OriginalBondBalance")
183185
case ("到期月份", bn) | ("monthsTillMaturity", bn):
184186
return mkTag(("MonthsTillMaturity", vStr(bn)))
@@ -247,7 +249,7 @@ def mkDs(x):
247249
case ("资产池系数", *pNames) | ("poolFactor", *pNames):
248250
if pNames:
249251
return mkTag(("PoolFactor", lmap(mkPid,pNames)))
250-
return mkTag("PoolFactor")
252+
return mkTag(("PoolFactor", None))
251253
case ("债券利率", bn) | ("bondRate", bn):
252254
return mkTag(("BondRate", vStr(bn)))
253255
case ("债券加权利率", *bn) | ("bondWaRate", *bn):
@@ -306,6 +308,8 @@ def mkDs(x):
306308
return mkTag(("AccTxnAmt", [ans, cmt]))
307309
case ("系数", ds, f) | ("factor", ds, f) | ("*", ds, f) if isinstance(f, float):
308310
return mkTag(("Factor", [mkDs(ds), f]))
311+
case ("*", *ds):
312+
return mkTag(("Multiply", lmap(mkDs, ds)))
309313
case ("Min", *ds) | ("min", *ds):
310314
return mkTag(("Min", lmap(mkDs, ds)))
311315
case ("Max", *ds) | ("max", *ds):

docs/source/howto.rst

+8
Original file line numberDiff line numberDiff line change
@@ -1078,3 +1078,11 @@ A string
10781078
^^^^^^^^^^^^^^^
10791079

10801080
Now with that string, user can just write it into a No-SQL document database . or sent via Email , or Fax it .
1081+
1082+
1083+
How to use Deal JSON string
1084+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1085+
1086+
The JSON string from `.json()` method can be used as part of post request send to `Hastructure` engine.
1087+
1088+
But unfortunately there is no way convert the string back to python class so far.

docs/source/modeling.rst

+5-4
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ Bond
211211
* ``("bondBalance",)`` -> sum of all bond balance
212212
* ``("bondBalance","A","B"...)`` -> sum of balance of bond A and bond B
213213
* ``("originalBondBalance",)`` -> bond balance at issuance
214+
* ``("originalBondBalance","A","B")`` -> bond balance at issuance of "A" and "B"
214215
* ``("bondFactor",)`` -> bond factor
215216
* ``("bondDueInt","A","B")`` -> bond due interest for bond A and bond B
216217
* ``("lastBondIntPaid","A")`` -> bond last paid interest
@@ -226,10 +227,10 @@ Pool
226227
* ``("cumPoolDefaultedBalance",)`` -> pool cumulative defaulted balance
227228
* ``("cumPoolNetLoss",)`` -> pool cumulative pool net loss balance
228229
* ``("cumPoolRecoveries",)`` -> pool cumulative recoveries
229-
* ``("cumPoolCollection", <field1>,<field2>....)`` -> pool cumulative on <field...> fields :ref:`Pool Sources`
230-
* ``("cumPoolCollectionTill", N,<field1>,<field2>....)`` -> pool cumulative on <field...> fields till Period N :ref:`Pool Sources`
231-
* ``("curPoolCollection", <field1>,<field2>...)`` -> pool current sum of fields
232-
* ``("curPoolCollectionTill", N,<field1>,<field2>...)`` -> pool current sum of fields till Period N
230+
* ``("cumPoolCollection", None, <field1>,<field2>....)`` -> pool cumulative on <field...> fields :ref:`Pool Sources`
231+
* ``("cumPoolCollectionTill", None, N,<field1>,<field2>....)`` -> pool cumulative on <field...> fields till Period N :ref:`Pool Sources`
232+
* ``("curPoolCollection", None, <field1>,<field2>...)`` -> pool current sum of fields
233+
* ``("curPoolCollectionTill", None, N,<field1>,<field2>...)`` -> pool current sum of fields till Period N
233234

234235
.. versionadded:: 0.24.1
235236

0 commit comments

Comments
 (0)